nbd icon indicating copy to clipboard operation
nbd copied to clipboard

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

Open tomjridge opened this issue 5 years ago • 3 comments

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 avatar Jan 20 '19 20:01 tomjridge

This is with an nbdkit server.

tomjridge avatar Jan 20 '19 20:01 tomjridge

@josefbacik

yoe avatar Jan 21 '19 10:01 yoe

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

tomjridge avatar Jan 21 '19 11:01 tomjridge