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

[Nbd] Root-on-NBD

Hi Paul,

Recently (that is, a few months ago), I did some initramfs hooks for
Debian to allow the root filesystem to be on an NBD device. They work
well, but Vagrant Cascadian (who maintains LTSP in Debian, which can
optionally use NBD for quite a few things) pointed out one issue with
this: when the system shuts down, there's no point in which userspace
can safely issue an nbd disconnect message to the kernel anymore. As
such, you rely on the TCP keepalive probes, which on a server serving
for a high amount of clients (as is common in LTSP environments) might
be problematic. Userspace can't do this, because that'd mean both
poweroff and nbd-client would need to be the very last command issued in
the shutdown sequence (running either makes doing the other impossible),
so that's a non-option.

As such, I thought it'd make sense to have the NBD kernel module do so.
Since the software-RAID subsystems seems to do a final sync right before
a system poweroff occurs, I presume there's support in the kernel to
hook into the poweroff sequence, and do some final cleanup operation. If
NBD could hook into that and at that point just send an NBD_DISCONNECT
message to the server, that would solve this issue.

What do you think about that?

The biometric identification system at the gates of the CIA headquarters
works because there's a guard with a large gun making sure no one is
trying to fool the system.

Reply to: