Public bug reported: I'm using `nbd-server -c some-nbd-device` on my server, and "root=/dev/nbd0 nbdroot=server-ip,port" to netboot a client. It works beautifully, it's very fast and stable. But when the client shuts down, the connection is not closed and the .diff file generated on the server for the cow image is not deleted.
I don't know if there's a way for nbd-client to properly disconnect the nbd device on shutdown, as it's still in use. As a somewhat acceptable workaround, maybe nbd-client could send a special signal to the server "I'm about to die in a few seconds", so that the server automatically closes the connection after e.g. a minute? Temporarily I'm working around the problem by running "nbd-client -d /dev/nbd0; echo o > /proc/sysrq-trigger" in an upstart script, but that's too hackish. Of course if keepalive is enabled then nbd-server will close the connection after 2h 11m, but a solution within the nbd package would be preferable... ** Affects: nbd (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/696454 Title: NBD booted clients don't close the connection on shutdown -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs