On Sun, 30 Aug 2020 at 04:08, Philip Rhoades phil@pricom.com.au wrote:
People,
I know this is not strictly a Fedora issue but I only use Fedora so I am hoping people here can help - maybe we should have a separate mailing list or forum topic for this sort of hard disk stuff?
Just after a full backup (fortunately) the 7.2TB /home partition (/dev/sda5) on my email server somehow got corrupted.
Think about possible hardware issues including: overheating, bad cables, failed disk. smartmontools can tell you about problems with the drive and run the drive's built-in tests. Some vendors will issue a warranty return authorization on the strength of linux smartctl results.
After I realised there was a problem, I unmounted the partition and tried:
e2fsck -y /dev/sda5
but the process hangs after “Clone multiply-claimed blocks<y>?” and the disk goes quiet - I could still break out with CTRL-C but I can't get past this point in the attempted fix process. So I thought I would just produce a list of the affected files and then just delete the inodes or just restore from backup but when I tried:
debugfs -R "ncheck 187536544" /dev/sda5
it took hours to find nothing but printed screenfulls of:
ncheck: "Directory block checksum" does not match directory block while calling ext2_dir_iterate
and there are 1069 inodes to check!
I am guessing that if I just try to delete each of the inodes with:
debugfs -R "clri <inode>" /dev/sda5
that it would take weeks! So unless someone can suggest a faster method of fixing the partition (mainly just as an exercise now) or at least just working out what is wrong with it, I guess I will just have to re-create the partition?
I wouldn't spend any time on this drive until I had confidence in the hardware.