Configuring and enabling the BLOCK service

If you have not previously enabled and started the Cluster Export Services (CES) BLOCK service, enable and start it now. The iSCSI protocol in IBM Spectrum Scale™ is referred to as the BLOCK service.

Prerequisites

All CES nodes must be running the Red Hat Enterprise Linux 7 and later.

The block service is provided as gpfs.scst rpm package. After the rpm installation, you need to compile its Linux kernel modules by running mmbuildgpl command on each protocol node.

Enabling BLOCK services

To enable the BLOCK service, type:
mmces service enable BLOCK
The system displays the following prompt message:
Block device support in Spectrum Scale is intended for use only in diskless node
remote boot (non-performance-critical), and is not suited for high-bandwidth
block device access needs. Confirm that this matches your use case before enabling
the block service. If you have any questions contact scale@us.ibm.com
Do you want to continue to enable BLOCK service? (yes/no)

To continue to enable the BLOCK service, type Yes and press Enter.

The system displays the following message:
c40bbc1xn12.gpfs.net: Loading and configuring SCST
mmchconfig: Command successfully completed
mmchconfig: Propagating the cluster configuration data to all
affected nodes. This is an asynchronous process.
The iSCSI protocol must be started on all CES nodes:
mmces service start BLOCK -a 

After you start the BLOCK service, verify that it is running by running the mmces state show command.

Note: Start and stop are maintenance commands. Stopping the BLOCK service on a protocol node, without first suspending the node means that the public IP addresses stay with that node even if the BLOCK service is not available on that node. In this event, protocol clients might attempt to connect using these IP addresses and fail to connect to the BLOCK service.
The following example describes the usage of the BLOCK service:
  1. Enable and start the BLOCK service:
    mmces service enable BLOCK
    mmces service start BLOCK
  2. Verify that the BLOCK service is enabled and running:
    mmces service list
    mmces state show
  3. Define a host name for iSCSI initiator.

    See the hardware and operating system documentation to retrieve the initiator name. The initiator name of the Linux software iSCSI initiator can be found in /etc/iscsi/initiatorname.iscsi.

    cat /etc/iscsi/initiatorname.iscsi
    InitiatorName=iqn.1994-05.com.redhat:793ad27cb3c
  4. Define the host for the iSCSI initiator as the name of host1:
    mmblock host add --host-alias host1 --iscsi-name iqn.1994-05.com.redhat: 793ad27cb3c
  5. Verify that host is enabled:
    mmblock host list
  6. Create the volume file.
    Assume that the GPFS™ file system gpfs1 is mounted at /gpfs1. Perform one of the following operations:
    • Create a spare file of 30GB volume on gpfs1 file system:
      dd if=/dev/zero of=/gpfs1/volumefile1 seek=30000 bs=1M count=1
    • Create a preallocated file of 30GB volume on gpfs1 file system:
      dd if=/dev/zero of=/gpfs1/volumefile1 bs=1M count=30000
  7. Define the volume as volume1 for the volume file:
    mmblock volume add --volume-name volume1 -F /gpfs1/volumefile1
  8. Verify that the volume has been defined:
    mmblock volume list
  9. Map the volume to the iSCSI initiator host:
    mmblock map-volume add --host-alias host1 --volume-name volume1
  10. Verify that the volume is mapped to the iSCSI initiator host:
    mmblock map-volume list host1
The iSCSI volume can be used by the iSCSI initiator host.
See the hardware and operating system documentation to configure the iSCSI initiator. The following uses the Linux software iSCSI initiator running on the Red Hat Enterprise Linux 7 host.
  1. Install the iscsi initiator packages:
    yum install -y iscsi-initiator-utils
  2. Start the iscsi initiator service:
    systemctl enable iscsid
    systemctl start iscsid
  3. Discover the iSCSI target by specifying the CES IP address as the target portal address:
    Note: You can query CES IP by running the mmlscluster –ces command on the GPFS CES node.
    iscsiadm -m discovery -t st -p 192.168.6.47
    192.168.6.47:3260,1 iqn.1986-03.com.ibm:spectrumscale.192.168.6.47
  4. Open an iSCSI session by logging in to the system:
    iscsiadm -m node --targetname=iqn.1986-03.com.ibm:spectrumscale.192.168.6.47 --login
  5. List the iSCSI devices:
    lsscsi --scsi_id
    [113:0:0:0]  disk    SCST_FIO volume1   302  /dev/sdz