bad blocks versus bad sectors


Recommended Posts

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 ?

 

 

Link to comment

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>

 

 

 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.