linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Robinson <john.robinson@anonymous.org.uk>
To: Doug Ledford <dledford@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
	"Labun, Marcin" <Marcin.Labun@intel.com>,
	Neil Brown <neilb@suse.de>,
	"Hawrylewicz Czarnowski,
	Przemyslaw" <przemyslaw.hawrylewicz.czarnowski@intel.com>,
	"Ciechanowski, Ed" <ed.ciechanowski@intel.com>,
	"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	Bill Davidsen <davidsen@tmr.com>
Subject: Re: Auto Rebuild on hot-plug
Date: Fri, 02 Apr 2010 12:01:08 +0100	[thread overview]
Message-ID: <4BB5CE74.4000900@anonymous.org.uk> (raw)
In-Reply-To: <4BB21E97.1020406@redhat.com>

On 30/03/2010 16:53, Doug Ledford wrote:
> On 03/30/2010 08:10 AM, John Robinson wrote:
[...]
>> I wouldn't want to take the server down to shuffle the drives or cables.
>> But my point really is that if I have decided that I would want all the
>> drives in my chassis to have identical partition tables and carry an
>> active mirror of an array - in my example /boot - I would like to be
>> able to configure the hotplug arrangement to make it so, rather than
>> leaving me to have to manually regenerate the partition table, install
>> grub, add the spare and perhaps even grow the array.
> 
> I can (sorta) understand this.  I personally never create any more /boot
> partitions than the number of drives I can loose from my / array + 1.
> So, if I have raid5 / array, I do 2 /boot partitions.  Anything more is
> a waste since if you loose both of those boot drives, you also have too
> few drives for the / array.

A very fair point. But it's not really all that wasteful - I've had to 
use the first 100MB from at least two drives, meaning that space would 
effectively go to waste on the others. And 100MB out of 1TB isn't an 
awfully big waste anyway.

[...]
>>  This might mean that I end up something like the following:
>> DOMAIN path=pci-0000:00:1f.2-scsi-[0-4]:0:0:0       action=include
>> DOMAIN path=pci-0000:00:1f.2-scsi-[0-4]:0:0:0-part1 action=grow
>> DOMAIN path=pci-0000:00:1f.2-scsi-[0-4]:0:0:0-part2 action=replace
>> DOMAIN path=pci-0000:00:1f.2-scsi-[0-4]:0:0:0-part3 action=include
> 
> This I'm not so sure about.  I can try to make this a reality, but the
> issue here is that when you are allowed to specify things on a partition
> by partition basis, it becomes very easy to create conflicting commands.
>  For example, lets say you have part1 action=grow, but for the bare disk
> you have action=incremental.  And let's assume you plug in a bare disk.
>  In order to honor the part1 action=grow, we would have to partition the
> disk, which is in conflict with the bare disk action of incremental
> since that implies we would only use preexisting md raid partitions.

Yes, but in that case I've given specific instructions about what to do 
with bare drives. It'd be a bad configuration, and you might warn about 
it, but you couldn't honour the grow. Bear in mind, the two domain lines 
here don't overlap. If they did you've more of a quandry, or at least 
you should shout louder about it. I don't think you should be writing 
partition tables unless I've told you to - which I would have done in 
the following more general case:
DOMAIN path=pci-0000:00:1f.2-scsi-[0-4]* action=replace

>  I
> could *easily* see the feature of allowing per partition actions causing
> the overall code complexity to double or more.

I'm not sure why, since you probably ought to be doing some fairly 
rigorous checking of the configuration anyway to make sure domains and 
actions don't overlap or conflict.

>  You know, I'd rather
> provide a simple grub script that automatically setup all raid1 members
> as boot devices any time it was ran than try to handle this
> automatically ;-)  Maybe I should add that to the mdadm package on
> x86/x86_64, something like mdadm-grub-install or similar.

That would be fine too, as long as there's some way of calling it from 
the hotplug environment.

> As pointed out above, some of these are conflicting commands in that
> they tell us to modify the disk in one place, and leave it alone in
> another.

If the paths overlapped I'd agree, but they didn't, and I made sure the 
whole-drive action was sufficient to make sure the partition actions 
could be carried out. I agree though that there's plenty of scope for 
people writing duff configurations like the one you suggested, but I 
think there'll be scope for that whatever you do - even if it's 
foolproof, it may not be damn-fool-proof.

>  The basic assumption you are making here is that we will
> always be able to duplicate the partition table because all drives in a
> domain will have the same partition table.  And that's not always the case.

It might be a reasonable restriction for a first implementation, though. 
If not, you're going to have to store copies of the partition tables, 
boot areas, etc somewhere else so that when the drives they were on are 
hot-swapped, you can write the correct stuff back.

[...]
>> Sorry if I'm being long-winded, but hopefully you can see how I'd like
>> to be able to configure things. In the first instance, though, just
>> getting as far as the replace option would be great.
> 
> I see where you are going, I'm a little worried about getting there ;-)

I don't blame you. Isn't it just typical of a user who doesn't 
understand the work involved to demand the sky and the stars? Anyway 
thank you very much for taking the time to consider my thoughts.

Cheers,

John.


  reply	other threads:[~2010-04-02 11:01 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25  0:35 Auto Rebuild on hot-plug Neil Brown
2010-03-25  2:47 ` Michael Evans
2010-03-31  1:18   ` Neil Brown
2010-03-31  2:46     ` Michael Evans
2010-03-25  8:01 ` Luca Berra
2010-03-31  1:26   ` Neil Brown
2010-03-31  6:10     ` Luca Berra
2010-03-25 14:10 ` John Robinson
2010-03-31  1:30   ` Neil Brown
2010-03-25 15:04 ` Labun, Marcin
2010-03-27  0:37   ` Dan Williams
2010-03-29 18:10     ` Doug Ledford
2010-03-29 18:36       ` John Robinson
2010-03-29 18:57         ` Doug Ledford
2010-03-29 22:36           ` John Robinson
2010-03-29 22:41             ` Dan Williams
2010-03-29 22:46               ` John Robinson
2010-03-29 23:35             ` Doug Ledford
2010-03-30 12:10               ` John Robinson
2010-03-30 15:53                 ` Doug Ledford
2010-04-02 11:01                   ` John Robinson [this message]
2010-03-29 21:36       ` Dan Williams
2010-03-29 23:30         ` Doug Ledford
2010-03-30  0:46           ` Dan Williams
2010-03-30 15:23             ` Doug Ledford
2010-03-30 17:47               ` Labun, Marcin
2010-03-30 23:47                 ` Dan Williams
2010-03-30 23:36               ` Dan Williams
2010-03-31  4:53               ` Neil Brown
2010-03-26  6:41 ` linbloke
2010-03-31  1:35   ` Neil Brown
2010-03-26  7:52 ` Majed B.
2010-03-31  1:42   ` Neil Brown

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=4BB5CE74.4000900@anonymous.org.uk \
    --to=john.robinson@anonymous.org.uk \
    --cc=Marcin.Labun@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=davidsen@tmr.com \
    --cc=dledford@redhat.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=przemyslaw.hawrylewicz.czarnowski@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).