Thursday, December 10, 2015

fix harddisk with bad sectors using fsck

if your harddisk  display messages like below mean your harddisk might have bad sectors

Dec 10 18:14:48 mypc kernel: [19373.542275] Buffer I/O error on device sdb1, logical block 12209638

so it will not functions properly,  to fix the problem we use fsck, the command below will check and fix sdb1. it is the partition of the harddisk that has problem

$ sudo fsck -p -f -c -y /dev/sdb1


Note:  This commend is not fix the bad sector of the harddisk physically, it just mark the problem sector and will not use them in the future, So if you have important data, should not store on just harddisk

No comments:

Post a Comment