Re: mdadm spare-group not working for me

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

 



On Fri, 23 Jul 2004, Neil Brown wrote:

> On Wednesday July 7, Holger.Kiehl@xxxxxx wrote:
> > 
> > Is it possible to influence the order at which the spares are taken
> > from the group? Reason is that I have four spare partitions on two
> > ide disks (2 partitions on each disk). Removing a second disk I
> > noticed it picked the second partition from the same disk. The spares
> > where added in this order hde7 hda7 hde6 hda6, but mdadm picked hde7
> > and then hde6. Better would be hde then hda.
> 
> No, it is not possible to do that reliably.
> 
> mdadm will tend to choose the first one it finds.  So if you add the
> best choices as spared first, and then add the poorer choices, it
> might be more likely to choose the one you want.
> 
No this does not work. I have added the spares in the following order:

   hda7 hde7 hda6 hde6

Here what /proc/mdstat says:

   Personalities : [raid0] [raid1] 
   md6 : active raid0 md3[0] md5[2] md4[1]
         215310528 blocks 64k chunks
         
   md1 : active raid1 hde3[1] hda3[0]
         4016128 blocks [2/2] [UU]
         
   md2 : active raid1 hde5[1] hda5[0]
         4007936 blocks [2/2] [UU]
         
   md3 : active raid1 hde6[2] hda6[3] hde7[4] hda7[5] sdd1[1] sda1[0]
         71770240 blocks [2/2] [UU]
         
   md4 : active raid1 sde1[1] sdb1[0]
         71770240 blocks [2/2] [UU]
         
   md5 : active raid1 sdf1[1] sdc1[0]
         71770240 blocks [2/2] [UU]
         
   md0 : active raid1 hde2[1] hda2[0]
         29197824 blocks [2/2] [UU]
         
   unused devices: <none>

So this looks just like what I want. But after boot it looks as follows:

   Personalities : [raid0] [raid1] 
   md6 : active raid0 md3[0] md5[2] md4[1]
         215310528 blocks 64k chunks
         
   md1 : active raid1 hde3[1] hda3[0]
         4016128 blocks [2/2] [UU]
         
   md2 : active raid1 hde5[1] hda5[0]
         4007936 blocks [2/2] [UU]
         
   md3 : active raid1 sdd1[1] sda1[0] hde7[2] hde6[3] hda7[4] hda6[5]
         71770240 blocks [2/2] [UU]
         
   md4 : active raid1 sde1[1] sdb1[0]
         71770240 blocks [2/2] [UU]
         
   md5 : active raid1 sdf1[1] sdc1[0]
         71770240 blocks [2/2] [UU]
         
   md0 : active raid1 hde2[1] hda2[0]
         29197824 blocks [2/2] [UU]
         
   unused devices: <none>

md3 is started via raid autodetect. How can I tell md the order of spares?

Thanks,
Holger
-
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