Top
PRIMECLUSTER Global Disk Services  Configuration and AdministrationGuide 4.3
FUJITSU Software

9.6.1 Delete iSCSI devices

This section describes the procedure to delete the iSCSI devices used for the mirroring among servers.

Perform this procedure after deleting iSCSI devices to be deleted from a class of GDS and the resource database of PRIMECLUSTER.

For details, refer to the steps "Change the device names set in resources of the shared disk device" and "Delete resources of the shared disk device" in the procedure "Deleting a shared disk device" described in "PRIMECLUSTER Installation and Administration Guide."

  1. Confirm LUN to be deleted on any node.

    # iscsiadm -m session -P 3

    [Execution example]

    # iscsiadm -m session -P 3
    iSCSI Transport Class version xxxxxxxx
    version xxxxxxxx
    Target: target-0201
        Current Portal: 192.168.56.10:3260,1
        Persistent Portal: 192.168.56.10:3260,1
            **********
            Interface:
            **********
    ...
            iSCSI Connection State: LOGGED IN
            iSCSI Session State: LOGGED_IN
            Internal iscsid Session State: NO CHANGE
    ...
            ************************
            Attached SCSI devices:
            ************************
            Host Number: 12 State: running
            scsi12 Channel 00 Id 0 Lun: 0
            scsi12 Channel 00 Id 0 Lun: 1
                Attached scsi disk sdd State: running
    ...
    Target: target-0101                                         (*1)
        Current Portal: 192.168.56.20:3260,1
        Persistent Portal: 192.168.56.20:3260,1
            **********
            Interface:
            **********
    ...
            iSCSI Connection State: LOGGED IN
            iSCSI Session State: LOGGED_IN
            Internal iscsid Session State: NO CHANGE
    ...
            ************************
            Attached SCSI devices:
            ************************
            Host Number: 13 State: running
            scsi13 Channel 00 Id 0 Lun: 0
            scsi13 Channel 00 Id 0 Lun: 1                        (*2)
                Attached scsi disk sde State: running            (*3)
    ...

    In the example, when deleting sde of (*3), LUN1 of (*2) is deleted in the target name "target-0101" of (*1).

  2. Modify the /etc/tgt/targets.conf file on a node where the setting of LUN is to be deleted.

    Delete the setting of LUN that the LUN number is 1.

    [Example before changing]

    <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-3500000e114784363>
    lun 1
    scsi_id SDX01
    </backing-store> <backing-store /dev/disk/by-id/scsi-3500000e111c56611> lun 2 scsi_id SDX02 </backing-store> </target>

    [Example after changing]

    <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-3500000e111c56611>
        lun 2
        scsi_id SDX02
      </backing-store>
    </target>
  3. Stop iSCSI devices to be deleted on both node.

    # echo offline > /sys/block/iSCSI_device_name/device/state

    [Execution example]

    # echo offline > /sys/block/sde/device/state
  4. Delete iSCSI devices to be deleted on both nodes.

    # echo 1 > /sys/block/iSCSI_device_name/device/delete

    [Execution example]

    # echo 1 > /sys/block/sde/device/delete
  5. Confirm the target ID on a node where the setting of LUN is to be deleted.

    The following shows that the target ID of the target name "target-0101" is 1.

    # tgt-admin --show
    Target 1: target-0101
    ...
  6. Delete LUN on a node where the setting of LUN is to be deleted.

    # tgtadm --lld iscsi --op delete --mode logicalunit --tid targetID --lun LUN

    Point

    • Specify the target ID to targetID.

    • Specify the LUN number to LUN.

    [Execution example]

    # tgtadm --lld iscsi --op delete --mode logicalunit --tid 1 --lun 1
  7. Confirm that LUN was deleted on a node where the setting of LUN was deleted.

    # tgt-admin --show

    Point

    Confirm that LUN information of the deleted number was not output.

    [Execution example]

    # tgt-admin --show
    ...
        LUN information:
            LUN: 0
                Type: controller
                SCSI ID: IET 00010000
                SCSI SN: beaf10
                Size: 0 MB, Block size: 1
                Online: Yes
                Removable media: No
                Prevent removal: No
                Readonly: No
                Backing store type: null
                Backing store path: None
                Backing store flags:
    ...