sacretagent Posted June 30, 2012 Share Posted June 30, 2012 As far a si understand it : 1 bad blocks is at the file system level 2 bad sectors are at the hw level correct ? now lets says i have 20 bad blocks on a disk and 2 pending sectors if i remove everything from that disk and reformat the disk will that solve the bad blocks issue ? I am trying to understand why the blocks went bad ... and if reformatting a drive will make the blocks which are not on a bad sector make good again ? Quote Link to comment
c3 Posted July 1, 2012 Share Posted July 1, 2012 1 bad filesystem block can be several sectors 2 bad sectors can be 1 or 2 filesystem blocks. if you have 20, is that new? The drive is failing? replace and let it rebuild. Which disk? Is it the parity drive? smartctl -l selftest /dev/sd<asneeded> The output should indicate the location of the sector defect. Using that location offset by the partition starting and factoring blocksize, figure which block is bad. (location-starting)*sectorsize/blocksize. 512 sectors or 4096? Then ask the filesystem what is in that block. debugreiserfs -1 <blocknumber> /dev/sd<asneeded><part#> Forcing the drive to remap the sector is tricky and only works for the lucky. Use badblocks -svn non destructive testing for that block. Or lastly, just write to the block, dd if=/dev/zero of=/dev/sda<asneeded><part#> count=1 bs=<blocksize> seek=<blocknumber> Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.