From: NeilBrown <neilb@suse.de>
To: Francis Moreau <francis.moro@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Some info given by 'mdadm --detail --export' are not convenient to use
Date: Sat, 12 Apr 2014 09:43:30 +1000 [thread overview]
Message-ID: <20140412094330.12fbf1a7@notabene.brown> (raw)
In-Reply-To: <5347CB9D.5090702@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
On Fri, 11 Apr 2014 13:01:49 +0200 Francis Moreau <francis.moro@gmail.com>
wrote:
> Hello,
>
> I'm writing a tool that relies udev lib in order to manage block
> devices connected to my computer.
>
> One thing that I need is to retrieve disks contained by a RAID array.
>
> The current usefull information exported by udev are, for example:
>
> MD_DEVICES=3
> MD_DEVICE_loop0p1_DEV=/dev/loop0p1
> MD_DEVICE_loop0p1_ROLE=0
> MD_DEVICE_loop1p1_DEV=/dev/loop1p1
> MD_DEVICE_loop1p1_ROLE=1
> MD_DEVICE_loop2p1_DEV=/dev/loop2p1
> MD_DEVICE_loop2p1_ROLE=2
>
> but this is not really easy to exploit since I need to know the disk
> names in order to poke the devices used by the array :-/
>
> why not simply using ?
>
> MD_DEVICE_DEV_1=/dev/loop0p1
> MD_DEVICE_ROLE_1=0
>
What number would I use for spare devices?
Certainly something like this could be done, but it wasn't.
Maybe what you are really asking is:
"Could we please have another record which lists all the devices, e.g.
MD_DEVICE_LIST=loop0p1 loop1p1 loop2p1
??"
Obviously you can extract that from the output above, but it might be easier
to have it explicitly.
Would that meet your need, or have I misunderstood you completely?
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2014-04-11 23:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 11:01 Some info given by 'mdadm --detail --export' are not convenient to use Francis Moreau
2014-04-11 23:43 ` NeilBrown [this message]
2014-04-12 8:22 ` Francis Moreau
2014-04-12 16:34 ` bobzer
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=20140412094330.12fbf1a7@notabene.brown \
--to=neilb@suse.de \
--cc=francis.moro@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.