I was trying to re-use a hard disk that shows errors, I don't remember if the device was hit or it starts making misreads on his own. The fs is ext3.
There are files recovered using the testdisk utility, and then then idea is to erase the partitions and the recreate and format again marking the bad blocks as unusable via
badblocks -v /dev/sdx > list
and later
fsck -l list /dev/sdx
But will this be reliable? I intend to use it as removable-media, not for a system.
The output of dumpe2fs has many entrys like this
Group 0: (Blocks 0-32767) csum 0xf720 [ITABLE_ZEROED]
Primary superblock at 0, Group descriptors at 1-19
Reserved GDT blocks at 20-1024
Block bitmap at 1025 (+1025)
Inode bitmap at 1041 (+1041)
Inode table at 1057-1568 (+1057)
1616 free blocks, 6429 free inodes, 359 directories, 3847 unused inodes
Full text here
smartclt
)? – sebasth Jan 6 '19 at 18:03badblocks
then it normally means the disk is so bad it can't fix itself anymore. I replace disks like that ASAP. – Stephen Harris Jan 6 '19 at 18:055 Reallocated_Sector_Ct 0x0033 011 011 050 Pre-fail Always FAILING_NOW 2025
is a bad sign.197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 82
is even worse. – Stephen Harris Jan 6 '19 at 18:10