Skip to main content
ONTAP SAN Host Utilities
La versione in lingua italiana fornita proviene da una traduzione automatica. Per eventuali incoerenze, fare riferimento alla versione in lingua inglese.

Configurare RHEL 9.6 per NVMe-oF con storage ONTAP

Collaboratori netapp-sarajane netapp-pcarriga

Gli host Red Hat Enterprise Linux (RHEL) supportano i protocolli NVMe su Fibre Channel (NVMe/FC) e NVMe su TCP (NVMe/TCP) con Asymmetric Namespace Access (ANA). ANA fornisce funzionalità multipathing equivalenti all'accesso asimmetrico alle unità logiche (ALUA) negli ambienti iSCSI e FCP.

Scopri come configurare gli host NVMe over Fabrics (NVMe-oF) per Red Hat Enterprise Linux (RHEL) 9.6. Per ulteriori informazioni sul supporto e sulle funzionalità, vedere"Panoramica NVME-oF" .

NVMe-oF con RHEL 9.6 presenta le seguenti limitazioni note:

  • Evitare di emettere il nvme disconnect-all comando sui sistemi che si avviano da SAN tramite namespace NVMe-TCP o NVMe-FC perché disconnette sia i file system root che quelli dati e potrebbe causare instabilità del sistema.

Passaggio 1: Se lo si desidera, attivare l'avvio SAN

È possibile configurare l'host per utilizzare l'avvio SAN per semplificare la distribuzione e migliorare la scalabilità. Utilizzare il"Tool di matrice di interoperabilità" per verificare che il sistema operativo Linux, l'adattatore bus host (HBA), il firmware HBA, il BIOS di avvio HBA e la versione ONTAP supportino l'avvio SAN.

Fasi
  1. "Crea uno spazio dei nomi NVMe e mappalo all'host" .

  2. Abilitare l'avvio SAN nel BIOS del server per le porte su cui è mappato lo spazio dei nomi di avvio SAN.

    Per informazioni su come attivare il BIOS HBA, consultare la documentazione specifica del vendor.

  3. Riavviare l'host e verificare che il sistema operativo sia attivo e funzionante.

Passaggio 2: verificare la versione del software e la configurazione NVMe

Verificare che il sistema soddisfi i requisiti software e verificare le installazioni dei pacchetti NVMe e la configurazione dell'host.

Fasi
  1. Installare RHEL 9.6 sul server. Una volta completata l'installazione, verificare di avere installato il kernel RHEL 9.6 richiesto:

    uname -r

    Esempio di versione del kernel RHEL:

    5.14.0-570.12.1.el9_6.x86_64
  2. Installare nvme-cli pacchetto:

    rpm -qa|grep nvme-cli

    L'esempio seguente mostra un nvme-cli versione del pacchetto:

    nvme-cli-2.11-5.el9.x86_64
  3. Installare libnvme pacchetto:

    rpm -qa|grep libnvme

    L'esempio seguente mostra un libnvme versione del pacchetto:

    libnvme-1.11.1-1.el9.x86_64
  4. Sull'host, controlla la stringa hostnqn in /etc/nvme/hostnqn :

    cat /etc/nvme/hostnqn

    L'esempio seguente mostra un hostnqn versione:

    nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0056-5410-8048-b9c04f425633
  5. Verificare che il hostnqn la stringa corrisponde a. hostnqn Stringa per il sottosistema corrispondente sull'array ONTAP:

    ::> vserver nvme subsystem host show -vserver vs_nvme_194_rhel96
    Mostra esempio
    Vserver Subsystem Priority  Host NQN
    ------- --------- --------  ------------------------------------------------
    vs_ nvme_194_rhel96
            nvme4
                      regular   nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0056-5410-8048- c7c04f425633
            nvme_1
                      regular   nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0056-5410-8048- c7c04f425633
            nvme_2
                      regular   nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0056-5410-8048- c7c04f425633
            nvme_3
                      regular   nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0056-5410-8048- c7c04f425633
    4 entries were displayed.
Nota Se il hostnqn le stringhe non corrispondono, utilizzare il vserver modify comando per aggiornare il hostnqn stringa sul sottosistema del sistema di archiviazione ONTAP corrispondente per abbinare hostnqn stringa da /etc/nvme/hostnqn sull'ospite.

Passaggio 3: configurare NVMe/FC e NVMe/TCP

Configurare NVMe/FC con adattatori Broadcom/Emulex o Marvell/QLogic oppure configurare NVMe/TCP utilizzando operazioni di rilevamento e connessione manuali.

FC - Broadcom/Emulex

Configurare NVMe/FC per un adattatore Broadcom/Emulex.

Fasi
  1. Verificare di utilizzare il modello di adattatore supportato:

    1. Visualizza i nomi dei modelli:

      cat /sys/class/scsi_host/host*/modelname

      Viene visualizzato il seguente output:

      LPe36002-M64
      LPe36002-M64
    2. Visualizza le descrizioni dei modelli:

      cat /sys/class/scsi_host/host*/modeldesc

      Dovresti vedere un output simile al seguente esempio:

    Emulex LightPulse LPe36002-M64 2-Port 64Gb Fibre Channel Adapter
    Emulex LightPulse LPe36002-M64 2-Port 64Gb Fibre Channel Adapter
  2. Verificare di utilizzare il Broadcom consigliato lpfc firmware e driver della posta in arrivo:

    1. Visualizza la versione del firmware:

      cat /sys/class/scsi_host/host*/fwrev

      Il comando restituisce le versioni del firmware:

      14.0.539.16, sli-4:6:d
      14.0.539.16, sli-4:6:d
    2. Visualizza la versione del driver in arrivo:

      cat /sys/module/lpfc/version

      L'esempio seguente mostra la versione del driver:

      0:14.4.0.6

    Per l'elenco aggiornato dei driver della scheda di rete supportati e delle versioni del firmware, vedere "Tool di matrice di interoperabilità".

  3. Verificare che lpfc_enable_fc4_type è impostato su 3:

    cat /sys/module/lpfc/parameters/lpfc_enable_fc4_type
  4. Verificare che sia possibile visualizzare le porte dell'iniziatore:

    cat /sys/class/fc_host/host*/port_name

    L'esempio seguente mostra le identità delle porte:

    0x2100f4c7aa0cd7c2
    0x2100f4c7aa0cd7c3
  5. Verificare che le porte dell'iniziatore siano in linea:

    cat /sys/class/fc_host/host*/port_state

    Viene visualizzato il seguente output:

    Online
    Online
  6. Verificare che le porte iniziatore NVMe/FC siano abilitate e che le porte di destinazione siano visibili:

    cat /sys/class/scsi_host/host*/nvme_info
    Mostra esempio
    NVME Initiator Enabled
    XRI Dist lpfc0 Total 6144 IO 5894 ELS 250
    NVME LPORT lpfc0 WWPN x100000109b954518 WWNN x200000109b954518 DID x000000 ONLINE
    
    NVME Statistics
    LS: Xmt 0000000000 Cmpl 0000000000 Abort 00000000
    LS XMIT: Err 00000000  CMPL: xb 00000000 Err 00000000
    Total FCP Cmpl 0000000000000000 Issue 0000000000000000 OutIO 0000000000000000
              abort 00000000 noxri 00000000 nondlp 00000000 qdepth 00000000 wqerr 00000000 err 00000000
    FCP CMPL: xb 00000000 Err 00000000
    
    NVME Initiator Enabled
    XRI Dist lpfc1 Total 6144 IO 5894 ELS 250
    NVME LPORT lpfc1 WWPN x100000109b954519 WWNN x200000109b954519 DID x020500 ONLINE
    
    NVME Statistics
    LS: Xmt 0000000000 Cmpl 0000000000 Abort 00000000
    LS XMIT: Err 00000000  CMPL: xb 00000000 Err 00000000
    Total FCP Cmpl 0000000000000000 Issue 0000000000000000 OutIO 0000000000000000
             abort 00000000 noxri 00000000 nondlp 00000000 qdepth 00000000 wqerr 00000000 err 00000000
    FCP CMPL: xb 00000000 Err 00000000
    
    NVME Initiator Enabled
    XRI Dist lpfc2 Total 6144 IO 5894 ELS 250
    NVME LPORT lpfc2 WWPN x100000109bf044b1 WWNN x200000109bf044b1 DID x022a00 ONLINE
    NVME RPORT       WWPN x200bd039eaa7dfc8 WWNN x2008d039eaa7dfc8 DID x021319 TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x2155d039eaa7dfc8 WWNN x2154d039eaa7dfc8 DID x02130f TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x2001d039eaa7dfc8 WWNN x2000d039eaa7dfc8 DID x021310 TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x200dd039eaa7dfc8 WWNN x2008d039eaa7dfc8 DID x020b15 TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x2156d039eaa7dfc8 WWNN x2154d039eaa7dfc8 DID x020b0d TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x2003d039eaa7dfc8 WWNN x2000d039eaa7dfc8 DID x020b10 TARGET DISCSRVC ONLINE
    
    NVME Statistics
    LS: Xmt 0000003049 Cmpl 0000003049 Abort 00000000
    LS XMIT: Err 00000000  CMPL: xb 00000000 Err 00000000
    Total FCP Cmpl 0000000018f9450b Issue 0000000018f5de57 OutIO fffffffffffc994c
              abort 000036d3 noxri 00000313 nondlp 00000c8d qdepth 00000000 wqerr 00000064 err 00000000
    FCP CMPL: xb 000036d1 Err 000fef0f
    
    NVME Initiator Enabled
    XRI Dist lpfc3 Total 6144 IO 5894 ELS 250
    NVME LPORT lpfc3 WWPN x100000109bf044b2 WWNN x200000109bf044b2 DID x021b00 ONLINE
    NVME RPORT       WWPN x2062d039eaa7dfc8 WWNN x2008d039eaa7dfc8 DID x022915 TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x2157d039eaa7dfc8 WWNN x2154d039eaa7dfc8 DID x02290f TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x2002d039eaa7dfc8 WWNN x2000d039eaa7dfc8 DID x022910 TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x2065d039eaa7dfc8 WWNN x2008d039eaa7dfc8 DID x020119 TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x2158d039eaa7dfc8 WWNN x2154d039eaa7dfc8 DID x02010d TARGET DISCSRVC ONLINE
    NVME RPORT       WWPN x2004d039eaa7dfc8 WWNN x2000d039eaa7dfc8 DID x020110 TARGET DISCSRVC ONLINE
    
    NVME Statistics
    LS: Xmt 0000002f2c Cmpl 0000002f2c Abort 00000000
    LS XMIT: Err 00000000  CMPL: xb 00000000 Err 00000000
    Total FCP Cmpl 000000001aaf3eb5 Issue 000000001aab4373 OutIO fffffffffffc04be
              abort 000035cc noxri 0000038c nondlp 000009e3 qdepth 00000000 wqerr 00000082 err 00000000
    FCP CMPL: xb 000035cc Err 000fcfc0
FC - Marvell/QLogic

Configurare NVMe/FC per un adattatore Marvell/QLogic.

Fasi
  1. Verificare di utilizzare le versioni supportate del driver e del firmware dell'adattatore:

    cat /sys/class/fc_host/host*/symbolic_name

    L'esempio seguente mostra le versioni del driver e del firmware:

    QLE2872 FW:v9.15.00 DVR:v10.02.09.300-k
    QLE2872 FW:v9.15.00 DVR:v10.02.09.300-k
  2. Verificare che ql2xnvmeenable è impostato. Ciò consente all'adattatore Marvell di funzionare come iniziatore NVMe/FC:

    cat /sys/module/qla2xxx/parameters/ql2xnvmeenable

    L'uscita prevista è 1.

TCP

Il protocollo NVMe/TCP non supporta l'operazione di connessione automatica. In alternativa, è possibile scoprire i sottosistemi e gli spazi dei nomi NVMe/TCP eseguendo l'NVMe/TCP connect O connect-all operazioni manualmente.

Fasi
  1. Verificare che la porta di avvio possa ottenere i dati della pagina del registro di individuazione attraverso i LIF NVMe/TCP supportati:

    nvme discover -t tcp -w host-traddr -a traddr
    Mostra esempio
    nvme discover -t tcp -w 192.168.20.1 -a 192.168.20.20
    
    Discovery Log Number of Records 8, Generation counter 18
    =====Discovery Log Entry 0======
    trtype:  tcp
    adrfam:  ipv4
    subtype: current discovery subsystem
    treq:    not specified
    portid:  4
    trsvcid: 8009
    subnqn:  nqn.1992-08.com.netapp:sn.64e65e6caae711ef9668d039ea951c46:discovery
    traddr:  192.168.21.21
    eflags:  explicit discovery connections, duplicate discovery information
    sectype: none
    =====Discovery Log Entry 1======
    trtype:  tcp
    adrfam:  ipv4
    subtype: current discovery subsystem
    treq:    not specified
    portid:  2
    trsvcid: 8009
    subnqn:  nqn.1992-08.com.netapp:sn.64e65e6caae711ef9668d039ea951c46:discovery
    traddr:  192.168.20.21
    eflags:  explicit discovery connections, duplicate discovery information
    sectype: none
    =====Discovery Log Entry 2======
    trtype:  tcp
    adrfam:  ipv4
    subtype: current discovery subsystem
    treq:    not specified
    portid:  3
    trsvcid: 8009
    subnqn:  nqn.1992-08.com.netapp:sn.64e65e6caae711ef9668d039ea951c46:discovery
    traddr:  192.168.21.20
    eflags:  explicit discovery connections, duplicate discovery information
    sectype: none
    =====Discovery Log Entry 3======
    trtype:  tcp
    adrfam:  ipv4
    subtype: current discovery subsystem
    treq:    not specified
    portid:  1
    trsvcid: 8009
    subnqn:  nqn.1992-08.com.netapp:sn.64e65e6caae711ef9668d039ea951c46:discovery
    traddr:  192.168.20.20
    eflags:  explicit discovery connections, duplicate discovery information
    sectype: none
    =====Discovery Log Entry 4======
    trtype:  tcp
    adrfam:  ipv4
    subtype: nvme subsystem
    treq:    not specified
    portid:  4
    trsvcid: 4420
    subnqn:  nqn.1992-08.com.netapp:sn.64e65e6caae711ef9668d039ea951c46:subsystem.rhel96_tcp_subsystem
    traddr:  192.168.21.21
    eflags:  none
    sectype: none
    =====Discovery Log Entry 5======
    trtype:  tcp
    adrfam:  ipv4
    subtype: nvme subsystem
    treq:    not specified
    portid:  2
    trsvcid: 4420
    subnqn:  nqn.1992-08.com.netapp:sn.64e65e6caae711ef9668d039ea951c46:subsystem.rhel96_tcp_subsystem
    traddr:  192.168.20.21
    eflags:  none
    sectype: none
    =====Discovery Log Entry 6======
    trtype:  tcp
    adrfam:  ipv4
    subtype: nvme subsystem
    treq:    not specified
    portid:  3
    trsvcid: 4420
    subnqn:  nqn.1992-08.com.netapp:sn.64e65e6caae711ef9668d039ea951c46:subsystem.rhel96_tcp_subsystem
    traddr:  192.168.21.20
    eflags:  none
    sectype: none
    =====Discovery Log Entry 7======
    trtype:  tcp
    adrfam:  ipv4
    subtype: nvme subsystem
    treq:    not specified
    portid:  1
    trsvcid: 4420
    subnqn:  nqn.1992-08.com.netapp:sn.64e65e6caae711ef9668d039ea951c46:subsystem.rhel96_tcp_subsystem
    traddr:  192.168.20.20
    eflags:  none
    sectype: none
  2. Verificare che le altre combinazioni LIF NVMe/TCP initiator-target riescano a recuperare correttamente i dati della pagina del registro di individuazione:

    nvme discover -t tcp -w host-traddr -a traddr
    Mostra esempio
    nvme discover -t tcp -w 192.168.20.1 -a 192.168.20.20
    nvme discover -t tcp -w 192.168.21.1 -a 192.168.21.20
    nvme discover -t tcp -w 192.168.20.1 -a 192.168.20.21
    nvme discover -t tcp -w 192.168.21.1 -a 192.168.21.21
  3. Eseguire nvme connect-all Command tra tutti i LIF target initiator NVMe/TCP supportati nei nodi:

    nvme connect-all -t tcp -w host-traddr -a traddr
    Mostra esempio
    nvme	connect-all	-t	tcp	-w	192.168.20.1	-a	192.168.20.20
    nvme	connect-all	-t	tcp	-w	192.168.21.1	-a	192.168.21.20
    nvme	connect-all	-t	tcp	-w	192.168.20.1	-a	192.168.20.21
    nvme	connect-all	-t	tcp	-w	192.168.21.1	-a	192.168.21.21

A partire da RHEL 9.4, l'impostazione per NVMe/TCP ctrl_loss_tmo timeout viene automaticamente impostato su "off". Di conseguenza:

  • Non ci sono limiti al numero di tentativi (tentativi illimitati).

  • Non è necessario configurare manualmente uno specifico ctrl_loss_tmo timeout durata quando si utilizza il nvme connect O nvme connect-all comandi (opzione -l ).

  • I controller NVMe/TCP non subiscono timeout in caso di errore del percorso e rimangono connessi indefinitamente.

Modificare la iopolicy nelle regole udev

RHEL 9.6 imposta l'iopolicy predefinito per NVMe-oF su round-robin . Se vuoi cambiare iopolicy in queue-depth , modificare il file delle regole udev come segue:

  1. Aprire il file delle regole udev in un editor di testo con privilegi di root:

    /usr/lib/udev/rules.d/71-nvmf-netapp.rules

    Viene visualizzato il seguente output:

    vi /usr/lib/udev/rules.d/71-nvmf-netapp.rules
  2. Trova la riga che imposta iopolicy per NetApp ONTAP Controller.

    L'esempio seguente mostra una regola di esempio:

    ACTION=="add", SUBSYSTEM=="nvme-subsystem", ATTR{subsystype}=="nvm", ATTR{model}=="NetApp ONTAP Controller", ATTR{iopolicy}="round-robin"
  3. Modificare la regola in modo che round-robin diventa queue-depth :

    ACTION=="add", SUBSYSTEM=="nvme-subsystem", ATTR{subsystype}=="nvm", ATTR{model}=="NetApp ONTAP Controller", ATTR{iopolicy}="queue-depth"
  4. Eseguire i seguenti comandi per ricaricare le regole udev e applicare le modifiche:

    udevadm control --reload
    udevadm trigger --subsystem-match=nvme-subsystem
  5. Verificare l'attuale iopolicy per il sottosistema. Sostituisci <sottosistema> con il nome appropriato, ad esempio, nvme-subsys0 .

    cat /sys/class/nvme-subsystem/<subsystem>/iopolicy

    Viene visualizzato il seguente output:

    queue-depth.
Nota La nuova iopolicy si applica automaticamente ai dispositivi NetApp ONTAP Controller corrispondenti. Non è necessario alcun riavvio.

Passaggio 4: facoltativamente, abilitare 1 MB I/O per NVMe/FC

ONTAP segnala una dimensione massima di trasferimento dati (MDTS) pari a 8 nei dati Identify Controller. Ciò significa che la dimensione massima della richiesta di I/O può arrivare fino a 1 MB. Per emettere richieste di I/O di dimensione 1 MB per un host Broadcom NVMe/FC, è necessario aumentare il lpfc valore del lpfc_sg_seg_cnt parametro a 256 dal valore predefinito di 64.

Nota Questi passaggi non si applicano agli host Qlogic NVMe/FC.
Fasi
  1. Impostare il lpfc_sg_seg_cnt parametro su 256:

    cat /etc/modprobe.d/lpfc.conf

    Dovresti vedere un output simile al seguente esempio:

    options lpfc lpfc_sg_seg_cnt=256
  2. Eseguire il dracut -f comando e riavviare l'host.

  3. Verificare che il valore per lpfc_sg_seg_cnt sia 256:

    cat /sys/module/lpfc/parameters/lpfc_sg_seg_cnt

Passaggio 5: verificare i servizi di avvio NVMe

IL nvmefc-boot-connections.service E nvmf-autoconnect.service servizi di avvio inclusi in NVMe/FC nvme-cli i pacchetti vengono abilitati automaticamente all'avvio del sistema.

Dopo aver completato l'avvio, verificare che nvmefc-boot-connections.service E nvmf-autoconnect.service i servizi di avvio sono abilitati.

Fasi
  1. Verificare che nvmf-autoconnect.service sia attivato:

    systemctl status nvmf-autoconnect.service
    Mostra output di esempio
    nvmf-autoconnect.service - Connect NVMe-oF subsystems automatically during boot
         Loaded: loaded (/usr/lib/systemd/system/nvmf-autoconnect.service; enabled; preset: disabled)
         Active: inactive (dead)
    
    Jun 10 04:06:26 SR630-13-201.lab.eng.btc.netapp.in systemd[1]: Starting Connect NVMe-oF subsystems automatically during boot...
    Jun 10 04:06:26 SR630-13-201.lab.eng.btc.netapp.in systemd[1]: nvmf-autoconnect.service: Deactivated successfully.
    Jun 10 04:06:26 SR630-13-201.lab.eng.btc.netapp.in systemd[1]: Finished Connect NVMe-oF subsystems automatically during boot.
  2. Verificare che nvmefc-boot-connections.service sia attivato:

    systemctl status nvmefc-boot-connections.service
    Mostra output di esempio
    nvmefc-boot-connections.service - Auto-connect to subsystems on FC-NVME devices found during boot
         Loaded: loaded (/usr/lib/systemd/system/nvmefc-boot-connections.service; enabled; preset: enabled)
         Active: inactive (dead) since Tue 2025-06-10 01:08:36 EDT; 2h 59min ago
       Main PID: 7090 (code=exited, status=0/SUCCESS)
            CPU: 30ms
    
    Jun 10 01:08:36 localhost systemd[1]: Starting Auto-connect to subsystems on FC-NVME devices found during boot...
    Jun 10 01:08:36 localhost systemd[1]: nvmefc-boot-connections.service: Deactivated successfully.
    Jun 10 01:08:36 localhost systemd[1]: Finished Auto-connect to subsystems on FC-NVME devices found during boot.

Passaggio 6: verificare la configurazione multipathing

Verificare che lo stato multipath NVMe in-kernel, lo stato ANA e i namespace ONTAP siano corretti per la configurazione NVMe-of.

Fasi
  1. Verificare che il multipath NVMe nel kernel sia attivato:

    cat /sys/module/nvme_core/parameters/multipath

    Viene visualizzato il seguente output:

    Y
  2. Verificare che le impostazioni NVMe-of appropriate (ad esempio, modello impostato su controller NetApp ONTAP e ipopolicy per il bilanciamento del carico impostato su round-robin) per i rispettivi spazi dei nomi ONTAP si riflettano correttamente sull'host:

    1. Visualizza i sottosistemi:

      cat /sys/class/nvme-subsystem/nvme-subsys*/model

      Viene visualizzato il seguente output:

      NetApp ONTAP Controller
      NetApp ONTAP Controller
    2. Visualizza la politica:

      cat /sys/class/nvme-subsystem/nvme-subsys*/iopolicy

      Viene visualizzato il seguente output:

    queue-depth
    queue-depth
  3. Verificare che gli spazi dei nomi siano stati creati e rilevati correttamente sull'host:

    nvme list
    Mostra esempio
    Node         SN                   Model
    ---------------------------------------------------------
    /dev/nvme4n1 81Ix2BVuekWcAAAAAAAB	NetApp ONTAP Controller
    
    
    Namespace Usage    Format             FW             Rev
    -----------------------------------------------------------
    1                 21.47 GB / 21.47 GB	4 KiB + 0 B   FFFFFFFF
  4. Verificare che lo stato del controller di ciascun percorso sia attivo e che abbia lo stato ANA corretto:

    NVMe/FC
    nvme list-subsys /dev/nvme4n5
    Mostra esempio
    nvme-subsys4 - NQN=nqn.1992-08.com.netapp:sn.3a5d31f5502c11ef9f50d039eab6cb6d:subsystem.nvme_1
                   hostnqn=nqn.2014-08.org.nvmexpress:uuid:e6dade64-216d-
    11ec-b7bb-7ed30a5482c3
    iopolicy=round-robin\
    +- nvme1 fc traddr=nn-0x2082d039eaa7dfc8:pn-0x2088d039eaa7dfc8,host_traddr=nn-0x20000024ff752e6d:pn-0x21000024ff752e6d live optimized
    +- nvme12 fc traddr=nn-0x2082d039eaa7dfc8:pn-0x208ad039eaa7dfc8,host_traddr=nn-0x20000024ff752e6d:pn-0x21000024ff752e6d live non-optimized
    +- nvme10 fc traddr=nn-0x2082d039eaa7dfc8:pn-0x2087d039eaa7dfc8,host_traddr=nn-0x20000024ff752e6c:pn-0x21000024ff752e6c live non-optimized
    +- nvme3 fc traddr=nn-0x2082d039eaa7dfc8:pn-0x2083d039eaa7dfc8,host_traddr=nn-0x20000024ff752e6c:pn-0x21000024ff752e6c live optimized
    NVMe/TCP
    nvme list-subsys /dev/nvme1n1
    Mostra esempio
    nvme-subsys5 - NQN=nqn.1992-08.com.netapp:sn.0f4ba1e74eb611ef9f50d039eab6cb6d:subsystem.nvme_tcp_3
    hostnqn=nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0035-5910-804b-b5c04f444d33
    iopolicy=round-robin
    \
    +- nvme13 tcp traddr=192.168.2.25,trsvcid=4420,host_traddr=192.168.2.31,
    src_addr=192.168.2.31 live optimized
    +- nvme14 tcp traddr=192.168.2.24,trsvcid=4420,host_traddr=192.168.2.31,
    src_addr=192.168.2.31 live non-optimized
    +- nvme5 tcp traddr=192.168.1.25,trsvcid=4420,host_traddr=192.168.1.31,
    src_addr=192.168.1.31 live optimized
    +- nvme6 tcp traddr=192.168.1.24,trsvcid=4420,host_traddr=192.168.1.31,
    src_addr=192.168.1.31 live non-optimized
  5. Verificare che il plug-in NetApp visualizzi i valori corretti per ciascun dispositivo dello spazio dei nomi ONTAP:

    Colonna
    nvme netapp ontapdevices -o column
    Mostra esempio
    Device        Vserver   Namespace Path
    ----------------------- ------------------------------
    /dev/nvme1n1     linux_tcnvme_iscsi        /vol/tcpnvme_1_0_0/tcpnvme_ns
    
    NSID       UUID                                   Size
    ------------------------------------------------------------
    1    5f7f630d-8ea5-407f-a490-484b95b15dd6   21.47GB
    JSON
    nvme netapp ontapdevices -o json
    Mostra esempio
    {
      "ONTAPdevices":[
        {
          "Device":"/dev/nvme1n1",
          "Vserver":"linux_tcnvme_iscsi",
          "Namespace_Path":"/vol/tcpnvme_1_0_0/tcpnvme_ns",
          "NSID":1,
          "UUID":"5f7f630d-8ea5-407f-a490-484b95b15dd6",
          "Size":"21.47GB",
          "LBA_Data_Size":4096,
          "Namespace_Size":5242880
        },
    ]
    }

Passaggio 7: impostare l'autenticazione in-band sicura

A partire da ONTAP 9.12.1, l'autenticazione in-band sicura è supportata tramite NVMe/TCP tra un host RHEL 10.0 e un controller ONTAP .

Ogni host o controller deve essere associato a un DH-HMAC-CHAP chiave per impostare l'autenticazione sicura. Una DH-HMAC-CHAP La chiave è una combinazione dell'NQN dell'host o del controller NVMe e di un segreto di autenticazione configurato dall'amministratore. Per autenticare il proprio peer, un host o un controller NVMe deve riconoscere la chiave associata al peer.

Imposta l'autenticazione in-band sicura tramite la CLI o un file JSON di configurazione. Se è necessario specificare chiavi dhchap diverse per sottosistemi diversi, è necessario utilizzare un file di configurazione JSON.

CLI

Configurare l'autenticazione in banda protetta utilizzando la CLI.

Fasi
  1. Ottenere l'NQN dell'host:

    cat /etc/nvme/hostnqn
  2. Generare la chiave dhCHAP per l'host RHEL 9,6.

    L'output seguente descrive il gen-dhchap-key parametri del comando:

    nvme gen-dhchap-key -s optional_secret -l key_length {32|48|64} -m HMAC_function {0|1|2|3} -n host_nqn
    •	-s secret key in hexadecimal characters to be used to initialize the host key
    •	-l length of the resulting key in bytes
    •	-m HMAC function to use for key transformation
    0 = none, 1- SHA-256, 2 = SHA-384, 3=SHA-512
    •	-n host NQN to use for key transformation

    Nell'esempio seguente, viene generata una chiave casuale dhCHAP con HMAC impostato su 3 (SHA-512).

    nvme gen-dhchap-key -m 3 -n nqn.2014-
    08.org.nvmexpress:uuid:e6dade64-216d-11ec-b7bb-7ed30a5482c3
    DHHC-1:03:wSpuuKbBHTzC0W9JZxMBsYd9JFV8Si9aDh22k2BR/4m852vH7KGlrJeMpzhmyjDWOo0PJJM6yZsTeEpGkDHMHQ255+g=:
  3. Sul controller ONTAP, aggiungere l'host e specificare entrambe le chiavi dhchap:

    vserver nvme subsystem host add -vserver <svm_name> -subsystem <subsystem> -host-nqn <host_nqn> -dhchap-host-secret <authentication_host_secret> -dhchap-controller-secret <authentication_controller_secret> -dhchap-hash-function {sha-256|sha-512} -dhchap-group {none|2048-bit|3072-bit|4096-bit|6144-bit|8192-bit}
  4. Un host supporta due tipi di metodi di autenticazione, unidirezionale e bidirezionale. Sull'host, connettersi al controller ONTAP e specificare le chiavi dhchap in base al metodo di autenticazione scelto:

    nvme connect -t tcp -w <host-traddr> -a <tr-addr> -n <host_nqn> -S <authentication_host_secret> -C <authentication_controller_secret>
  5. Convalidare nvme connect authentication comando verificando le chiavi dhchap dell'host e del controller:

    1. Verificare le chiavi dhchap dell'host:

      cat /sys/class/nvme-subsystem/<nvme-subsysX>/nvme*/dhchap_secret
      Mostra output di esempio per una configurazione unidirezionale
      cat /sys/class/nvme-subsystem/nvme-subsys1/nvme*/dhchap_secret
      DHHC-1:01:CNxTYq73T9vJk0JpOfDBZrhDCqpWBN4XVZI5WxwPgDUieHAi:
      DHHC-1:01:CNxTYq73T9vJk0JpOfDBZrhDCqpWBN4XVZI5WxwPgDUieHAi:
      DHHC-1:01:CNxTYq73T9vJk0JpOfDBZrhDCqpWBN4XVZI5WxwPgDUieHAi:
      DHHC-1:01:CNxTYq73T9vJk0JpOfDBZrhDCqpWBN4XVZI5WxwPgDUieHAi:
    2. Verificare i tasti dhchap del controller:

      cat /sys/class/nvme-subsystem/<nvme-subsysX>/nvme*/dhchap_ctrl_secret
      Mostra output di esempio per una configurazione bidirezionale
      cat /sys/class/nvme-subsystem/nvme-
      subsys6/nvme*/dhchap_ctrl_secret
      DHHC-1:03:wSpuuKbBHTzC0W9JZxMBsYd9JFV8Si9aDh22k2BR/4m852vH7KGlrJeMpzhmyjDWOo0PJJM6yZsTeEpGkDHMHQ255+g=:
      DHHC-1:03:wSpuuKbBHTzC0W9JZxMBsYd9JFV8Si9aDh22k2BR/4m852vH7KGlrJeMpzhmyjDWOo0PJJM6yZsTeEpGkDHMHQ255+g=:
      DHHC-1:03:wSpuuKbBHTzC0W9JZxMBsYd9JFV8Si9aDh22k2BR/4m852vH7KGlrJeMpzhmyjDWOo0PJJM6yZsTeEpGkDHMHQ255+g=:
      DHHC-1:03:wSpuuKbBHTzC0W9JZxMBsYd9JFV8Si9aDh22k2BR/4m852vH7KGlrJeMpzhmyjDWOo0PJJM6yZsTeEpGkDHMHQ255+g=:
JSON

Quando più sottosistemi NVMe sono disponibili sul controller ONTAP , è possibile utilizzare /etc/nvme/config.json file con il nvme connect-all comando.

Utilizzare il -o opzione per generare il file JSON. Per ulteriori opzioni di sintassi, fare riferimento alle pagine man di NVMe connect-all.

Fasi
  1. Configurare il file JSON.

    Nota Nell'esempio seguente, dhchap_key corrisponde a dhchap_secret E dhchap_ctrl_key corrisponde a dhchap_ctrl_secret .
    Mostra esempio
    cat /etc/nvme/config.json
    [
    {
      "hostnqn":"nqn.2014-08.org.nvmexpress:uuid:9796c1ec-0d34-11eb-
      b6b2-3a68dd3bab57",
      "hostid":"b033cd4fd6db4724adb48655bfb55448",
      "dhchap_key":" DHHC-1:01:CNxTYq73T9vJk0JpOfDBZrhDCqpWBN4XVZI5WxwPgDUieHAi:"
    },
    {
      "hostnqn":"nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0035-5910-
      804b-b5c04f444d33",
      "subsystems":[
            {
              "nqn":"nqn.1992-
              08.com.netapp:sn.0f4ba1e74eb611ef9f50d039eab6cb6d:subsystem.bidi
              r_DHCP",
              "ports":[
                  {
                      "transport":"tcp",
                        "traddr":" 192.168.1.24 ",
                      "host_traddr":" 192.168.1.31 ",
                      "trsvcid":"4420",
                      "dhchap_ctrl_key":"DHHC-
                      1:03: wSpuuKbBHTzC0W9JZxMBsYd9JFV8Si9aDh22k2BR/4m852vH7KGlrJeMpzhmyjDWOo0PJJM6yZsTeEpGkDHMHQ255+g=:"
                  },
                  {
                      "transport":"tcp",
                      "traddr":" 192.168.1.25 ",
                      "host_traddr":" 192.168.1.31",
                      "trsvcid":"4420",
                      "dhchap_ctrl_key":"DHHC-
                      1:03: wSpuuKbBHTzC0W9JZxMBsYd9JFV8Si9aDh22k2BR/4m852vH7KGlrJeMpzhmyjDWOo0PJJM6yZsTeEpGkDHMHQ255+g=:"
                  },
                  {
                      "transport":"tcp",
                     "traddr":" 192.168.2.24 ",
                      "host_traddr":" 192.168.2.31",
                      "trsvcid":"4420",
                      "dhchap_ctrl_key":"DHHC-
                      1:03: wSpuuKbBHTzC0W9JZxMBsYd9JFV8Si9aDh22k2BR/4m852vH7KGlrJeMpzhmyjDWOo0PJJM6yZsTeEpGkDHMHQ255+g=:"
                  },
                  {
                      "transport":"tcp",
                      "traddr":" 192.168.2.25 ",
                        "host_traddr":" 192.168.2.31",
                      "trsvcid":"4420",
                      "dhchap_ctrl_key":"DHHC-
                      1:03: wSpuuKbBHTzC0W9JZxMBsYd9JFV8Si9aDh22k2BR/4m852vH7KGlrJeMpzhmyjDWOo0PJJM6yZsTeEpGkDHMHQ255+g=:"
                  }
              ]
          }
      ]
    }
    ]
  2. Connettersi al controller ONTAP utilizzando il file di configurazione JSON:

    nvme connect-all -J /etc/nvme/config.json
    Mostra esempio
    already connected to hostnqn=nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0035-5910-804b-b5c04f444d33,nqn=nqn.1992-08.com.netapp:sn.8dde3be2cc7c11efb777d039eab6cb6d:subsystem. bidi
    r_DHCP,transport=tcp,traddr=192.168.1.25,trsvcid=4420
    already connected to hostnqn=nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0035-5910-804b-b5c04f444d33,nqn=nqn.1992-08.com.netapp:sn.8dde3be2cc7c11efb777d039eab6cb6d:subsystem. bidi
    r_DHCP,transport=tcp,traddr=192.168.2.25,trsvcid=4420
    already connected to hostnqn=nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0035-5910-804b-b5c04f444d33,nqn=nqn.1992-08.com.netapp:sn.8dde3be2cc7c11efb777d039eab6cb6d:subsystem. bidi
    r_DHCP,transport=tcp,traddr=192.168.1.24,trsvcid=4420
    already connected to hostnqn=nqn.2014-08.org.nvmexpress:uuid:4c4c4544-0035-5910-804b-b5c04f444d33,nqn=nqn.1992-08.com.netapp:sn.8dde3be2cc7c11efb777d039eab6cb6d:subsystem. bidi
    r_DHCP,transport=tcp,traddr=192.168.2.24,trsvcid=4420
  3. Verificare che i segreti dhchap siano stati abilitati per i rispettivi controller per ciascun sottosistema:

    1. Verificare le chiavi dhchap dell'host:

      cat /sys/class/nvme-subsystem/nvme-subsys0/nvme0/dhchap_secret

      L'esempio seguente mostra una chiave dhchap:

      DHHC-1:01:CNxTYq73T9vJk0JpOfDBZrhDCqpWBN4XVZI5WxwPgDUieHAi:
    2. Verificare i tasti dhchap del controller:

      cat /sys/class/nvme-subsystem/nvme-subsys0/nvme0/dhchap_ctrl_secret

      Dovresti vedere un output simile al seguente esempio:

    DHHC-1:03:wSpuuKbBHTzC0W9JZxMBsYd9JFV8Si9aDh22k2BR/4m852vH7KGlrJeMpzhmyjDWOo0PJJM6yZsTeEpGkDHMHQ255+g=:

Fase 8: Esaminare i problemi noti

Non ci sono problemi noti.