Linux Based Disk Errors For Badblocks

October 22, 2011 / Web Hosting

Server offen face problems with Hard disk drives and one of them is bad blocks. Bad blocks can occur in the HDD due the intensive I/O reads and I/0 writes in HDD. To check the Bad blocks in a Linux server, following command needs to be executed in the server.

$ badblocks /dev/fd0H1440 1440 >
$ fsck −t ext2 −l bad−blocks
Parallelizing fsck version 0.5a (5−Apr−94)
e2fsck 0.5a, 5−Apr−94 for EXT2 FS 0.5, 94/03/10

Pass 1:
Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Check reference counts.
Pass 5: Checking group summary information.

/dev/fd0H1440: ***** FILE SYSTEM WAS MODIFIED *****
/dev/fd0H1440: 11/360 files, 63/1440 blocks

If bad blocks display a block which was previously utilized then you can try to transfer the block to other location. If in any case the block was really bad, not just marginal, the data of the file may be corrupted.

Leave a Reply

Your email address will not be published. Required fields are marked *