Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / SUSE Linux Enterprise High Availability Documentation / Quick Start Guides / Installation and Setup Quick Start / Basic iSCSI storage for SBD
Applies to SUSE Linux Enterprise High Availability 15 SP4

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.

Requirements
  • 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:

Procedure A..1: Configuring an iSCSI target
  1. Install the package yast2-iscsi-lio-server:

    # zypper install yast2-iscsi-lio-server
  2. Start the iscsi-lio-server module in YaST:

    # yast2 iscsi-lio-server
  3. In the Service tab, under After reboot, select Start on boot.

  4. Activate Open Port in Firewall.

  5. In the Discovery tab, activate Discovery Authentication.

  6. Under Authentication by Targets, enter a Username and Password.

  7. Under Authentication by Initiators, enter a Mutual Username and Mutual Password. This password must be different from the Authentication by Targets password.

  8. In the Target tab, select Add.

  9. Change the Target name by replacing .com.example.

  10. Add the IP Address of the server.

  11. Select Add.

  12. In the LUN Details window, enter the LUN Path to the 1 GB storage device (for example, /dev/vbd).

  13. Select Ok.

  14. Select Next.

  15. Select Finish to close YaST.

  16. 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:

Procedure A..2: Configuring an iSCSI initiator
  1. Install the package yast2-iscsi-client:

    # zypper install yast2-iscsi-client
  2. Start the iscsid service:

    # systemctl start iscsid
  3. Open the iscsi-client module in YaST:

    # yast2 iscsi-client
  4. In the Discovered Targets tab, select Discovery.

  5. Enter the IP address of the iSCSI target.

  6. Clear No Discovery Authentication.

  7. Under Authentication by Initiator, enter the initiator Username and Password.

  8. Under Authentication by Targets, enter the target Username and Password.

  9. Select Next.

  10. After YaST discovers the iSCSI target, select Connect.

  11. Under Startup, select onboot.

  12. Select Next.

  13. Select Ok to close YaST.

  14. 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/sda

    Look for a line with IBLOCK. In this example, the iSCSI device is /dev/sda.

  15. 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.

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, answer n for this question:

    SBD is already configured to use /dev/disk/by-id/scsi-SLIO-ORG_IBLOCK_... - overwrite (y/n)?