NetworkBlockDevice / nbd

Network Block Device
GNU General Public License v2.0
459 stars 119 forks source link

nbd-client fails to allow "-d" disconnect after server disconnect #94

Open tomjridge opened 5 years ago

tomjridge commented 5 years ago

After a server crash, I restart and try to reconnect with nbd-client:

$ ~ $ sudo nbd-client localhost /dev/nbd0
Warning: the oldstyle protocol is no longer supported.
This method now uses the newstyle protocol with a default export
Negotiation: ..size = 1024MB
bs=1024, sz=1073741824 bytes
Error: Kernel doesn't support multiple connections

Exiting.

I read the man page, and try various things:

$ ~ $ sudo nbd-client -d /dev/nbd0
disconnect, sock, done

However, I still get the "multiple connections" error. And if I try to disconnect again, I get disconnect, sock, done again (and again and again).

I also try:

$ ~ $ sudo nbd-client -c /dev/nbd0
11357

So it looks like the kernel thinks that nbd0 is still connected.

tomjridge commented 5 years ago

This is with an nbdkit server.

yoe commented 5 years ago

@josefbacik

tomjridge commented 5 years ago

Another thing: after the server crash, something on the client "segfaults". Presumably something to do with the nbd-client that was running.