How to retrieve your corrupted or deleted /shome files

A T3 user can independently retrieve a corrupted or deleted /shome file by looking into his/her own snapshots of /shome ; for instance :

$ cd /shome/$USER/.zfs/snapshot

[martinelli_f@t3ui01 ~]$  cd /shome/$USER/.zfs/snapshot

[martinelli_f@t3ui01 snapshot]$ ls -la 
total 0
dr-xr-xr-x 2 root root 2 Dec 10 18:01 .
dr-xr-xr-x 1 root root 0 Oct 27 14:22 ..
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-day-20161207-011142 <-- Max 5 past days
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-day-20161208-014735
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-day-20161208-161224
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-day-20161209-011126
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-day-20161210-012819
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-070101 <-- Max 36 past hours
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-080101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-090101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-100101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-110101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-120102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-130101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-140101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-150102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-160102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-170102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-180101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-190101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-200101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-210101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-220101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161209-230102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-000101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-010101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-020101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-030102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-042410
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-050101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-060101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-070102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-080101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-090101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-100102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-110101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-120101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-130102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-140102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-150102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-160102
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-170101
dr-xr-xr-x 1 root root 0 Dec 10 18:44 zfssnap-hour-20161210-180101

Choose a snapshot dir, enter inside of it by cd and copy back in /shome/$USER/ what you need by an ordinary cp command

Be aware that all your files deleted but still referenced in your snapshots will affect your /shome space quota, that's 400GB lately ; it's a rare event to run over quota because of your snapshots and that actually means that you're frequently adding/removing big files in your /shome, while you have to use the UI /scratch or the /pnfs areas for that purpose !

Your present/past /shome usage is published here :

http://t3mon.psi.ch/ganglia/PSIT3-custom/space.report

Edit | Attach | Watch | Print version | History: r19 | r13 < r12 < r11 < r10 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r11 - 2016-12-10 - FabioMartinelli
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback