Configuring iSCSI in an HA Deployment
To use an iSCSI device in an HA environment, you must configure the primary and secondary HA hosts to use the same iSCSI external storage device.
- Use SSH to log in to the secondary HA host as the root user.
- To configure your HA secondary host to identify the iSCSI
device volume, add the iSCSI qualified name for
your host to the
/etc/iscsi/initiatorname.iscsi
file.Initiatorname=iqn.yyyy-mm.{reversed domain name}:hostname
- Restart the iSCSI service to open a session to the server
by typing the following command:
systemctl restart iscsi
- To detect the volume on the iSCSI server, type the following
command:
iscsiadm -m discovery --type sendtargets --portal IP address:[port]
Note The port is optional.
- Verify the login to your iSCSI server by typing the following
command:
iscsiadm -m node --targetname <initiator_name_from_the_previous_step> --portal <IP_address: [port]> -- login
- To find the iSCSI device volume name, type the following
command:
dmesg | grep “Attached SCSI disk”
- To create a partition, use the GNU parted command:
parted /dev/volume
For more information about partitions, see Configuring the iSCSI Volumes.
- Configure the mount point for the secondary HA host.
If you are moving the
/store
file system, unmount the file systems by typing the following commands:umount /store
Identify the UUID of the iSCSI device partition by typing the following command:
blkid /dev/partition
If you are moving the
/store
file system, edit the file settings in the/etc/fstab
file to be the same as the mount points that might be listed in the/etc/fstab file
on the HA primary host:/store
For the
/store
partition, use the sameUUID
value used for the/store
partition on the primary.
If you are moving the
/store/ariel
file system, edit the settings in the/etc/fstab
file to be the same as the mount point that is listed in the/etc/fstab file
on the HA primary host for/store/ariel
.
- Configure the secondary HA host to automatically mount
the iSCSI volume.
Add the iSCSI script to the startup information by typing the following commands:
systemctl enable iscsi
Enable the iscsi-mount service by typing the following command:
systemctl enable iscsi-mount
If you are moving the
/store
file system, remove the local copy of /store by typing the following commands:lvchange -an /dev/storerhel/store 2>/dev/null
lvremove /dev/storerhel/store 2>/dev/null
See Verifying ISCSI Connections.