All of lore.kernel.org
 help / color / mirror / Atom feed
From: Can Jeuleers <can.jeuleers@gmail.com>
To: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Subject: Re: Automatically adding spares on boot
Date: Sat, 19 Jan 2013 09:23:03 +0100	[thread overview]
Message-ID: <50FA57E7.3020608@gmail.com> (raw)
In-Reply-To: <50EDA431.1090905@gmail.com>

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

  reply	other threads:[~2013-01-19  8:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-09 17:09 Automatically adding spares on boot Can Jeuleers
2013-01-19  8:23 ` Can Jeuleers [this message]
2013-01-19 18:27 ` Roy Sigurd Karlsbakk
2013-01-19 18:41   ` Can Jeuleers
2013-01-20 11:51     ` Roy Sigurd Karlsbakk
2013-01-20 12:00       ` Can Jeuleers
2013-01-20 12:21         ` Roy Sigurd Karlsbakk
2013-01-20 12:29           ` Can Jeuleers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50FA57E7.3020608@gmail.com \
    --to=can.jeuleers@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.