Skip to content

'block nbd0: Device being setup by another task' even after DISCONNECT and CLEAR_SOCK #60

@alexeicolin

Description

@alexeicolin

After my system lost network connectivity (due to kernel bug, workaround is ip link set down/up), nbd-client won't reconnect.

nbd-client[6704]: Negotiation: ..size = 76300MB
nbd-client[6704]: bs=512, sz=80006348800 bytes
nbd_client[6704]: Kernel doesn't support multiple connections
nbd_client[6704]: Exiting.
nbd-client[6704]: Error: Kernel doesn't support multiple connections
nbd-client[6704]: Exiting.

Kernel log:

block nbd0: Device being setup by another task

I wrote a C utility to send ioctl (DISCONNECT and CLEAR_SOCK), and I see log statements from nbd.c in the kernel log confirming the commands. But the above error condition still triggers.

I see that in the code NBD_BOUND is set, but is never reset. Is that by design? Should it be reset in the disconnect handler where task is set to NULL?
PS. FWIW, I added the clear of this bit there, and am running the modified kernel. If the network failure occurs again, I'll see if the patch changes anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions