Re: Automatically adding spares on boot

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

 



On 01/09/2013 06:09 PM, Can Jeuleers wrote:
> Hi,
> 
> Over the years I've had various problems with the degree to which the
> adding of spares on boot is automatic. There have been times when this
> has just worked, and other times (such as now) where it only works very
> occasionally (or not at all). Google is full of stories like this.
> 
> I have no clue why it's not working automatically, I just know that it
> isn't.
> 
> So I wrote a little script that automates this, and hooked it up to
> mdmon as an event handler.
> 
> It can probably do with an elegance upgrade, but it works for me.
> 
> HTH, Jan

Here is sample output of the script, which it mails to root:

The UUID of component devices is 442e9934:97191d8e:6d0cf7a9:41621837
(442e9934-9719-1d8e-6d0c-f7a941621837)
Device /dev/sdb2 is already a member of the array
Device /dev/sdd2 is already a member of the array
Found device /dev/sde3 with the same UUID but not yet a component device.
mdadm: re-added /dev/sde3

It's a great shame that there does not appear to be a standard format
for representing UUIDs: mdadm uses an 8:8:8:8 format, whereas blkid
wants an 8-4-4-4-12 format. Hence the conversion shenanigans in the
script. Makes the code brittle.

Cheers, Jan
--
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