Nikos Chantziaras writes: > Before leaving home, I started an fsck.ext4 on a filesystem (500GB) that > resides on a disk that I suspect is damaged: > > fsck.ext4 -c -c -f /dev/sdb1 > > When I came back 10 hours later, it was still checking. After 2 hours > more (so it took 12 hours total) it finally finished. The output was
Anything about erros in dmesg or syslog? > e2fsck 1.41.14 (22-Dec-2010) > Checking for bad blocks (non-destructive read-write test) > Testing with random pattern: done > Extra: Updating bad block inode. > Pass 1: Checking inodes, blocks, and sizes > Pass 2: Checking directory structure > Pass 3: Checking directory connectivity > Pass 4: Checking reference counts > Pass 5: Checking group summary information > > Extra: ***** FILE SYSTEM WAS MODIFIED ***** > Extra: 11/30531584 files (0.0% non-contiguous), > 1966902/122096638 blocks > > I'm not sure how to read this. Were there any bad blocks or not? Is > there a way to query the filesystem for the now known bad blocks? (The > "Updating bad block inode." message suggests that such a list is stored > directly inside the filesystem.) dumpe2fs -b /dev/sdb1 probably also works for ext4. bablocks /dev/sdb2 will do a read-only check of the whole partiton for bad blocks. Use option -n for a non-destructive write mode. I qalso like to add options -s and -v to see the progress. I redirect the output into a file then, because output of progress and bad blocks will overlap: badblocks -sv /dev/sdb1 > sdb1.bad See man badblocks for more information. Wonko