Re: software RAID (fwd)

From: Adam Miller (amiller_at_gravity.phys.uwm.edu)
Date: 05/20/05

  • Next message: Jon Smirl: "Re: Screen regen buffer at 0x00b8000"
    Date:	Fri, 20 May 2005 16:17:27 -0500 (CDT)
    To: lsorense@csclub.uwaterloo.ca
    
    

    Here is a response from Bruce Allen.

    >> If you have a bad sector, it doesn't go away by writing to it again. On
    >> modern drives, if you see bad sectors the disk is just about dead, and
    >> will probably be seen as such by the raid system which will then stop
    >> using the disk entirely and expect you to replace it ASAP.

    This is false.

    Modern ATA and SCSI disk drives have several thousand spare sectors.
    When a sector is unreadable (UNC) which means that the ECC codes are
    inconsistent, the drive will REALLOCATE the sector, assigning a spare
    sector the LBA of the failed sector. However it will only do this when
    you WRITE to the LBA of the failed sector.

    > The one exception here is if you have a miswritten sector (usually
    > caused by unexpected power-down), which won't read back correctly -
    > but running badblocks with one of the 'write-verify' options will
    > resurrect it.

    Sectors can have inconsistent ECC codes for a number of reasons:
       -- failed write during sudden power-down
       -- damage to magnetic media at this LBA
       -- other reasons

    > If you have a drive that has a bad block in it even *after* badblocks has
    > re-written it, it's time to replace the drive *now*....

    Not true. Disks which have reallocated large numbers of blocks are
    usually failing. But most good disks have some reallocated blocks.

    > For the original poster: Breaking the mirror and then re-mirroring
    > from the "good" drive *might* recover the bad block when it re-writes
    > it. But don't bet on it...

    It won't 'recover' the bad block. It will write the data (obtained from
    the good drive) to a newly allocated spare sector on the bad drive.

    Cheers,
             Bruce
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Jon Smirl: "Re: Screen regen buffer at 0x00b8000"

    Relevant Pages

    • Re: Bad Clusters
      ... >drives I use for backup. ... head positioning wobble that reduces accuracy of pickup, ... Why would a previously good HD develop a bad sector? ... i.e. where the head touches the disk and thus damages it. ...
      (microsoft.public.windowsxp.general)
    • ATA Defect management
      ... > data to a reallocated sector. ... actually make backups and want to restore them on to the disk without ... > identical to the conditions for reallocate on read. ... NO. Fix the drives. ...
      (Linux-Kernel)
    • Re: raid 1 - automatic repair possible?
      ... Having looked at a lot of disks, I think that it is definitely worth ... With large drives, you ... clean the questionable sector and leave you with a perfectly fine disk. ...
      (Linux-Kernel)
    • Re: Advise on data recovery from failed drive
      ... I have an ancient program that I once wrote to make copies of disk drives ... It will retry a single sector read several times before ... FreeBSD 4.8-RELEASE dd command and discovered a new option that avoids ...
      (freebsd-questions)
    • Re: Smartd message: What does it mean?
      ... I do not want to replace a HDD if just 1 sector is marked bad at ... the device would like to mark as ``bad" and reallocate. ... there is some unreadable data on the disk. ... Scsi drives willingly reveal their defect list - Not sure ...
      (Fedora)