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-server
Start the
iscsi-lio-server
module in YaST:#
yast2 iscsi-lio-server
In 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
.Add the
of the server.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:
#
targetcli
Show the configuration:
/>
ls
Next, set up iSCSI initiators on the nodes. Repeat this procedure on both nodes:
Install the package yast2-iscsi-client:
#
zypper install yast2-iscsi-client
Start the
iscsid
service:#
systemctl start iscsid
Open the
iscsi-client
module in YaST:#
yast2 iscsi-client
In 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
iscsid
service:#
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
.
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
, answern
for this question:SBD is already configured to use /dev/disk/by-id/scsi-SLIO-ORG_IBLOCK_... - overwrite (y/n)?