From: Neil Brown <neilb@suse.de>
To: David Rea <dave@daverea.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: RAID-5 spare drive: Can't make spare persist across reboot
Date: Sun, 31 May 2009 07:53:50 +1000 [thread overview]
Message-ID: <18977.43758.674932.381022@notabene.brown> (raw)
In-Reply-To: message from David Rea on Saturday May 30
On Saturday May 30, dave@daverea.com wrote:
> [First-time poster, done plenty of googling and archive searching
> before sending this, so if it's already been covered my apologies in
> advance...]
>
> Hello All-
>
> I am running a 3-disk RAID-5 using kernel 2.6.24 and mdadm 2.6.3 under
> Ubuntu server 8.04LTS. I'm trying to add a spare drive to the array.
>
> /dev/md0 == /dev/sdc, /dev/sdd, /dev/sda
>
> I want to add /dev/sdb1 as a spare partition, so I tried `mdadm
> /dev/md0 --add /dev/sdb1` ... this worked great; running `mdadm
> --detail /dev/md0` shows 3 active and 1 spare. Cool!
>
> However, after a reboot, I'm back to 3 active and 0 spare drives. I
> tried adding the spare to my DEVICES list in /etc/mdadm/mdadm.conf,
> and adding a SPARES=1 attribute to the ARRAY line in that file, still
> no persistence. I tried running `update-initramfs -u` after changing
> mdadm.conf (per an IRC suggestion) but still no persistence.
This should "just work". There might be some hints in
/var/log/messages if you'd like to post that.
>
> -- Is it possible to do what I'm trying to do?
Definitely.
> -- Do I need to create the array anew using `mdadm --create` and
> specifying "--spare-devices=1 /dev/sdb1" during creation?
No.
> -- Will creating the array again risk corrupting the data already present?
There is always a risk - you might type the wrong command by mistake.
Other than that there is no risk.
However doing so won't gain you anything.
> -- Is there any way to instantiate a superblock on /dev/sdb1 so that
> it can be associated with this array's UUID?
You have already done that. Use
mdadm --examine /dev/sdb
to confirm.
> -- I have the ARRAY line (in mdadm.conf) specified by UUID; could this
> be causing the spare to be excluded, since it (presumably) does not
> have a superblock?
No. And it does have a superblock.
NeilBrown
next prev parent reply other threads:[~2009-05-30 21:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-30 18:37 RAID-5 spare drive: Can't make spare persist across reboot David Rea
2009-05-30 21:53 ` Neil Brown [this message]
2009-05-30 22:26 ` David Rea
2009-05-30 22:44 ` NeilBrown
2009-05-31 0:31 ` David Rea
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=18977.43758.674932.381022@notabene.brown \
--to=neilb@suse.de \
--cc=dave@daverea.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox