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."
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: iqn.2003-01.org.linux-iscsi.node2.x8664:sn.c585c8864f22
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
Attached scsi disk sdd State: running
scsi13 Channel 00 Id 0 Lun: 1
...
Target: iqn.2003-01.org.linux-iscsi.node1.x8664:sn.6e665c7c1be0 (*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 (*2)
Attached scsi disk sde State: running (*3)
scsi13 Channel 00 Id 0 Lun: 1
...
In the example, when deleting sde of (*3), LUN0 of (*2) is deleted in the target name "iqn.2003-01.org.linux-iscsi.node1.x8664:sn.6e665c7c1be0" of (*1).
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
Delete iSCSI devices to be deleted on both node.
# echo 1 > /sys/block/iSCSI_device_name/device/delete
[Execution example]
# echo 1 > /sys/block/sde/device/delete
Confirm the storage for LUN to be deleted on a node where LUN is to be deleted.
# targetcli ls
Point
(*1) Confirm that the target name is same as which was confirmed in step 1.
(*2) Confirm the storage name correspond to the LUN to be deleted.
[Execution example]
# targetcli ls
o- / ................................................................................ [...]
o- backstores ..................................................................... [...]
| o- block ......................................................... [Storage Objects: 2]
| | o- storage1 .. [/dev/disk/by-id/scsi-3500000e114784363 (8.0GiB) write-thru activated]
| | o- storage2 ..[/dev/disk/by-id/scsi-3500000e1109cc830 (16.0GiB) write-thru activated]
| o- fileio ........................................................ [Storage Objects: 0]
| o- pscsi ......................................................... [Storage Objects: 0]
| o- ramdisk ....................................................... [Storage Objects: 0]
o- iscsi ................................................................... [Targets: 1]
| o- iqn.2003-01.org.linux-iscsi.node1.x8664:sn.6e665c7c1be0 .................. [TPGs: 1] (*1)
| o- tpg1 ...................................................... [no-gen-acls, no-auth]
| o- acls ................................................................. [ACLs: 2]
| | o- iqn.1994-05.com.redhat:dee92ff9979d ......................... [Mapped LUNs: 2]
| | | o- mapped_lun0 ..................................... [lun0 block/storage1 (rw)]
| | | o- mapped_lun1 ..................................... [lun1 block/storage2 (rw)]
| | o- iqn.1994-05.com.redhat:fa7eb9cf483c ......................... [Mapped LUNs: 2]
| | o- mapped_lun0 ..................................... [lun0 block/storage1 (rw)]
| | o- mapped_lun1 ..................................... [lun1 block/storage2 (rw)]
| o- luns ................................................................. [LUNs: 2]
| | o- lun0 ............... [block/storage1 (/dev/disk/by-id/scsi-3500000e114784363)] (*2)
| | o- lun1 ............... [block/storage2 (/dev/disk/by-id/scsi-3500000e1109cc830)]
| o- portals ........................................................... [Portals: 1]
| o- 192.168.125.123:3260 .................................................... [OK]
o- loopback ................................................................ [Targets: 0]
Delete the storage for LUN to be deleted on a node where LUN is to be deleted.
# targetcli /backstores/block/ delete storage_name
Point
Specify the storage name that was confirmed in step 4 to storage_name.
[Execution example]
# targetcli /backstores/block/ delete storage1
Confirm that LUN was deleted on a node where LUN is to be deleted.
# targetcli ls
Point
Confirm that the storage and LUN information which were deleted were not output.
[Output example]
# targetcli ls
o- / ................................................................................ [...] o- backstores ..................................................................... [...] | o- block ......................................................... [Storage Objects: 1] | | o- storage2 . [/dev/disk/by-id/scsi-3500000e1109cc830 (16.0GiB) write-thru activated] | o- fileio ........................................................ [Storage Objects: 0] | o- pscsi ......................................................... [Storage Objects: 0] | o- ramdisk ....................................................... [Storage Objects: 0] 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_lun1 ..................................... [lun1 block/storage2 (rw)] | | o- iqn.1994-05.com.redhat:fa7eb9cf483c ......................... [Mapped LUNs: 1] | | o- mapped_lun1 ..................................... [lun1 block/storage2 (rw)] | o- luns ................................................................. [LUNs: 1] | | o- lun1 ............... [block/storage2 (/dev/disk/by-id/scsi-3500000e1109cc830)] | o- portals ........................................................... [Portals: 1] | o- 192.168.125.123:3260 .................................................... [OK] o- loopback ................................................................ [Targets: 0]
Save the target information on a node where LUN is to be deleted.
# targetctl save