public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: NeilBrown <neilb@suse.de>
Cc: Doug Ledford <dledford@redhat.com>,
	Goswin von Brederlow <goswin-v-b@web.de>,
	LinuxRaid RAID <linux-raid@vger.kernel.org>
Subject: Re: [Patch] mdadm: move mdadm.map file into /dev/md
Date: Wed, 08 Apr 2009 02:15:06 +0200	[thread overview]
Message-ID: <87prfof1bp.fsf@frosties.localdomain> (raw)
In-Reply-To: <155bf3edda1c2692d316807ff5f58f30.squirrel@neil.brown.name> (NeilBrown's message of "Wed, 8 Apr 2009 07:26:24 +1000 (EST)")

"NeilBrown" <neilb@suse.de> writes:

> On Tue, April 7, 2009 10:16 pm, Doug Ledford wrote:
>> On Apr 7, 2009, at 2:05 AM, Goswin von Brederlow wrote:
>>> Doug Ledford <dledford@redhat.com> writes:
>>>
>>>> Originally, mdadm used /var/run/mdadm/mdadm.map file to store the
>>>> temporary mappings of incrementally added devices to device names.
>>>> Unfortunately, this breaks incremental assembly if used early in the
>>>> booting process.  Specifically, root may still be read only.  Since
>>>> incremental assembly is largely a udev specific feature, and udev
>>>> needs a writable /dev tmpfs mount even when root is still read only,
>>>> it's safer to put our mdadm.map file in /dev/md so that we can write
>>>> to the map file no matter how early in the boot process we are
>>>> attempting to use incremental assembly.
>>>
>>> What about /lib/init/rw?
>>
>> Never heard of it.  But, if / is read-only, why wouldn't that also be
>> read-only?
>
> because a tmpfs was mounted there.  It's probably a Debian-specific
> thing.
>
> Why /var/run cannot be mounted from tmpfs nice and early too I don't know..

Because /var is not yet mounted.

You would have to create /var/run on the / filesystem, mount a tmpfs
there early during boot. Then later you would have to move the
filesystem somwhere else (/tmp/run?), mount /var and move it back. And
you would have a race condition where /var/run is not available for a
while.

> I understand that some people think /var/run needs to persist across
> reboots to preserve ownership of directories, but they are wrong :-)
> /var/run should be a tmpfs mount point very early.

Which Ubuntu defaults to and Debian is supporting but not defaulting to.

> I have to say that putting the map file in /dev feels very icky
> to me.  It isn't a device, and so doesn't belong in /dev.
> If we go around putting things somewhere convenient rather than
> where they belong, we quickly end up with a mess.
>
> So while it might be very pragmatic, I am currently dis-inclined
> to take the patch.   Can you try asking your boot-script people
> to make /var/run be an early tmpfs ???

Having /var/run early just complicates things needlessly.

Maybe mdadm should just have

  -m, --map <file>
     Filename of the map file for incremental operations. Defaults
     to /var/run/mdadm.map. Note that the default path might not exist
     or be read-only early in the boot process in which case a
     suitable alternative must be specified.

Wouldn't that be more flexible?

Debian could then set 'MAP /lib/init/rw' in its mdadm.conf.

> NeilBrown

MfG
        Goswin

  parent reply	other threads:[~2009-04-08  0:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 14:52 [Patch] mdadm: move mdadm.map file into /dev/md Doug Ledford
2009-04-06 19:36 ` Luca Berra
2009-04-07  6:05 ` Goswin von Brederlow
2009-04-07 10:55   ` Luca Berra
2009-04-07 21:04     ` Goswin von Brederlow
2009-04-07 12:16   ` Doug Ledford
2009-04-07 21:26     ` NeilBrown
2009-04-07 22:14       ` Doug Ledford
2009-04-08  6:38         ` Neil Brown
2009-04-09 19:28           ` Doug Ledford
2009-04-08  0:15       ` Goswin von Brederlow [this message]
2009-04-08  6:31         ` Neil Brown
2009-04-09 19:25           ` Doug Ledford
2009-04-14  1:12             ` 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=87prfof1bp.fsf@frosties.localdomain \
    --to=goswin-v-b@web.de \
    --cc=dledford@redhat.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