All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@arcor.de>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH 1/2] select_devices: fix scanning of container members with dev list
Date: Thu, 27 Jun 2013 20:15:08 +0200	[thread overview]
Message-ID: <51CC812C.3030500@arcor.de> (raw)
In-Reply-To: <20130624165547.0c0bd93b@notabene.brown>

Hi Neil,

>> commit b3908491 "Detail: fix --brief --verbose" introduced a
>> problem when a mdadm.conf file generated with
>> "mdadm --Detail --brief --verbose" is later scanned with
>> "mdadm --Assemble --scan --config=mdadm.conf"
>>
>> mdadm -Dbv will print a "devices" list now, but because the
>> container device is not in that list, it won't be considered
>> for assembly.
>>
>> This patch fixes that by moving the test for member devices
>> further down, after the check for a container.
>>
>> Signed-off-by: Martin Wilck <mwilck@arcor.de>
> 
> Hi Martin,
>  I really don't like this.  If there is a "device=" entry then it should not
>  even open anything not listed.

That doesn't work for containers. The "device" in the container case is
the container itself. Only by parsing the container and its subarrays
does mdadm -As succeed.

>  Can you give me more details about the problem you are experiencing?  Maybe
>  the problem is in "mdadm -Dbv".

Well, the problem might be fixed differently by having "mdadm -Dbv" in
the container case print the container device. I am not sure if that's
what you meant.

Below is the output of mdadm -Dbv from the DDF test case. Without my
patch, it can't be assembled with -As because /dev/md/ddf0 is not in the
devices list. If the "devices=" lines are deleted from the file, it
works. It would also work if the container device was a member of the
devices list.

Note that even if the "devices=" line is missing, select_devices() will
discard all the devices listed for subarrays ("/dev/loop10 has wrong
UUID"). This is because getinfo_super() will return the UUID of the
container, not of any subarray, in line 370 of Assemble.c. But the
scanning of the container device works.

ARRAY /dev/md/ddf0 level=container num-devices=5 metadata=ddf
UUID=0cadff6e:56f14bc0:5ac6bed5:b602c0a9
   devices=/dev/loop10,/dev/loop11,/dev/loop12,/dev/loop8,/dev/loop9
ARRAY /dev/md/r0 level=raid0 num-devices=5 container=/dev/md/ddf0
member=0 UUID=6c900c64:1873e2d0:ee78718b:7f156c44
   devices=/dev/loop10,/dev/loop11,/dev/loop12,/dev/loop8,/dev/loop9
ARRAY /dev/md/r1 level=raid1 num-devices=2 container=/dev/md/ddf0
member=1 UUID=caae05ca:e07a497a:bd066562:b5164eea
   devices=/dev/loop8,/dev/loop9
ARRAY /dev/md/r5 level=raid5 num-devices=3 container=/dev/md/ddf0
member=2 UUID=29f6e6ea:16d4a6f7:1808b76e:33c50480
   devices=/dev/loop10,/dev/loop11,/dev/loop12

Regards
Martin


  reply	other threads:[~2013-06-27 18:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 20:21 [PATCH 1/2] select_devices: fix scanning of container members with dev list mwilck
2013-06-20 20:21 ` [PATCH 2/2] Detail: deterministic ordering in --brief --verbose mwilck
2013-06-20 20:26   ` Martin Wilck
2013-06-24  6:57   ` NeilBrown
2013-06-24  6:55 ` [PATCH 1/2] select_devices: fix scanning of container members with dev list NeilBrown
2013-06-27 18:15   ` Martin Wilck [this message]
2013-06-27 19:38     ` Martin Wilck
2013-07-02  1:20       ` NeilBrown

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=51CC812C.3030500@arcor.de \
    --to=mwilck@arcor.de \
    --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 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.