Wouter Verhelst wrote: > 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.
Sounds reasonable to me. I'm not sure I understand the need to disconnect though. What is the issue that occurs if you don't disconnect? > 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. Yes, there is a hook that md, for example, uses to stop all md devices at shutdown time. Shouldn't be hard to get nbd to use that. -- Paul ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
