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
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.
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.
mmces service start BLOCK -a
After you start the BLOCK service, verify that it is running by running the mmces state show command.
- Enable and start the BLOCK
service:
mmces service enable BLOCK
mmces service start BLOCK
- Verify that the BLOCK service is enabled and
running:
mmces service list
mmces state show
- 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
- 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
- Verify that host is enabled:
mmblock host list
- 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
- Create a spare file of 30GB volume on gpfs1 file
system:
- Define the volume as volume1 for the volume
file:
mmblock volume add --volume-name volume1 -F /gpfs1/volumefile1
- Verify that the volume has been defined:
mmblock volume list
- Map the volume to the iSCSI initiator
host:
mmblock map-volume add --host-alias host1 --volume-name volume1
- Verify that the volume is mapped to the iSCSI initiator
host:
mmblock map-volume list host1
- Install the iscsi initiator
packages:
yum install -y iscsi-initiator-utils
- Start the iscsi initiator
service:
systemctl enable iscsid
systemctl start iscsid
- 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
- 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
- List the iSCSI
devices:
lsscsi --scsi_id [113:0:0:0] disk SCST_FIO volume1 302 /dev/sdz