Top
PRIMECLUSTER Global Disk Services  Configuration and AdministrationGuide 4.4
FUJITSU Software

8.7 Changing IP Addresses Used for Mirroring among Servers

This section describes the procedures to change IP addresses used for mirroring among servers.

The procedures are different depending on OS version.

Change both nodes to single user mode, and then perform the procedures.

[RHEL6]

  1. Delete the registration of the target portal on the local node.

    Example) When IP address for the mirroring among servers is 192.168.56.20

    # iscsiadm -m discovery --op delete --portal 192.168.56.20
  2. Start the network service.

    For K5 environment, this procedure is unnecessary because the network service has already been started.

    # service network start
  3. Change IP address described in the /etc/tgt/targets.conf file.

    Example) When changing IP addresses to 192.168.56.21 and 192.168.56.11

    # vim /etc/tgt/targets.conf

    [Before changing]

    # GDS netmirror definition start
    <target target-0101>
    initiator-address 192.168.56.20
    initiator-address 192.168.56.10
    write-cache off
      <backing-store /dev/disk/by-id/scsi-3500000e111e68e00>
      scsi_id SDX-01
      </backing-store>
    </target>
    # GDS netmirror definition end

    [After changing]

    # GDS netmirror definition start
    <target target-0101>
    initiator-address 192.168.56.21
    initiator-address 192.168.56.11
    write-cache off
      <backing-store /dev/disk/by-id/scsi-3500000e111e68e00>
      scsi_id SDX-01
      </backing-store>
    </target>
    # GDS netmirror definition end
  4. Start or restart the SCSI target daemon (tgtd).

    • For an environment other than K5 environment, start the tgtd.

      # service tgtd start
    • For K5 environment, restart the tgtd.

      # service tgtd restart
  5. Change the IP addresses described in the /etc/opt/FJSVsdx/.sdxnetmirror_ipaddr file.

    [Before changing]

    192.168.56.10
    192.168.56.20

    [After changing]

    192.168.56.11
    192.168.56.21
  6. Establish the iSCSI session

    For the procedure, refer to "4.8.4 Establishing iSCSI Session."

[RHEL7]

  1. Delete the registration of the target portal on the local node.

    Example) when IP address for the mirroring among servers is 192.168.56.20

    # iscsiadm -m discovery --op delete --portal 192.168.56.20
  2. Start the network service.

    # systemctl start network.service

    The following message may be output but, no action is required because the operation is not affected.

    Error getting authority: Error initializing authority: Could not connect:
    No such file or directory (g-io-error-quark, 1)
  3. Copy the setting information file of the iSCSI target.

    Example) when the file name for the copy destination is /var/tmp/targetfile.json

    # cp /etc/target/saveconfig.json /var/tmp/targetfile.json
  4. Change IP address described in the copy destination file in step 3.

    Example) When changing IP address for the mirroring among servers to 192.168.56.21

    # vim /var/tmp/targetfile.json

    [Before changing]

    {
      "fabric_modules": [],
      "storage_objects": [
        {
    ...
              "portals": [
                {
                  "ip_address": "192.168.56.20",
                  "iser": false,
                  "port": 3260
                }
              ],
    ...

    [After changing]

    {
      "fabric_modules": [],
      "storage_objects": [
        {
    ...
              "portals": [
                {
                  "ip_address": "192.168.56.21",
                  "iser": false,
                  "port": 3260
                }
              ],
    ...
  5. Reflect the setting information file of the iSCSI target edited in step 4 to the target.

    Example) when the file name is /var/tmp/targetfile.json

    # targetctl restore /var/tmp/targetfile.json

    The following message may be output but, no action is required because the operation is not affected.

    Unable to load target_core_user
  6. Confirm that the iSCSI target was set correctly.

    # targetcli /iscsi/ ls

    Point

    (*1) Confirm that the modified IP address was reflected.

    [Output example]

    o- iscsi .................................................................. [Targets: 1]
      o- iqn.2003-01.org.linux-iscsi.node1.x8664:sn.6e665c7c1be0 ................. [TPGs: 1]
        o- tpg1 ..................................................... [no-gen-acls, no-auth]
          o- acls ................................................................ [ACLs: 2]
          | o- iqn.1994-05.com.redhat:dee92ff9979d ........................ [Mapped LUNs: 1]
          | | o- mapped_lun0 ...................................... [lun0 block/store1 (rw)]
          | o- iqn.1994-05.com.redhat:fa7eb9cf483c ........................ [Mapped LUNs: 1]
          |   o- mapped_lun0 ...................................... [lun0 block/store1 (rw)]
          o- luns ................................................................ [LUNs: 1]
          | o- lun0 ................ [block/store1 (/dev/disk/by-id/scsi-3500000e111c56610)]
          o- portals .......................................................... [Portals: 2]
            o- 192.168.56.21:3260 ..................................................... [OK] (*1)
  7. Store the target information that was restored in step 5.

    # targetctl save
  8. Change the IP addresses described in the /etc/opt/FJSVsdx/.sdxnetmirror_ipaddr file.

    [Before changing]

    192.168.56.10
    192.168.56.20

    [After changing]

    192.168.56.11
    192.168.56.21
  9. Establish iSCSI session.

    For the procedure, refer to "4.8.4 Establishing iSCSI Session."