Creating an NVMe-oF Storage Target

Configure the NVMe over Fabrics (NVMe-oF) storage targets to create Oracle ASM disk groups that store Oracle Grid Infrastructure and Oracle Database files.

The following configuration steps create an NVMe-oF storage target with 4 devices: /dev/nvme0n1, /dev/nvme1n1, /dev/nvme2n1, and /dev/nvme3n1. Complete these steps on all the storage target servers.
  1. Log in as root.
  2. Load the NVMe TCP module, if it is not already loaded.
    modprobe nvmet_tcp
  3. Install the nvmetcli package.
    yum install nvmetcli
  4. Start nvmetcli to configure the subsystems and the NVMe ports on the target.
    nvmetcli
  5. Create a unique NVMe Qualified Name (NQN) on the storage target in the subsystems directory.
    cd subsystems/
    create nqn=storagenode1.domainname.com:nvme

    Note:

    You must specify a unique NQN for each storage target.
  6. Enable all storage targets to use the subsystem.
    cd storagenode1.domainname.com:nvme/
    set attr allow_any_host=1
  7. Create namespace ID (NSID) for each storage block.
    cd namespaces/
    create nsid=1
    create nsid=2
    create nsid=3
    create nsid=4
  8. Set the namespace device paths and enable them.
    cd 1/
    set device path=/dev/nvme0n1
    enable
    Repeat these commands for all the NSIDs.
  9. Create a port ID for the NVMe target port.
    cd /
    create portid=1
    cd 1/
    set addr adrfam=ipv4
    set addr trtype=tcp
    set addr traddr=192.168.1.11
    set addr trsvcid=4091
    The input value for the port ID must be a positive integer, either 1 or greater.
  10. Create a unique NVMe Qualified Name (NQN) for the NVMe target port in the /ports/1/subsystems directory.
    cd /ports/1/subsystems
    create nqn=storagenode1.domainname.com:nvme
  11. Verify the NVMe storage target configuration that you configured.
    cd /
    ls
    o- / ............................................................................................................ [...]
    o- hosts  ....................................................................................................... [...]
    o- ports  ....................................................................................................... [...]
    | o- 1    ..................................... [trtype=tcp, traddr=192.168.1.11, trsvcid=4091, inline_data_size=16384]
    |   o- ana_groups ............................................................................................... [...]
    |   | o- 1 .......................................................................................... [state=optimized]
    |   o- referrals ................................................................................................ [...]
    |   o- subsystems ............................................................................................... [...]
    |     o- storagenode1.domainname.com:nvme ....................................................................... [...]
    o- subsystems ................................................................................................... [...]
      o- storagenode1.domainname.com:nvme ......................... [version=1.3, allow_any=1, serial=82d982a387d72d99c09d]
        o- allowed_hosts............................................................................................. [...]
        o- namespaces................................................................................................ [...]
          o- 1 ........................... [path=/dev/nvme0n1, uuid=79058da3-ee7e-4e37-bd1d-e8375bff5027, grpid=1, enabled]
          o- 2 ........................... [path=/dev/nvme1n1, uuid=87f0b13b-1795-4da8-ba46-fce6c97403a5, grpid=1, enabled]
          o- 3 ........................... [path=/dev/nvme2n1, uuid=fe0f4720-2322-4df5-8da5-e43191e7b577, grpid=1, enabled]
          o- 4 ........................... [path=/dev/nvme3n1, uuid=3f79c5f0-4626-4991-a567-8ce9157a1559, grpid=1, enabled]
  12. Repeat steps 1 through 11 on each NVMe storage target node.