Re: Testing Spare Drives in Software RAID



On Wed, Aug 22, 2007 at 11:05:17PM -0400, Hal Vaughan wrote:
I know mdadm offers a "--test" command, but it seems quite useless:

-t, --test
Generate a TestMessage alert for every array found at
startup. This alert gets mailed and passed to the alert program. This
can be used for testing that alert message to get through
successfully.

That helps with knowing that alerts are working, but I'd like to be able
to test the spare drive in an array. Is there any way to test a spare
device in a RAID to make sure it's in good shape and not likely to fail
once it's needed?


I don't know how to test the actual functioning of a spare drive. With
no activity on a spare, S.M.A.R.T. may not have any data to go on.

You could have an extra spare drive. This spare drive could be as large
as your largest partition used in your arrays. You could test this
drive off-line with, for example, badblocks to write and read every
block of the drive, giving S.M.A.R.T. something to go by. Then you
could partition this drive as needed to create a temporary spare
partition to put into an array, allowing you to remove a spare drive
from an array for similar testing.

If the array is raid1, you could add the spare in so that there are 3
mirror images. Once it has synced, S.M.A.R.T. should have some good
data. You can then remove it and turn it back into a spare. I don't
know how to do this with raid levels other than 1.

Another method that doesn't require a spare-spare but with some risk
would be to force-fail one of the active drives so that the spare comes
into play, then add it back in as a spare. The risk is that if a drive
in the array actually dies while the spare is being sync'ed then the
array has two failed drives and the array itself fails.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Hard drive question
    ... 146Gb array. ... >> More drives is theoretically faster, but I doubt you'll notice it in ... >> Please consider a hot spare drive, even if you add it later. ... >> the server, and it'll be covered on the server's warranty. ...
    (microsoft.public.windows.server.sbs)
  • Re: Borked MD RAID...
    ... /dev/sdd1", drives no longer are allocated as spares, however the array ... currently the array is being rebuilt. ... spare. ... Next verify that the UUID numbers in your /etc/mdad.conf file stored in the initrd file is correct, you'll have to extract the initrd file ...
    (Fedora)
  • Re: Problem with md: Not rebuilding rai5
    ... I created a degrated raid5 on top of md1 and hde1. ... AND what's even stranger for me, I've two spare disks. ... If you have a raid5 with 2 working drives and one fails, ... and made hdk1 not beeing in the array. ...
    (Linux-Kernel)
  • Re: Intel Matrix Storage... how do I rebuild a degraded RAID10 array?
    ... I configured them in a RAID10 array ... one of the drives and Intel Matrix Storage Manager dutifully informed ... that the user wants the "spare" to be used for RAID purposes. ...
    (alt.comp.periphs.mainboard.asus)
  • [Summary] saving disksuite info while rebuilding server
    ... "Caution - If a full install of Solaris is performed, ... make sure you have tape backups of everything. ... I had an old workgroup storage array with six 18G drives formatted RAID5 ...
    (SunManagers)