From: Doug Ledford <dledford@redhat.com>
To: Neil Brown <neilb@suse.de>
Cc: Linux RAID Mailing List <linux-raid@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>
Subject: Re: [Patch mdadm] Add hot-unplug support to mdadm
Date: Tue, 06 Apr 2010 22:24:21 -0400 [thread overview]
Message-ID: <4BBBECD5.6010903@redhat.com> (raw)
In-Reply-To: <4BBBE7D2.6090608@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]
On 04/06/2010 10:02 PM, Doug Ledford wrote:
> On 04/06/2010 09:30 PM, Neil Brown wrote:
>> On Mon, 05 Apr 2010 12:40:41 -0400
>> Doug Ledford <dledford@redhat.com> wrote:
>> would it help do you think to support e.g.
>>
>> mdadm -If --devnum $major:$minor $name
>
> As I recall, on a remove event the major minor is already gone too (but
> I could be wrong, the machine has since been blown away and reinstalled
> and the file I had the whole env during a remove event stored off in is
> gone with it).
>
> And I would be careful about using $env{DEVNAME}, in fact I'm removing
> usage of it in my local rules files right now because I've found it is
> inconsistent (part of the time it includes /dev/ and part of the time it
> doesn't, where as $tempnode is consistent).
OK, so to expand on this a bit further. $env{DEVNAME} sometimes refers
to devices via a full path (aka, /dev/sda1), and sometimes by just the
last part of the path (aka, md0). I found this when creating a rule to
do incremental assembly on containers during late udev startup (I need
this because the initramfs created by dracut *only* starts necessary
arrays, and if you have a additional arrays in a container, then the
change event generated during udev startup can be used to trigger
incremental assembly of those additional arrays, but $env{DEVNAME} will
just be md0 or whatever, not a full path name). So, I switched
everything to $tempnode as it always points to a device special file.
Except when doing removal events, in which case $tempnode doesn't exist
because there is no node to point to. So, long story short, you're best
off to use $tempnode on any device add|change events, and $env{DEVNAME}
on remove events.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: CFBFF194
http://people.redhat.com/dledford
Infiniband specific RPMs available at
http://people.redhat.com/dledford/Infiniband
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-04-07 2:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 16:40 [Patch mdadm] Add hot-unplug support to mdadm Doug Ledford
2010-04-06 16:26 ` Doug Ledford
2010-04-07 1:30 ` Neil Brown
2010-04-07 2:02 ` Doug Ledford
2010-04-07 2:24 ` Doug Ledford [this message]
2010-04-07 3:07 ` Doug Ledford
2010-04-07 5:32 ` Luca Berra
2010-04-07 6:59 ` Neil Brown
2010-04-08 23:31 ` Neil Brown
2010-04-09 0:33 ` Neil Brown
2010-04-09 20:02 ` Doug Ledford
2010-04-13 9:28 ` Tomáš Dulík
2010-04-13 16:27 ` Doug Ledford
2010-04-13 18:49 ` Doug Ledford
[not found] ` <4BC5ADB2.2060705@unart.cz>
2010-04-15 5:24 ` Neil Brown
2010-04-15 13:11 ` Tomáš Dulík
2010-04-13 19:04 ` Doug Ledford
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=4BBBECD5.6010903@redhat.com \
--to=dledford@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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).