Start of change

mmblock command

Manages the iSCSI block service.

Synopsis

mmblock host add --host-alias HostAlias --iscsi-name iscsiInitiator

or

mmblock host list 

or

mmblock host remove HostAlias 

or

mmblock volume add --volume-name VolumeName -F FilePath

or

mmblock volume remove VolumeName 

or

mmblock volume list

or

mmblock map-volume add --host-alias HostAlias --volume-name VolumeName[--lun LUN]

or

mmblock map-volume remove --host-alias HostAlias --volume-name VolumeName

or

mmblock map-volume list HostAlias

Availability

Available with IBM Spectrum Scale™ Standard Edition or higher.

Description

Important: The block service is intended to be used only for the remote booting of diskless nodes. This service is not intended for performance-critical block storage access, and is not supported for such usage. Contact IBM® if you have questions about your use case and to get instructions for enabling the mmblock command. To contact IBM, perform one of the following steps:
The environment in which you plan to use the block service must meet the following requirements:
  • The environment is a valid CES environment.
  • The block service is used only for diskless boot of an OS image.
Provide information that supports these two requirements when you contact IBM.

The mmces command supports the iSCSI protocol by the implementation of the BLOCK service. See the first set of examples at the end of this topic.

The mmblock command manages the BLOCK service and provides the following features:
  • Administering block hosts.
  • Administering block volumes.
  • Administering block volume mappings.

Parameters

host
Administers block hosts.
add
Defines a host.
--host-alias HostAlias
Specifies the name of the host.
--iscsi-name iscsiInitiator
Specifies the name of the iSCSI in the IQN or the EUI format.
list
Lists all the created hosts.
remove
Removes a defined host.
HostAlias
Specifies the name of the host that must be deleted.
volume
Manages storage volume objects.
add
Creates a volume.
--volume-name VolumeName
Specifies the name of the volume.
-F FilePath
Specifies the filepath. The filepath must be absolute. For example, /ibm/gpfs/xyz can be provided as the absolute filepath. Before you run the command, preallocate the file. For example, use dd if=/dev/zero of=/ibm/gpfs/xyz bs=1M count=1024 to allocate a file of 1GiB in size.
remove
Removes a defined volume.
VolumeName
Specifies the name of the volume that must be removed.
list
Lists all the defined volumes.
map-volume
Manages storage volume mappings.
add
Maps a volume to a host.
--host-alias HostAlias
Specifies the name of the host.
--volume-name VolumeName
Specifies the name of the volume.
--lun LUN
Specifies the LUN (Logical Unit Number) of the mapping. The value is an integer starting from 0. If LUN is not provided, the system selects an unused LUN starting from 0.
remove
Removes a mapping.
--host-alias HostAlias
Specifies the name of the host.
--volume-name VolumeName
Specifies the name of the volume.
list
Lists the mapping of a host.
HostAlias
Specifies the name of the host that must be listed.

Exit status

0
Successful completion.
Nonzero
A failure occurred.

Security

You must have root authority to run the mmblock command.

The node on which the command is issued must be able to execute remote shell commands on any other CES node in the cluster without the use of a password and without producing any extraneous messages.

Examples

The following examples show how to use the mmblock command to manage the block service:
  1. To add a host:
    mmblock host add --host-alias host0 -iscsi-name iqn.1994-05.com.example:7c9c9c3c93c1
    The system displays the following output:
    Configuration successfully updated. Now apply settings on the Protocol nodes.
    192.168.40.68:  Done
    mmblock host add: The Host 'host0' was created successfully.
  2. To list all the created hosts:
    mmblock host list
    The system displays the following output:
    Host Name     Initiator
    ---------------------------------
     host0         iqn.1994-05.com.example:7c9c9c3c93c1
     host1         iqn.2001-04.com.example:diskarrays-sn-a8675309
     host2         iqn.2001-04.com.example.storage:tape.sys1.xyz
     host4         iqn.1995-11.com.example.ssp:customers.4567.disks.107
     host5         eui.02004567a425678d
  3. To remove a defined host:
    mmblock host remove host0
    The system displays the following output:
    Configuration successfully updated. Now apply settings on the Protocol nodes.
    192.168.40.68:  Done
    mmblock: The Host 'host0' was removed successfully.
  4. To manage the storage volume objects:
    mmblock volume add --volume-name vol1 -F /ibm/gpfs/VOL1
    The system displays the following output:
    Configuration successfully updated. Now apply settings on the Protocol nodes.
    192.168.40.68:  Done
    mmblock: The Volume 'vol1' was created successfully.
  5. To remove a volume:
    mmblock volume remove vol1
    The system displays the following output:
    Configuration successfully updated. Now apply settings on the Protocol nodes.
    192.168.40.68:  Done
    mmblock: The Volume 'vol1' was removed successfully.
  6. To list all the created volumes:
    mmblock volume list
    The system displays the following output:
    Volume Name   Backend File
    ---------------------------------
     vol1          /ibm/gpfs/VOL1
  7. To map a volume to a host:
    mmblock map-volume add --host-alias host1 --volume-name vol1
    The system displays the following output:
    Configuration successfully updated. Now apply settings on the Protocol nodes.
    192.168.40.68:  Done
    mmcesblockcmd: The Volume 'vol1' was mapped at LUN 1 of Host 'host1' successfully.
  8. To remove a mapping:
    mmblock map-volume remove --host-alias host1 --volume-name vol1
    The system displays the following output:
    Configuration successfully updated. Now apply settings on the Protocol nodes.
    192.168.40.68:  Done
    mmblock: The Volume 'vol1' was removed from LUN 1 of Host 'host1' successfully.
  9. To list mapping of a host:
    mmblock map-volume list host1
    The system displays the following output:
    LUN    Volume Name
    ---------------------------------
     1      vol1

Location

/usr/lpp/mmfs/bin
End of change