Skip to content

Consumed connection cannot be reused after disconnect #126

@Gnlfz007

Description

@Gnlfz007

On my NAS (Ubuntu-20.04), I defined a volume with option "maxconnections=1, as a workaround for exclusive volume export. This way I want to ensure that my Laptop and my PC do not corrupt a LUKS/ext4 volume accidentally via concurrent mount.

[vol-test]
exportname=/dat/nbd-export/vol-test
maxconnections=1

On the client, the following commands result in an unexpected error message:

> sudo nbd-client my_nas -N vol-test /dev/nbd0
Negotiation: ..size = 1024MB
Connected /dev/nbd0
> sudo nbd-client -d /dev/nbd0
> sudo nbd-client my_nas -N vol-test /dev/nbd0
Negotiation: ..Error: Connection not allowed by server policy. Server said: Access denied by server configurationguration for th�
Exiting.

The only cure I know is systemctl restart nbd-server on the server. Is this an expected behavior, or rather a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions