Moving Linux iSCSI hosts from MetroCluster FC to MetroCluster IP nodes

Contributors netapp-martyh NetAppZacharyWambold Download PDF of this page

After you transition your MetroCluster nodes from FC to IP, you might need to move your iSCSI host connections to the new nodes.

In this procedure IPv4 interfaces are created.

The host commands and examples given in these procedures are specific to LINUX operating systems.

Setting up new iSCSI connections

To move iSCSI connections, you must set up new iSCSI connections to the MetroCluster IP nodes.

  1. Create iSCSI interfaces on the MetroCluster IP nodes and check ping connectivity from the iSCSI clients to the new IP interfaces on the MetroCluster IP nodes.

    All iSCSI interfaces from the SVM should be reachable by iSCSI client.

  2. On the iSCSI host or client, identify the existing iSCSI connections from the host to the MetroCluster FC node: 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. Verify the connections from the MetroCluster IP node: iscsi session show -vserver svm-name

    node_A_1-IP::*> 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. List the iscsi interfaces in ONTAP for the SVM that contains the interfaces: 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. On the iSCSI client, run discovery on any one of the iSCSI IP addresses on the SVM to discover the new targets: iscsiadm -m discovery -t sendtargets -p iscsi-ip-address

    Discovery can be run on any IP address of the SVM, including non-iSCSI interfaces.

    [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. On the iSCSI client, login to all the discovered addresses: 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. On the iSCSI client, verify the login and connections: 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. From the MetroCluster node, verify the login and connection with the client: iscsi initiator show -vserver vsa_1

    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.

At the end of this tasks, the client can see all iSCSI interfaces (on the MetroCluster FC and MetroCluster IP nodes) and is logged in to all those interfaces.

LUNs and volumes are still physically hosted on FC nodes. Because LUNs are reported only on MetroCluster FC node interfaces, the client will show only paths over MetroCluster FC nodes. This can be seen in sanlun lun show -p and multipath -ll -d command outputs. The next step is to add IP nodes as reporting nodes.

[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

Adding the MetroCluster IP nodes as reporting nodes

After setting up the connections to the new MetroCluster IP nodes, you must add new reporting nodes.

  1. On the MetroCluster node, list reporting nodes for LUNs on the SVM: lun mapping show -vserver vsa_1 -fields reporting-nodes -ostype linux

    The following reporting nodes are local nodes as LUNs are physically on FC nodes node_A_1-FC and node_A_2-FC.

    node_A_1-IP::*> 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-FC,node_A_2-FC
    .
    .
    .
    vsa_1 /vol/vsa_1_vol9/lun_linux_19 igroup_linux node_A_1-FC,node_A_2-FC
    12 entries were displayed.
  2. On the MetroCluster node, add reporting nodes: lun mapping add-reporting-nodes -vserver svm-name -path /vol/vsa_1_vol*/lun_linux_* -nodes node1,node2 -igroup igroup_linux

    node_A_1-IP::*> lun mapping add-reporting-nodes -vserver vsa_1 -path /vol/vsa_1_vol*/lun_linux_* -nodes node_A_1-IP,node_A_2-IP
    -igroup igroup_linux
    
    12 entries were acted on.
  3. On the MetroCluster node, verify that the newly added nodes are present: lun mapping show -vserver svm-name -fields reporting-nodes -ostype linux vserver path igroup reporting-nodes

    node_A_1-IP::*> 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-FC,node_A_2-FC,node_A_1-IP,node_A_2-IP
    vsa_1 /vol/vsa_1_vol1/lun_linux_3 igroup_linux node_A_1-FC,node_A_2-FC,node_A_1-IP,node_A_2-IP.
    .
    .
    .
    
    12 entries were displayed.
  4. On the host, issue the following command to rescan the scsi bus on the host and discover the newly added paths:/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.
  5. On the host, issue the following command to list the newly added paths: sanlun lun show -p

    Four paths are shown for each LUN.

    [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_
  6. On the MetroCluster, move the volume/volumes containing LUNs from FC to IP nodes.

    node_A_1-IP::*> 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-IP::*> vol move show
    Vserver    Volume     State       Move       Phase            Percent-Complete  Time-To-Complete
    ---------  ---------- --------    ---------- ---------------- ----------------  ----------------
    vsa_1     vsa_1_vol1  healthy                initializing     -                 -
  7. When the volume move is completed, on the MetroCluster, use the volume show command to confirm that the volume or LUN is online.

  8. The iSCSI interfaces on the MetroCluster IP nodes where the LUN now resides are updated as primary paths. If the primary path is not updated after the volume move, run /usr/bin/rescan-scsi-bus.sh -a and multipath -v3 or simply wait for multipath rescanning to take place.

    In the following example, the primary path is a LIF on the MetroCluster IP node.

    [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_

Removing reporting nodes and rescanning paths

You must remove the reporting nodes and rescan the paths.

  1. From the MetroCluster IP node, remove remote reporting nodes (the MetroCluster IP nodes) for the Linux LUNs: lun mapping remove-reporting-nodes -vserver vsa_1 -path * -igroup igroup_linux -remote-nodes true

    In this case, the remote nodes are FC nodes.

    node_A_1-IP::*> lun mapping remove-reporting-nodes -vserver vsa_1 -path * -igroup igroup_linux -remote-nodes true
    
    12 entries were acted on.
  2. From the MetroCluster IP node, check reporting nodes for the LUNs: lun mapping show -vserver vsa_1 -fields reporting-nodes -ostype linux

    node_A_1-IP::*> 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-IP,node_A_2-IP
    vsa_1 /vol/vsa_1_vol1/lun_linux_3   igroup_linux  node_A_1-IP,node_A_2-IP
    vsa_1 /vol/vsa_1_vol2/lun_linux_4   group_linux   node_A_1-IP,node_A_2-IP
    .
    .
    .
    
    12 entries were displayed.
  3. On the iSCSI host, rescan the scsi bus: /usr/bin/rescan-scsi-bus.sh -r

    The paths that are removed are the paths from FC nodes.

    [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]
     .
    .
    .
  4. On the iSCSI host, verify that only paths from the MetroCluster IP nodes are visible: sanlun lun show -p``multipath -ll -d