Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot properly manage IPv6 port #7

Open
nivex opened this issue Mar 14, 2025 · 0 comments
Open

cannot properly manage IPv6 port #7

nivex opened this issue Mar 14, 2025 · 0 comments

Comments

@nivex
Copy link

nivex commented Mar 14, 2025

I was able to use nvmet to create an IPv6 port:

root@athens:~# nvmet port add 1 tcp [::]:4420
root@athens:~# nvmet port add-subsystem 1 nqn.2000-12.net.nivex:storage.donatello

but on completion nvmet cannot see what it has done:

root@athens:~# nvmet port show
Configured ports: 0

It does complete successfully:

root@athens:/sys/kernel/config/nvmet/ports/1# grep '' addr_*
addr_adrfam:ipv6
addr_traddr:::
addr_treq:not specified
addr_trsvcid:4420
addr_trtype:tcp

I see tcp/4420 listening and I'm able to connect from the initiator.

This unfortunately also means the state that gets saved does not include port information:

root@athens:~# nvmet state save /tmp/nvmet.state 
Sucessfully written current state to file.
root@athens:~# cat /tmp/nvmet.state 
version: 0
subsystems:
  nqn.2000-12.net.nivex:storage.donatello:
    model: Linux
    serial: d3a05bc4e228683cdbfc
    allowed_hosts: []
    namespaces:
      1:
        enabled: true
        device_path: /dev/dm-2
        device_uuid: 979c4591-d634-4235-a2da-74c0e3d8b3d5
        device_nguid: 00000000-0000-0000-0000-000000000000
ports: {}

Trying to edit the YAML by hand to force a restore also fails:

root@athens:~# nvmet state clear
Sucessfully cleared configuration: 1 state changes.
root@athens:~# cat /tmp/nvmet.state 
version: 0
subsystems:
  nqn.2000-12.net.nivex:storage.donatello:
    model: Linux
    serial: d3a05bc4e228683cdbfc
    allowed_hosts: []
    namespaces:
      1:
        enabled: true
        device_path: /dev/dm-2 
        device_uuid: 979c4591-d634-4235-a2da-74c0e3d8b3d5
        device_nguid: 00000000-0000-0000-0000-000000000000
ports:
  1:
    port_type: Tcp
    port_addr: '[::]:4420'
    subsystems:
    - nqn.2000-12.net.nivex:storage.donatello

root@athens:~# nvmet state restore /tmp/nvmet.state 
Error: Failed to apply state delta between current and saved state

Caused by:
    0: Failed to create directory of port 1
    1: File exists (os error 17)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant