Re: [Nbd] [w@...112...: Re: nbd-client started at boot (for root device) is not persistent]
- To: Alex Bligh <alex@...872...>
- Cc: "nbd-general@lists.sourceforge.net" <nbd-general@lists.sourceforge.net>
- Subject: Re: [Nbd] [w@...112...: Re: nbd-client started at boot (for root device) is not persistent]
- From: Wouter Verhelst <w@...112...>
- Date: Mon, 28 Nov 2016 20:23:04 +0100
- Message-id: <20161128192304.dwteh2x7xym767cl@...3...>
- In-reply-to: <F3D57B0E-0514-4202-BACF-7292EAB92431@...872...>
- References: <20161125080636.f6dsb6227ksazolh@...3...> <CAMOh2pLvgGXJ2YV4_W1bUo6VR3Mtemh8m-WYzNhhmQBt8QW3tw@...18...> <20161127162324.55mnsegroesep5td@...3...> <CAMOh2pK_rK126LNvCXzX_t9zjxFW4wJBOxJM6TenQrmeTBCXvA@...18...> <20161128174127.zehthzwyhofzapcj@...3...> <F3D57B0E-0514-4202-BACF-7292EAB92431@...872...>
On Mon, Nov 28, 2016 at 05:49:40PM +0000, Alex Bligh wrote:
>
> > On 28 Nov 2016, at 17:41, Wouter Verhelst <w@...112...> wrote:
> >
> > What I'm suggesting is that the parent process negotiates everything,
> > but that it does the fork() call only just before doing the NBD_DO_IT
> > ioctl(). At that point, we've already negotiated, and there is very
> > little that can go wrong anymore. The child process will need to wait a
> > short while to avoid the obvious race (although a second might indeed be
> > overdoing it), but beyond that it should be good.
>
> I will admit to not following this in complete detail, but this sounds
> to me like a systemd problem / thinko, rather than an nbd client
> thinko.
It's actually an initramfs-utils thing, which assumes that once things
are set up, we don't need the initramfs filesystem anymore. This is
correct, usually; the reconnect for a -persist nbd-client is a very
unusual thing for an initramfs-started process to do (but necessary,
none the less).
> I suppose it would be possible to specify some sort of external command
> that could be run when (re)mounting, or (if run under systemd) send it
> some form of message ...
That can't work. You're dealing with a situation where the root
filesystem is unavailable until the reconnect has finished, and the
initramfs filesystem (to which we're chrooted) has been cleared...
--
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
people in the world who think they really understand all of its rules,
and pretty much all of them are just lying to themselves too.
-- #debian-devel, OFTC, 2016-02-12
Reply to: