2
root@host [/]# fsck -cc /dev/sdb1
fsck from util-linux-ng 2.17.2
e2fsck 1.41.12 (17-May-2010)
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: done
/dev/sdb1: 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

/dev/sdb1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdb1: 11/18317312 files (0.0% non-contiguous), 1198478/73258400 blocks

It said File System Was Modified. So what? I just format it. Anything wrong?

slm
  • 369,824
user4951
  • 10,519

4 Answers4

4

It looks like it found nothing. And then updated the bad block inode with its results, which was nothing.

FILE SYSTEM WAS MODIFIED gets spit out by fsck any time it makes a write to the filesystem. Changing that one bad block inode qualifies.

Especially whereas you didn't specify to just fix any problems without asking you (-y) if it came up with problems on the disk in need of correction, it would have said something.

kurtm
  • 7,055
3

I'd run it again. The -cc found badblocks and called the program badblocks to repair them. You might want to just run it as:

$ fsck /dev/sdb1

excerpt from fsck.ext3 man page

-c
This option causes e2fsck to run the badblocks(8) program to find any blocks which are bad on the filesystem, and then marks them as bad by adding them to the bad block inode. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test.

UPDATE #1: Follow-up Question

Does the fsck found bad block? What is non destructive read write test?

fsck is a front end tool which does a variety of checks as to the overall well being of a filesystem. The -cc switch tells fsck to call badblocks too so that a more thorough check is performed.

A non-destructive read/write entails the contents of the location being backed up first, a pattern is then used to test the location, and the original content is returned.

References

slm
  • 369,824
  • Does the fsck found bad block? What is non destructive read write test? – user4951 Oct 06 '13 at 10:09
  • 2
    This is wrong, it did not say that it found any bad blocks. This comment overwrites the "bad block" inode regardless if it found any bad blocks or not, so it will always modify the fileystem. Also the answer is misleading. – Sam Watkins Aug 11 '14 at 14:48
0

Apparently you can run dumpe2fs -b to see the list of bad blocks, eg. dumpe2fs -b /dev/sdb1. I guess if the output is empty, there are no bad blocks (but I don't have a drive with bad blocks available right now, so can't test it).

oliver
  • 458
  • 3
  • 9
0

Don't worry, this message appear when you have a bad file, for example a file with bad name or unicode name, or occurpted file, It's not reated to your filesystem.

PersianGulf
  • 10,850
  • this is not completely correct. it is completely related to the filesystem as filenames and file data is completely dependent on the filesystem. also, this message doesn't appear when you have a corrupted file. it appears when you have a bad block on the physical disk, and that block may not even be allocated to any file. – strugee Oct 05 '13 at 20:53
  • this is totally wrong – Sam Watkins Aug 11 '14 at 14:48