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

Spostare gli host iSCSI Linux da MetroCluster FC ai nodi IP MetroCluster

Collaboratori

Dopo aver eseguito la transizione dei nodi MetroCluster da FC a IP, potrebbe essere necessario spostare le connessioni host iSCSI nei nuovi nodi.

A proposito di questa attività
  • Le interfacce IPv4 vengono create quando si configurano le nuove connessioni iSCSI.

  • I comandi host e gli esempi sono specifici per i sistemi operativi Linux.

  • I nodi FC di MetroCluster sono detti vecchi nodi, mentre i nodi IP di MetroCluster sono detti nuovi nodi.

Fase 1: Configurare nuove connessioni iSCSI

Per spostare le connessioni iSCSI, è necessario impostare nuove connessioni iSCSI nei nuovi nodi.

Fasi
  1. Creare interfacce iSCSI sui nuovi nodi e verificare la connettività ping dagli host iSCSI alle nuove interfacce sui nuovi nodi.

    Tutte le interfacce iSCSI della SVM devono essere raggiungibili dall'host iSCSI.

  2. Sull'host iSCSI, identificare le connessioni iSCSI esistenti dall'host al nodo precedente:

    iscsiadm -m session
    [root@scspr1789621001 ~]# iscsiadm -m session
    tcp: [1] 10.230.68.236:3260,1156 iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6 (non-flash)
    tcp: [2] 10.230.68.237:3260,1158 iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6 (non-flash)
  3. Sul nuovo nodo, verificare le connessioni dal nuovo nodo:

    iscsi session show -vserver <svm-name>
    node_A_1-new::*> iscsi session show -vserver vsa_1
     Tpgroup Initiator Initiator
    Vserver Name TSIH Name ISID Alias
    --------- ------- ---- ------------------------ --------- ---------------------
    vsa_1 iscsi_lf__n1_p1_ 4 iqn.2020-01.com.netapp.englab.gdl:scspr1789621001 00:02:3d:00:00:01 scspr1789621001.gdl.englab.netapp.com
    vsa_1 iscsi_lf__n2_p1_ 4 iqn.2020-01.com.netapp.englab.gdl:scspr1789621001 00:02:3d:00:00:02 scspr1789621001.gdl.englab.netapp.com
    2 entries were displayed.
  4. Nel nuovo nodo elenca le interfacce iSCSI in ONTAP per la SVM che contiene le interfacce:

    iscsi interface show -vserver <svm-name>
    sti8200mcchtp001htp_siteA::*> iscsi interface show -vserver vsa_1
     Logical Status Curr Curr
    Vserver Interface  TPGT Admin/Oper IP Address Node Port Enabled
    ------- ---------- ---- ---------- --------------- ----------- ---- -------
    vsa_1 iscsi_lf__n1_p1_ 1156 up/up 10.230.68.236 sti8200mcc-htp-001 e0g true
    vsa_1 iscsi_lf__n1_p2_ 1157 up/up fd20:8b1e:b255:805e::78c9 sti8200mcc-htp-001 e0h true
    vsa_1 iscsi_lf__n2_p1_ 1158 up/up 10.230.68.237 sti8200mcc-htp-002 e0g true
    vsa_1 iscsi_lf__n2_p2_ 1159 up/up fd20:8b1e:b255:805e::78ca sti8200mcc-htp-002 e0h true
    vsa_1 iscsi_lf__n3_p1_ 1183 up/up 10.226.43.134 sti8200mccip-htp-005 e0c true
    vsa_1 iscsi_lf__n4_p1_ 1188 up/up 10.226.43.142 sti8200mccip-htp-006 e0c true
    6 entries were displayed.
  5. Sull'host iSCSI, eseguire il rilevamento su uno qualsiasi degli indirizzi IP iSCSI sulla SVM per rilevare le nuove destinazioni:

    iscsiadm -m discovery -t sendtargets -p iscsi-ip-address

    Il rilevamento può essere eseguito su qualsiasi indirizzo IP della SVM, incluse le interfacce non iSCSI.

    [root@scspr1789621001 ~]# iscsiadm -m discovery -t sendtargets -p 10.230.68.236:3260
    10.230.68.236:3260,1156 iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6
    10.226.43.142:3260,1188 iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6
    10.226.43.134:3260,1183 iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6
    10.230.68.237:3260,1158 iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6
  6. Sull'host iSCSI, accedere a tutti gli indirizzi rilevati:

    iscsiadm -m node -L all -T node-address -p portal-address -l
    [root@scspr1789621001 ~]# iscsiadm -m node -L all -T iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6 -p 10.230.68.236:3260 -l
    Logging in to [iface: default, target: iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6, portal: 10.226.43.142,3260] (multiple)
    Logging in to [iface: default, target: iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6, portal: 10.226.43.134,3260] (multiple)
    Login to [iface: default, target: iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6, portal: 10.226.43.142,3260] successful.
    Login to [iface: default, target: iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6, portal: 10.226.43.134,3260] successful.
  7. Sull'host iSCSI, verificare l'accesso e le connessioni:

    iscsiadm -m session
    [root@scspr1789621001 ~]# iscsiadm -m session
    tcp: [1] 10.230.68.236:3260,1156 iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6 (non-flash)
    tcp: [2] 10.230.68.237:3260,1158 iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6 (non-flash)
    tcp: [3] 10.226.43.142:3260,1188 iqn.1992-08.com.netapp:sn.58d7f6df2cc611eaa9c500a098a71638:vs.6 (non-flash)
  8. Sul nuovo nodo, verificare l'accesso e la connessione con l'host:

    iscsi initiator show -vserver <svm-name>
    sti8200mcchtp001htp_siteA::*> iscsi initiator show -vserver vsa_1
     Tpgroup Initiator
    Vserver Name             TSIH Name                  ISID              Igroup Name
    ------- --------         ---- --------------------- ----------------- -----------------
    vsa_1 iscsi_lf__n1_p1_ 4 iqn.2020-01.com.netapp.englab.gdl:scspr1789621001 00:02:3d:00:00:01 igroup_linux
    vsa_1 iscsi_lf__n2_p1_ 4 iqn.2020-01.com.netapp.englab.gdl:scspr1789621001 00:02:3d:00:00:02 igroup_linux
    vsa_1 iscsi_lf__n3_p1_ 1 iqn.2020-01.com.netapp.englab.gdl:scspr1789621001 00:02:3d:00:00:04 igroup_linux
    vsa_1 iscsi_lf__n4_p1_ 1 iqn.2020-01.com.netapp.englab.gdl:scspr1789621001 00:02:3d:00:00:03 igroup_linux
    4 entries were displayed.
Risultato

Al termine di questa attività, l'host è in grado di visualizzare tutte le interfacce iSCSI (sui nodi vecchi e nuovi) ed è connesso a tutte queste interfacce.

I LUN e i volumi sono ancora fisicamente ospitati nei vecchi nodi. Poiché i LUN sono riportati solo sulle vecchie interfacce di nodo, l'host mostrerà solo i percorsi sui vecchi nodi. Per vedere questo, eseguire sanlun lun show -p e. multipath -ll -d comandi sull'host ed esaminare gli output dei comandi.

[root@scspr1789621001 ~]# sanlun lun show -p
ONTAP Path: vsa_1:/vol/vsa_1_vol6/lun_linux_12
 LUN: 4
 LUN Size: 2g
 Product: cDOT
 Host Device: 3600a098038304646513f4f674e52774b
 Multipath Policy: service-time 0
 Multipath Provider: Native
--------- ---------- ------- ------------ -------------------
host vserver
path path /dev/ host vserver
state     type       node    adapter      LIF
--------- ---------- ------- ------------ -------------------
up        primary    sdk     host3        iscsi_lf__n2_p1_
up        secondary  sdh     host2        iscsi_lf__n1_p1_
[root@scspr1789621001 ~]# multipath -ll -d
3600a098038304646513f4f674e52774b dm-5 NETAPP ,LUN C-Mode
size=2.0G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 3:0:0:4 sdk 8:160 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
 `- 2:0:0:4 sdh 8:112 active ready running

Passaggio 2: Aggiungere i nuovi nodi come nodi di reporting

Dopo aver impostato le connessioni ai nuovi nodi, aggiungere i nuovi nodi come nodi di reporting.

Fasi
  1. Nel nuovo nodo, elenca i nodi di reporting per le LUN sulla SVM:

    lun mapping show -vserver <svm-name> -fields reporting-nodes -ostype linux

    I seguenti nodi di reporting sono nodi locali, mentre i LUN si trovano fisicamente sui vecchi nodi node_A_1-old e node_A_2-old.

    node_A_1-new::*> lun mapping show -vserver vsa_1 -fields reporting-nodes -ostype linux
    vserver path                         igroup       reporting-nodes
    ------- ---------------------------- ------------ ---------------------------
    vsa_1   /vol/vsa_1_vol1/lun_linux_2  igroup_linux node_A_1-old,node_A_2-old
    .
    .
    .
    vsa_1   /vol/vsa_1_vol9/lun_linux_19 igroup_linux node_A_1-old,node_A_2-old
    12 entries were displayed.
  2. Nel nuovo nodo, aggiungere i nodi di reporting:

    lun mapping add-reporting-nodes -vserver <svm-name> -path /vol/vsa_1_vol*/lun_linux_* -nodes node1,node2 -igroup <igroup_name>
    node_A_1-new::*> lun mapping add-reporting-nodes -vserver vsa_1 -path /vol/vsa_1_vol*/lun_linux_* -nodes node_A_1-new,node_A_2-new
    -igroup igroup_linux
    12 entries were acted on.
  3. Sul nuovo nodo, verificare che siano presenti i nodi appena aggiunti:

    lun mapping show -vserver <svm-name> -fields reporting-nodes -ostype linux vserver path igroup reporting-nodes
    node_A_1-new::*> lun mapping show -vserver vsa_1 -fields reporting-nodes -ostype linux vserver path igroup reporting-nodes
    ------- --------------------------- ------------ -------------------------------------------------------------------------------
    vsa_1 /vol/vsa_1_vol1/lun_linux_2 igroup_linux node_A_1-old,node_A_2-old,node_A_1-new,node_A_2-new
    vsa_1 /vol/vsa_1_vol1/lun_linux_3 igroup_linux node_A_1-old,node_A_2-old,node_A_1-new,node_A_2-new
    .
    .
    .
    12 entries were displayed.
  4. Il sg3-utils Il pacchetto deve essere installato sull'host Linux. Questo impedisce un rescan-scsi-bus.sh utility not found Errore quando si esegue nuovamente la scansione dell'host Linux per i LUN appena mappati utilizzando rescan-scsi-bus comando.

    Sull'host, verificare che sg3-utils il pacchetto è installato:

    • Per una distribuzione basata su Debian:

      dpkg -l | grep sg3-utils
    • Per una distribuzione basata su Red Hat:

      rpm -qa | grep sg3-utils

    Se necessario, installare sg3-utils Pacchetto sull'host Linux:

    sudo apt-get install sg3-utils
  5. Sull'host, eseguire nuovamente la scansione del bus SCSI sull'host e scoprire i nuovi percorsi aggiunti:

    /usr/bin/rescan-scsi-bus.sh -a
    [root@stemgr]# /usr/bin/rescan-scsi-bus.sh -a
    Scanning SCSI subsystem for new devices
    Scanning host 0 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
    Scanning host 1 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
    Scanning host 2 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
     Scanning for device 2 0 0 0 ...
    .
    .
    .
    OLD: Host: scsi5 Channel: 00 Id: 00 Lun: 09
     Vendor: NETAPP Model: LUN C-Mode Rev: 9800
     Type: Direct-Access ANSI SCSI revision: 05
    0 new or changed device(s) found.
    0 remapped or resized device(s) found.
    0 device(s) removed.
  6. Sull'host iSCSI, elencare i percorsi appena aggiunti:

    sanlun lun show -p

    Per ogni LUN vengono visualizzati quattro percorsi.

    [root@stemgr]# sanlun lun show -p
    ONTAP Path: vsa_1:/vol/vsa_1_vol6/lun_linux_12
     LUN: 4
     LUN Size: 2g
     Product: cDOT
     Host Device: 3600a098038304646513f4f674e52774b
     Multipath Policy: service-time 0
     Multipath Provider: Native
    ------- ---------- ------- ----------- ---------------------
    host vserver
    path path /dev/ host vserver
    state   type       node    adapter     LIF
    ------  ---------- ------- ----------- ---------------------
    up      primary    sdk      host3      iscsi_lf__n2_p1_
    up      secondary  sdh     host2       iscsi_lf__n1_p1_
    up      secondary  sdag    host4       iscsi_lf__n4_p1_
    up      secondary  sdah    host5       iscsi_lf__n3_p1_
  7. Nel nuovo nodo spostare il volume/i volumi contenenti LUN dai nodi vecchi ai nuovi nodi.

    node_A_1-new::*> vol move start -vserver vsa_1 -volume vsa_1_vol1 -destination-aggregate sti8200mccip_htp_005_aggr1
    [Job 1877] Job is queued: Move "vsa_1_vol1" in Vserver "vsa_1" to aggregate "sti8200mccip_htp_005_aggr1". Use the "volume move show -vserver
    vsa_1 -volume vsa_1_vol1" command to view the status of this operation.
    node_A_1-new::*> vol move show
    Vserver  Volume      State       Move       Phase            Percent-Complete  Time-To-Complete
    -------- ----------  --------    ---------- ---------------- ----------------  ----------------
    vsa_1    vsa_1_vol1  healthy                initializing     -                 -
  8. Una volta completato lo spostamento del volume nei nuovi nodi, verificare che sia online:

    volume show -state
  9. Le interfacce iSCSI sui nuovi nodi in cui risiede la LUN vengono aggiornate come percorsi primari. Se il percorso primario non viene aggiornato dopo lo spostamento del volume, eseguire /usr/bin/rescan-scsi-bus.sh -a e. multipath -v3 sull'host o attendere semplicemente che venga eseguita la ripetizione della scansione multipath.

    Nell'esempio seguente, il percorso primario è una LIF nel nuovo nodo.

    [root@stemgr]# sanlun lun show -p
    ONTAP Path: vsa_1:/vol/vsa_1_vol6/lun_linux_12
     LUN: 4
     LUN Size: 2g
     Product: cDOT
     Host Device: 3600a098038304646513f4f674e52774b
     Multipath Policy: service-time 0
     Multipath Provider: Native
    --------- ---------- ------- ------------ -----------------------
    host vserver
    path path /dev/ host vserver
    state     type       node    adapter      LIF
    --------- ---------- ------- ------------ ------------------------
    up        primary    sdag    host4        iscsi_lf__n4_p1_
    up        secondary  sdk     host3        iscsi_lf__n2_p1_
    up        secondary  sdh     host2        iscsi_lf__n1_p1_
    up        secondary  sdah    host5        iscsi_lf__n3_p1_

Passaggio 3: Rimuovere i nodi di reporting e ripetere la scansione dei percorsi

È necessario rimuovere i nodi di reporting e ripetere la scansione dei percorsi.

Fasi
  1. Sul nuovo nodo, rimuovere i nodi di reporting remoti (i nuovi nodi) per le LUN Linux:

    lun mapping remove-reporting-nodes -vserver <svm-name> -path * -igroup <igroup_name> -remote-nodes true

    In questo caso, i nodi remoti sono vecchi.

    node_A_1-new::*> lun mapping remove-reporting-nodes -vserver vsa_1 -path * -igroup igroup_linux -remote-nodes true
    12 entries were acted on.
  2. Sul nuovo nodo, controllare i nodi di reporting delle LUN:

    lun mapping show -vserver <svm-name> -fields reporting-nodes -ostype linux
    node_A_1-new::*> lun mapping show -vserver vsa_1 -fields reporting-nodes -ostype linux
    vserver  path                         igroup        reporting-nodes
    -------  ---------------------------  ------------  -------------------------
    vsa_1    /vol/vsa_1_vol1/lun_linux_2  igroup_linux  node_A_1-new,node_A_2-new
    vsa_1    /vol/vsa_1_vol1/lun_linux_3  igroup_linux  node_A_1-new,node_A_2-new
    vsa_1    /vol/vsa_1_vol2/lun_linux_4  group_linux   node_A_1-new,node_A_2-new
    .
    .
    .
    12 entries were displayed.
  3. Il sg3-utils Il pacchetto deve essere installato sull'host Linux. Questo impedisce un rescan-scsi-bus.sh utility not found Errore quando si esegue nuovamente la scansione dell'host Linux per i LUN appena mappati utilizzando rescan-scsi-bus comando.

    Sull'host, verificare che sg3-utils il pacchetto è installato:

    • Per una distribuzione basata su Debian:

      dpkg -l | grep sg3-utils
    • Per una distribuzione basata su Red Hat:

      rpm -qa | grep sg3-utils

    Se necessario, installare sg3-utils Pacchetto sull'host Linux:

    sudo apt-get install sg3-utils
  4. Sull'host iSCSI, eseguire nuovamente la scansione del bus SCSI:

    /usr/bin/rescan-scsi-bus.sh -r

    I percorsi rimossi sono i percorsi dei vecchi nodi.

    [root@scspr1789621001 ~]# /usr/bin/rescan-scsi-bus.sh -r
    Syncing file systems
    Scanning SCSI subsystem for new devices and remove devices that have disappeared
    Scanning host 0 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
    Scanning host 1 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
    Scanning host 2 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
    sg0 changed: LU not available (PQual 1)
    REM: Host: scsi2 Channel: 00 Id: 00 Lun: 00
    DEL: Vendor: NETAPP Model: LUN C-Mode Rev: 9800
     Type: Direct-Access ANSI SCSI revision: 05
    sg2 changed: LU not available (PQual 1)
    .
    .
    .
    OLD: Host: scsi5 Channel: 00 Id: 00 Lun: 09
     Vendor: NETAPP Model: LUN C-Mode Rev: 9800
     Type: Direct-Access ANSI SCSI revision: 05
    0 new or changed device(s) found.
    0 remapped or resized device(s) found.
    24 device(s) removed.
     [2:0:0:0]
     [2:0:0:1]
    .
    .
    .
  5. Sull'host iSCSI, verificare che siano visibili solo i percorsi dai nuovi nodi:

    sanlun lun show -p
    multipath -ll -d