linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* what does spares=1 mean  in mdadm --detail --scan for raid1
@ 2005-04-29  6:25 Mitchell Laks
  2005-04-29  6:38 ` Guy
  0 siblings, 1 reply; 3+ messages in thread
From: Mitchell Laks @ 2005-04-29  6:25 UTC (permalink / raw)
  To: linux-raid

Hi,
I have multiple raid 1 devices on my system.

recently i noticed read seek errors in /var/log/kern.log from /dev/hdi1 which 
is part of /dev/md1.

I then did a lot of work with /dev/md1 and then i noticed that /dev/hdi1 
failed in the /dev/md1 but the data was fine on remaining part of raid1.

I then shut system down and 
then i put in another device to replace /dev/hdi1 and rebooted

At this point of rebooting,  i had forgotten to edit the contents 
of /etc/mdadm/mdadm.conf and it still had the line something like

  ARRAY /dev/md1 level=raid1 num-devices=2 \ 
UUID=d876333b:694e852b:e9a6f40f:0beb90f9
devices /dev/hdc1,/dev/hdi1

then i got an error from fsck on bootup as it reached /dev/md1 
and dropped me into single user  mode
then i changed the mdadm.conf file to 

  ARRAY /dev/md1 level=raid1 num-devices=2 
UUID=d876333b:694e852b:e9a6f40f:0beb90f9
devices /dev/hdc1

and it booted fine.

i then did 
mdadm /dev/md1 -a /dev/hdi1
to add in my new drive.

Mdadm then began to recreate the array.

and then, while the raid was in the process of rebuilding
i did
mdadm --detail --scan
and the line read 

  ARRAY /dev/md1 level=raid1 num-devices=2 spares=1 \ 
UUID=d876333b:694e852b:e9a6f40f:0beb90f9
devices /dev/hdc1,/dev/hdi1

so my question for the group is

what is the meaning of spares=1?

does it mean to indicate that the device is still rebuilding?
 
On the other raid 1 devices on my system, such as 
/dev/md0 the mdadm --detail --scan  says

  ARRAY /dev/md0 level=raid1 num-devices=2 
UUID=d876333b:694e852b:e9a6f40f:0beb90f9
devices /dev/hda1,/dev/hdg1

without the spares=1  clause.

The reason I ask is: What should I write into my new version of mdadm.conf?
I am  guessing  I should write

   ARRAY /dev/md1 level=raid1 num-devices=2  
UUID=d876333b:694e852b:e9a6f40f:0beb90f9
devices /dev/hdc1,/dev/hdi1

without the spares=1 thing.

I am confused what spares=1 is for.....

Thanks!!!
Mitchell Laks


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

* RE: what does spares=1 mean  in mdadm --detail --scan for raid1
  2005-04-29  6:25 what does spares=1 mean in mdadm --detail --scan for raid1 Mitchell Laks
@ 2005-04-29  6:38 ` Guy
  2005-04-29  8:44   ` Mitchell Laks
  0 siblings, 1 reply; 3+ messages in thread
From: Guy @ 2005-04-29  6:38 UTC (permalink / raw)
  To: 'Mitchell Laks', linux-raid

> From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
> owner@vger.kernel.org] On Behalf Of Mitchell Laks
> Sent: Friday, April 29, 2005 2:26 AM
> To: linux-raid@vger.kernel.org
> Subject: what does spares=1 mean in mdadm --detail --scan for raid1
> 
> Hi,
> I have multiple raid 1 devices on my system.
> 
> recently i noticed read seek errors in /var/log/kern.log from /dev/hdi1
> which
> is part of /dev/md1.
> 
> I then did a lot of work with /dev/md1 and then i noticed that /dev/hdi1
> failed in the /dev/md1 but the data was fine on remaining part of raid1.
> 
> I then shut system down and
> then i put in another device to replace /dev/hdi1 and rebooted
> 
> At this point of rebooting,  i had forgotten to edit the contents
> of /etc/mdadm/mdadm.conf and it still had the line something like
> 
>   ARRAY /dev/md1 level=raid1 num-devices=2 \
> UUID=d876333b:694e852b:e9a6f40f:0beb90f9
> devices /dev/hdc1,/dev/hdi1
> 
> then i got an error from fsck on bootup as it reached /dev/md1
> and dropped me into single user  mode
> then i changed the mdadm.conf file to
> 
>   ARRAY /dev/md1 level=raid1 num-devices=2
> UUID=d876333b:694e852b:e9a6f40f:0beb90f9
> devices /dev/hdc1
> 
> and it booted fine.
This seems very wrong to me!  I hope someone else can help here!

> 
> i then did
> mdadm /dev/md1 -a /dev/hdi1
> to add in my new drive.
> 
> Mdadm then began to recreate the array.
> 
> and then, while the raid was in the process of rebuilding
> i did
> mdadm --detail --scan
> and the line read
> 
>   ARRAY /dev/md1 level=raid1 num-devices=2 spares=1 \
> UUID=d876333b:694e852b:e9a6f40f:0beb90f9
> devices /dev/hdc1,/dev/hdi1
> 
> so my question for the group is
> 
> what is the meaning of spares=1?
When you add a disk it is a spare.
If needed, it is used to replace a missing disk.
Once the re-sync is done it will not be a spare.

> 
> does it mean to indicate that the device is still rebuilding?
> 
> On the other raid 1 devices on my system, such as
> /dev/md0 the mdadm --detail --scan  says
> 
>   ARRAY /dev/md0 level=raid1 num-devices=2
> UUID=d876333b:694e852b:e9a6f40f:0beb90f9
> devices /dev/hda1,/dev/hdg1
> 
> without the spares=1  clause.
> 
> The reason I ask is: What should I write into my new version of
> mdadm.conf?
> I am  guessing  I should write
> 
>    ARRAY /dev/md1 level=raid1 num-devices=2
> UUID=d876333b:694e852b:e9a6f40f:0beb90f9
> devices /dev/hdc1,/dev/hdi1
> 
> without the spares=1 thing.
> 
> I am confused what spares=1 is for.....
I am confused by the change you had to make!
But you should not add "spares=1".

> 
> Thanks!!!
> Mitchell Laks

Guy


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

* Re: what does spares=1 mean  in mdadm --detail --scan for raid1
  2005-04-29  6:38 ` Guy
@ 2005-04-29  8:44   ` Mitchell Laks
  0 siblings, 0 replies; 3+ messages in thread
From: Mitchell Laks @ 2005-04-29  8:44 UTC (permalink / raw)
  To: linux-raid

On Friday 29 April 2005 02:38 am, Guy wrote:

> >
> > what is the meaning of spares=1?
>
> When you add a disk it is a spare.
i see. 

So it is important information but not intended for mdadm.conf....

indeed when the rsync completed it no longer said
spares=1 in 
mdadm --detail --scan

so i left it out of the mdadm.conf for the next time and it worked.

thanks,
Mitchell

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

end of thread, other threads:[~2005-04-29  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-29  6:25 what does spares=1 mean in mdadm --detail --scan for raid1 Mitchell Laks
2005-04-29  6:38 ` Guy
2005-04-29  8:44   ` Mitchell Laks

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).