Set the following configuration for all nodes in which the mirroring function among servers is used.
The setting procedures are different depending on OS version.
[RHEL6]
Check that the scsi-target-utils package and the sg3_utils package are installed.
# rpm -q scsi-target-utils scsi-target-utils-xxxxxxxx # rpm -q sg3_utils sg3_utils-xxxxxxxx |
If the package is not installed, install the package from an installation CD for OS of the target system.
Check that the iscsi-initiator-utils package is installed.
# rpm -q iscsi-initiator-utils
iscsi-initiator-utils-xxxxxxxx |
If the package is not installed, install the package from an installation CD for OS of the target system.
Change the setting of the stop order for the SCSI target daemon (tgtd).
# vim /etc/init.d/tgtd |
[Before change]
#!/bin/sh # # chkconfig: - 39 35 ... |
[After change]
#!/bin/sh # # chkconfig: - 39 90 ... |
Register the SCSI target daemon (tgtd) again.
# chkconfig --del tgtd # chkconfig --add tgtd |
Set to automatically start the SCSI target daemon (tgtd) when the system is started.
# chkconfig tgtd on |
Note
If the scsi-target-utils package was upgraded by using kernel upgrade or errata, it is necessary to repeat procedures 3 to 5.
[RHEL7]
Check that the targetcli package has already been installed.
# rpm -q targetcli |
Set the start and stop order for iSCSI target service.
Create the directory, /etc/systemd/system/fjsvsdx.service.d.
# mkdir /etc/systemd/system/fjsvsdx.service.d # chmod 755 /etc/systemd/system/fjsvsdx.service.d |
Create the setting file within the created directory.
# touch /etc/systemd/system/fjsvsdx.service.d/netmirror.conf # chmod 644 /etc/systemd/system/fjsvsdx.service.d/netmirror.conf |
Add the following content to the setting file.
[Unit] After=target.service |
Apply the setting of the start and stop order for iSCSI target service.
# systemctl daemon-reload |
Check the setting of the start and stop order for iSCSI target service.
# systemctl show fjsvsdx.service | grep "After=" |
Confirm that target.service is output.
Set to automatically start the iSCSI target service when the system is started.
# systemctl enable target.service |