User Tools

Site Tools


nndocs:nvme-of

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
nndocs:nvme-of [2024/02/24 20:21] – updates naptasticnndocs:nvme-of [2025/10/26 23:45] (current) – snark +1 naptastic
Line 1: Line 1:
-TODO Please put storage traffic on its own IB subnet and limit things sanely. 
- 
-NQNs: nqn.2014-08.rocks.narf.hostname is the whole thing. No :01 or any of that jazz, at least not yet. 
- 
 The goal is to run everything over RDMA (InfiniBand specifically) and maybe have TCP as a fallback. (If TCP, then I probably want to try VMA... which I don't want to do.) The goal is to run everything over RDMA (InfiniBand specifically) and maybe have TCP as a fallback. (If TCP, then I probably want to try VMA... which I don't want to do.)
  
Line 10: Line 6:
 Create the subsystem: Create the subsystem:
     /> subsystems/ create nqn.2014-08.rocks.narf.southpark     /> subsystems/ create nqn.2014-08.rocks.narf.southpark
 +
 +NVMe calls network ports "service IDs", and has their own idea for "ports". Good for them.
  
 Create a port and set its properties: Create a port and set its properties:
Line 19: Line 17:
     /> ports/1/subsystems create nqn.2014-08.rocks.narf.southpark      /> ports/1/subsystems create nqn.2014-08.rocks.narf.southpark 
  
-NVMe uses "namespaces" (which are numbers) instead of LUNs. Good for them.+NVMe calls LUNs "namespaces" (which are numbers). Good for them.
  
-Create and share namespace:+Create, set, and enable namespace:
     /> subsystems/nqn.2014-08.rocks.narf.southpark/namespaces create 1     /> subsystems/nqn.2014-08.rocks.narf.southpark/namespaces create 1
-    /> subsystems/nqn.2014-08.rocks.narf.southpark/namespaces/1 set device path=/dev/nvme0n1 +    /> subsystems/nqn.2014-08.rocks.narf.southpark/namespaces/1 set device path=/dev/disk/by-id/nvme-eui.foo
-    Parameter path is now '/dev/nvme0n1'.+
     /> subsystems/nqn.2014-08.rocks.narf.southpark/namespaces/1 enable     /> subsystems/nqn.2014-08.rocks.narf.southpark/namespaces/1 enable
-    The Namespace has been enabled.+ 
 +Don't use /dev/nvme* names; they can change order on reboot.
  
 You can use a file as a backstore. The syntax is not at all obvious. Why "group=device"? Whatever: You can use a file as a backstore. The syntax is not at all obvious. Why "group=device"? Whatever:
     />subsystems/nqn.2014-08.rocks.narf.hostname/namespaces/1 set group=device path=/path/to/some/host.img     />subsystems/nqn.2014-08.rocks.narf.hostname/namespaces/1 set group=device path=/path/to/some/host.img
  
-I haven't checked if this works for partitions or SATA drives.+I haven't checked if this works for partitions or SATA drives, but I think it should?
  
 I haven't figured out ramdisks yet. There isn't a built-in system like in LIO. I haven't figured out ramdisks yet. There isn't a built-in system like in LIO.
Line 52: Line 50:
 Log in: Log in:
     # nvme connect -t rdma -n nqn.2014-08.rocks.narf.southpark -a 172.20.64.13 -s 4420     # nvme connect -t rdma -n nqn.2014-08.rocks.narf.southpark -a 172.20.64.13 -s 4420
 +
 +Rescan:
 +    # nvme ns-rescan /dev/nvme1
 +
 +  * If a namespace you expect to appear isn't appearing, check the target to see if you forget to enable it
 +
 +Disconnect a subsystem:
 +    # nvme disconnect -d /dev/nvme1
 +
 +Gotta admit, that feels a lot nicer than logging out of iscsiadm.
nndocs/nvme-of.1708806115.txt.gz · Last modified: 2024/02/24 20:21 by naptastic