A Basic iSCSI storage for SBD #
Use the following procedures to configure basic iSCSI storage to use with SBD. These procedures are only recommended for testing purposes. Before using iSCSI in a production environment, see Storage Administration Guide for SUSE Linux Enterprise Server.
A SUSE Linux Enterprise Server virtual machine to act as the iSCSI target. This VM is not part of the cluster.
Two virtual storage devices on the VM: a 20 GB device for the system, and a 1 GB device for SBD.
Two SUSE Linux Enterprise Server nodes that have not been added to a High Availability cluster yet.
First, set up an iSCSI target on the virtual machine:
Install the package yast2-iscsi-lio-server:
#zypper install yast2-iscsi-lio-serverStart the
iscsi-lio-servermodule in YaST:#yast2 iscsi-lio-serverIn the tab, under , select .
Activate .
In the tab, activate .
Under , enter a and .
Under , enter a and . This password must be different from the password.
In the tab, select .
Change the name by replacing
.com.example.The of this server should be filled automatically. If not, add the IP address now.
Select .
In the window, enter the to the 1 GB storage device (for example,
/dev/vbd).Select .
Select .
Select to close YaST.
To check the target setup, switch to the target CLI:
#targetcliShow the configuration:
/>ls
Next, set up iSCSI initiators on the nodes. Repeat this procedure on both nodes:
Install the required packages:
#zypper install open-iscsi yast2-iscsi-clientStart the
iscsidservice:#systemctl start iscsidOpen the
iscsi-clientmodule in YaST:#yast2 iscsi-clientIn the tab, select .
Enter the IP address of the iSCSI target.
Clear .
Under , enter the initiator and .
Under , enter the target and .
Select .
After YaST discovers the iSCSI target, select .
Under , select .
Select .
Select to close YaST.
Check the iSCSI initiator:
#lsscsi[0:0:1:0] cd/dvd QEMU QEMU DVD-ROM 2.5+ /dev/sr0 [2:0:0:0] disk LIO-ORG IBLOCK 4.0 /dev/sdaLook for a line with
IBLOCK. In this example, the iSCSI device is/dev/sda.Check the status of the
iscsidservice:#systemctl status iscsid
You can find the stable device name in /dev/disk/by-id/.
Usually, an iSCSI device starts with scsi-SLIO-ORG_IBLOCK.
If you have multiple disks, you can run the command lsblk -o name,serial
to confirm which stable device name corresponds to which short name (for example,
/dev/sda).
When you configure the cluster, specify the stable device name using one of these methods:
When you run
crm cluster init, enter the stable device name when prompted.Before running
crm cluster init, add the stable device name to/etc/sysconfig/sbd:SBD_DEVICE=/dev/disk/by-id/scsi-SLIO-ORG_IBLOCK_DEVICE_ID_STRING
When you run
crm cluster init, answernfor this question:SBD is already configured to use /dev/disk/by-id/scsi-SLIO-ORG_IBLOCK_... - overwrite (y/n)?