From: Mike Accetta <maccetta-bounce@laurelnetworks.com>
To: linux-raid@vger.kernel.org
Subject: Partitioned arrays initially missing from /proc/partitions
Date: Fri, 01 Dec 2006 15:53:13 -0500 [thread overview]
Message-ID: <45709639.70104@laurelnetworks.com> (raw)
In setting up a partitioned array as the boot disk and using a nash
initrd to find the root file system by volume label, I see a delay in
the appearance of the /dev/md_d0p partitions in /proc/partitions. When
the mdadm --assemble command completes, only /dev/md_d0 is visible.
Since the raid partitions are not visible after the assemble, the volume
label search will not consult them in looking for the root volume and
the boot gets aborted. When I run a similar assemble command while up
multi-user in a friendlier debug environment I see the same effect and
observe that pretty much any access of /dev/md_d0 has the side effect of
then making the /dev/md_d0p partitions visible in /proc/partitions.
I tried a few experiments changing the --assemble code in mdadm. If I
open() and close() /dev/md_d0 after assembly *before* closing the file
descriptor which the assemble step used to assemble the array, there is
no effect. Even doing a BLKRRPART ioctl call on the assembly fd or the
newly opened fd have no effect. The kernel prints "unknown partition"
diagnostics on the console. However, if the assembly fd is first
close()'d, a simple open() of /dev/md_d0 and immediate close() of that
fd has the side effect of making the /dev/md_d0p partitions visible and
one sees the console disk partitioning confirmation from the kernel as well.
Adding the open()/close() after assembly within mdadm solves my problem,
but I thought I'd raise the issue on the list as it seems there is a bug
somewhere. I see in the kernel md driver that the RUN_ARRAY ioctl()
calls do_md_run() which calls md_probe() which calls add_disk() and I
gather that this would normally have the side effect of making the
partitions visible. However, my experiments at user level seem to imply
that the array isn't completely usable until the assembly file
descriptor is closed, even on return from the ioctl(), and hence the
kernel add_disk() isn't having the desired partitioning side effect at
the point it is being invoked.
This is all with kernel 2.6.18 and mdadm 2.3.1
--
Mike Accetta
ECI Telecom Ltd.
Data Networking Division (previously Laurel Networks)
next reply other threads:[~2006-12-01 20:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 20:53 Mike Accetta [this message]
2007-04-23 14:56 ` Partitioned arrays initially missing from /proc/partitions David Greaves
2007-04-23 19:31 ` Mike Accetta
2007-04-23 23:52 ` Neil Brown
2007-04-24 9:22 ` David Greaves
2007-04-24 10:57 ` Neil Brown
2007-04-24 12:00 ` David Greaves
2007-04-24 10:49 ` David Greaves
2007-04-24 11:38 ` Neil Brown
2007-04-24 12:32 ` David Greaves
2007-05-07 8:28 ` David Greaves
2007-05-07 9:01 ` Neil Brown
2007-04-24 15:39 ` Doug Ledford
2007-04-24 9:37 ` David Greaves
2007-04-24 9:46 ` David Greaves
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=45709639.70104@laurelnetworks.com \
--to=maccetta-bounce@laurelnetworks.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;
as well as URLs for NNTP newsgroup(s).