linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Verifying spare drive, best practices
@ 2008-03-21  4:35 Maurice Hilarius
  2008-03-21 15:13 ` Carlos Carvalho
  2008-03-25  4:48 ` Neil Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Maurice Hilarius @ 2008-03-21  4:35 UTC (permalink / raw)
  To: linux-raid

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?

-- 
With our best regards,

//Maurice W. Hilarius         Telephone: 01-780-456-9771/
/Hard Data Ltd.                FAX:          01-780-456-9772/
/11060 - 166 Avenue         email:maurice@harddata.com/
/Edmonton, AB, Canada         http://www.harddata.com//
/     T5X 1Y3/
/


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Verifying spare drive, best practices
  2008-03-21  4:35 Verifying spare drive, best practices Maurice Hilarius
@ 2008-03-21 15:13 ` Carlos Carvalho
  2008-03-22 17:25   ` Bill Davidsen
  2008-03-25  4:48 ` Neil Brown
  1 sibling, 1 reply; 6+ messages in thread
From: Carlos Carvalho @ 2008-03-21 15:13 UTC (permalink / raw)
  To: linux-raid

Maurice Hilarius (maurice@harddata.com) 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.

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Verifying spare drive, best practices
  2008-03-21 15:13 ` Carlos Carvalho
@ 2008-03-22 17:25   ` Bill Davidsen
  0 siblings, 0 replies; 6+ messages in thread
From: Bill Davidsen @ 2008-03-22 17:25 UTC (permalink / raw)
  To: Carlos Carvalho; +Cc: linux-raid

Carlos Carvalho wrote:
> Maurice Hilarius (maurice@harddata.com) 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@tmr.com>
  "Woe unto the statesman who makes war without a reason that will still
  be valid when the war is over..." Otto von Bismark 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Verifying spare drive, best practices
  2008-03-21  4:35 Verifying spare drive, best practices Maurice Hilarius
  2008-03-21 15:13 ` Carlos Carvalho
@ 2008-03-25  4:48 ` Neil Brown
  2008-03-25 13:29   ` Peter Evertz
  2008-03-25 16:19   ` Bill Davidsen
  1 sibling, 2 replies; 6+ messages in thread
From: Neil Brown @ 2008-03-25  4:48 UTC (permalink / raw)
  To: Maurice Hilarius; +Cc: linux-raid

On Thursday March 20, maurice@harddata.com wrote:
> 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.

 - On the relevant line in mdadm.conf, put "spares=1"
 - have a daily cron job that runs
     mdadm --montor --scan --oneshot

It will report every day with a "SparesMissing" event if the right
number of spares is not present.

> 2) Verify that the hot spare is healthy?

Others have answered this.

NeilBrown

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Verifying spare drive, best practices
  2008-03-25  4:48 ` Neil Brown
@ 2008-03-25 13:29   ` Peter Evertz
  2008-03-25 16:19   ` Bill Davidsen
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Evertz @ 2008-03-25 13:29 UTC (permalink / raw)
  To: Neil Brown, linux-raid

Neil Brown schrieb:
> On Thursday March 20, maurice@harddata.com wrote:
>   
>> 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.
>>     
>
>  - On the relevant line in mdadm.conf, put "spares=1"
>  - have a daily cron job that runs
>      mdadm --montor --scan --oneshot
>
> It will report every day with a "SparesMissing" event if the right
> number of spares is not present.
>   
But that will wakeup the spare-drive ? So i have to put them aspleep 
again with "hdparm -y" ?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Verifying spare drive, best practices
  2008-03-25  4:48 ` Neil Brown
  2008-03-25 13:29   ` Peter Evertz
@ 2008-03-25 16:19   ` Bill Davidsen
  1 sibling, 0 replies; 6+ messages in thread
From: Bill Davidsen @ 2008-03-25 16:19 UTC (permalink / raw)
  To: Neil Brown; +Cc: Maurice Hilarius, linux-raid

Neil Brown wrote:
> On Thursday March 20, maurice@harddata.com wrote:
>   
>> 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.
>>     
>
>  - On the relevant line in mdadm.conf, put "spares=1"
>  - have a daily cron job that runs
>      mdadm --montor --scan --oneshot
>
> It will report every day with a "SparesMissing" event if the right
> number of spares is not present.
>   

Another case for raid4e ;-)

-- 
Bill Davidsen <davidsen@tmr.com>
  "Woe unto the statesman who makes war without a reason that will still
  be valid when the war is over..." Otto von Bismark 



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-03-25 16:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-21  4:35 Verifying spare drive, best practices Maurice Hilarius
2008-03-21 15:13 ` Carlos Carvalho
2008-03-22 17:25   ` Bill Davidsen
2008-03-25  4:48 ` Neil Brown
2008-03-25 13:29   ` Peter Evertz
2008-03-25 16:19   ` Bill Davidsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).