When deleting all the configurations of the mirroring among servers, after deleting the iSCSI initiator settings on all the node, iSCSI target settings must be deleted by the following procedure.
See
For the deletion procedure of iSCSI initiator settings, refer to "9.6.2 Deleting iSCSI Initiator Settings."
The procedures are different depending on OS version.
[RHEL6]
Delete the iSCSI target settings on both nodes.
Delete the lines from the line of "#GDS netmirror definition start" to the line of "#GDS netmirror definition end".
# vim /etc/tgt/targets.conf
[Example of the lines to be deleted]
#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-3500000e111c56610> lun 1 scsi_id SDX01 </backing-store> </target> #GDS netmirror definition end
The following procedures must not be performed on nodes where programs other than GDS use the SCSI target.
Stop the SCSI target daemon (tgtd).
# service tgtd stop
Set up to avoid the automatic startup of the SCSI target daemon (tgtd) when starting the system.
# chkconfig tgtd off
[RHEL7]
Delete the iSCSI target on both nodes.
Execute the following command on both nodes.
# targetcli /iscsi delete target_name
[Execution example]
# targetcli /iscsi delete iqn.2003-01.org.linux-iscsi.node1.x8664:sn.2613f8620d98
Delete the storage settings on both nodes.
Execute the following command on both nodes.
If there are multiple storages, execute this command for each storage.
# targetcli /backstores/block delete storage_name
[Execution example]
# targetcli /backstores/block delete storage1
Confirm that the setting was deleted on both nodes.
Execute the following command on both nodes.
# targetcli ls
[Output example]
o- / ................................................................................. [...] o- backstores ...................................................................... [...] | o- block .......................................................... [Storage Objects: 0] | o- fileio ......................................................... [Storage Objects: 0] | o- pscsi .......................................................... [Storage Objects: 0] | o- ramdisk ........................................................ [Storage Objects: 0] o- iscsi .................................................................... [Targets: 0] o- loopback ................................................................. [Targets: 0]
Save the target information on both nodes.
Execute the following command on both nodes.
# targetctl save
Delete the directory for setting related to the start and stop order for iSCSI target service.
Execute the following command on both nodes.
# rm -rf /etc/systemd/system/fjsvsdx.service.d/
Apply the start and stop order for iSCSI target service.
Execute the following command on both nodes.
# systemctl daemon-reload
Confirm the start and stop order for iSCSI target service.
Execute the following command on both nodes.
# systemctl show fjsvsdx.service | grep "After="
After=iscsi-shutdown.service iscsi.service ...
Point
Confirm that target.service is not output.
The following procedure must not be performed on nodes where programs other than GDS use iSCSI target (LIO).
Set up to avoid the automatic startup of iSCSI target service when starting the system.
Execute the following command on both nodes.
# systemctl disable target.service