Re: Verifying spare drive, best practices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Carlos Carvalho wrote:
Maurice Hilarius (maurice@xxxxxxxxxxxx) wrote on 20 March 2008 22:35:
 >Given this situation:
 >7 disks in total
 >RAID5 of 6 disks, and a hot spare.
 >
 >mdadm show the 6 disks, but not the spare.
 >
>As a maintenance question, where one wants to periodically ensure that >the hot spare is both available and good.
 >How should one best :
 >1) Verify the hot spare is still available.
 >2) Verify that the hot spare is healthy?

I usually do a dd if=/dev/zero of=/dev/spare to write to all sectors
and give the drive a chance to remap bad blocks. Then run smartctl
with a long test, and smartctl -a to see the results.

I hope you disable use as a spare before doing this... If you were so "lucky" as to have a failure in the array and start using the drive as a spare while writing zeros to it, you might have an unexpected learning experience.

If there are partitions I use sfdisk -d /dev/disk-in-array |sfdisk -f
/dev/spare to copy the partition table from one of the other disks to
the spare, or any other (non-manual...) method to restore the partitioning.

This can be easily included in the routine array checks.
--
Bill Davidsen <davidsen@xxxxxxx>
 "Woe unto the statesman who makes war without a reason that will still
be valid when the war is over..." Otto von Bismark

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux