mmblock command

Manages the iSCSI block service.

Synopsis

mmblock host add -H | --host-alias HostAlias -i | --iscsi-name iscsiInitiator

or

mmblock host list [-Y]

or

mmblock host remove -H | --host-alias HostAlias 

or

mmblock volume add -v|--volume-name VolumeName -f|--file FilePath

or

mmblock volume remove -v | --volume-name VolumeName 

or

mmblock volume list [-Y]

or

mmblock map-volume add -H|--host-alias HostAlias -v|--volume-name VolumeName[-l|--lun LUNID]

or

mmblock map-volume remove -H|--host-alias HostAlias -v|--volume-name VolumeName

or

mmblock map-volume list {-H | --host-alias HostAlias | -a | -all} [-f | --file] [-Y]

Availability

Available on all IBM Spectrum Scale editions.

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:
  • Contact an IBM Client Technical Specialist.
  • Send an email to scale@us.ibm.com.
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.
-H | --host-alias HostAlias
Specifies the name of the host.
-i | --iscsi-name iscsiInitiator
Specifies the name of the iSCSI in the IQN or the EUI format.
list
Lists all the created hosts.
-Y
Displays the command output in a parseable format with a colon (:) as a field delimiter. Each column is described by a header.
Note: Fields that have a colon (:) are encoded to prevent confusion. For the set of characters that might be encoded, see the command documentation of mmclidecode. Use the mmclidecode command to decode the field.
remove
Removes a defined host.
-H | --host-alias HostAlias
Specifies the name of the host that must be deleted.
volume
Manages storage volume objects.
add
Creates a volume.
-v | --volume-name VolumeName
Specifies the name of the volume.
-f | --file 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
-v | --volume-name VolumeName
Specifies the name of the volume that must be removed.
list
Lists all the defined volumes.
-Y
Displays the command output in a parseable format with a colon (:) as a field delimiter. Each column is described by a header.
Note: Fields that have a colon (:) are encoded to prevent confusion. For the set of characters that might be encoded, see the command documentation of mmclidecode. Use the mmclidecode command to decode the field.
map-volume
Manages storage volume mappings.
add
Maps a volume to a host.
-H | --host-alias HostAlias
Specifies the name of the host.
-v | --volume-name VolumeName
Specifies the name of the volume.
-l | --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.
-H | --host-alias HostAlias
Specifies the name of the host.
-v | --volume-name VolumeName
Specifies the name of the volume.
list
Lists the mapping of a host.
-H | --host-alias HostAlias
Specifies the name of the host that must be listed.
-a | -all
Lists the map volume of all the hosts.
-f | --file
Lists the file path of the volume.
-Y
Displays the command output in a parseable format with a colon (:) as a field delimiter. Each column is described by a header.
Note: Fields that have a colon (:) are encoded to prevent confusion. For the set of characters that might be encoded, see the command documentation of mmclidecode. Use the mmclidecode command to decode the field.

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 --host-alias 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 --file /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 --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 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 --host-alias host1
    The system displays the following output:
    LUN    Volume Name
    ---------------------------------
     1      vol1

Location

/usr/lpp/mmfs/bin