[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] [w@...112...: Re: nbd-client started at boot (for root device) is not persistent]



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: