Skip to main content
ONTAP MetroCluster

Move Linux iSCSI hosts from MetroCluster FC to MetroCluster IP nodes

Contributors netapp-pcarriga netapp-aoife netapp-cgoff netapp-ahibbard netapp-martyh NetAppZacharyWambold

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

About this task
  • IPv4 interfaces are created when you set up the new iSCSI connections.

  • The host commands and examples are specific to Linux operating systems.

  • The MetroCluster FC nodes are called old nodes and the MetroCluster IP nodes are called new nodes.

Step 1: Set up new iSCSI connections

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

Steps
  1. Create iSCSI interfaces on the new nodes and check ping connectivity from the iSCSI hosts to the new interfaces on the new nodes.

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

  2. On the iSCSI host, identify the existing iSCSI connections from the host to the old 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. On the new node, verify the connections from the new node:

    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. On the new node, 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 host, 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 host, 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 host, 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. On the new node, verify the login and connection with the 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.
Result

At the end of this task, the host can see all iSCSI interfaces (on the old and new nodes) and is logged in to all those interfaces.

LUNs and volumes are still physically hosted on the old nodes. Because LUNs are reported only on the old node interfaces, the host will show only paths over the old nodes. To see this, run the sanlun lun show -p and multipath -ll -d commands on the host and examine the command outputs.

[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

Step 2: Add the new nodes as reporting nodes

After setting up the connections to the new nodes, you add the new nodes as the reporting nodes.

Steps
  1. On the new node, list reporting nodes for LUNs on the SVM:

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

    The following reporting nodes are local nodes as LUNs are physically on old nodes node_A_1-old and 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. On the new node, add reporting nodes:

    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. On the new 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-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. The sg3-utils package must be installed on the Linux host. This prevents a rescan-scsi-bus.sh utility not found error when you rescan the Linux host for the newly mapped LUNs using the rescan-scsi-bus command.

    On the host, verify that the sg3-utils package is installed:

    • For a Debian based distribution:

      dpkg -l | grep sg3-utils
    • For a Red Hat based distribution:

      rpm -qa | grep sg3-utils

    If required, install the sg3-utils package on the Linux host:

    sudo apt-get install sg3-utils
  5. On the host, 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.
  6. On the iSCSI host, 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_
  7. On the new node, move the volume/volumes containing LUNs from the old nodes to the new nodes.

    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. When the volume move to the new nodes is complete, verify that the volume is online:

    volume show -state
  9. The iSCSI interfaces on the new 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 on the host or simply wait for multipath rescanning to take place.

    In the following example, the primary path is a LIF on the new 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_

Step 3: Remove reporting nodes and rescan paths

You must remove the reporting nodes and rescan the paths.

Steps
  1. On the new node, remove remote reporting nodes (the new nodes) for the Linux LUNs:

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

    In this case, the remote nodes are old nodes.

    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. On the new node, check reporting nodes for the LUNs:

    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. The sg3-utils package must be installed on the Linux host. This prevents a rescan-scsi-bus.sh utility not found error when you rescan the Linux host for the newly mapped LUNs using the rescan-scsi-bus command.

    On the host, verify that the sg3-utils package is installed:

    • For a Debian based distribution:

      dpkg -l | grep sg3-utils
    • For a Red Hat based distribution:

      rpm -qa | grep sg3-utils

    If required, install the sg3-utils package on the Linux host:

    sudo apt-get install sg3-utils
  4. On the iSCSI host, rescan the SCSI bus:

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

    The paths that are removed are the paths from the old 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]
    .
    .
    .
  5. On the iSCSI host, verify that only paths from the new nodes are visible:

    sanlun lun show -p
    multipath -ll -d