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:
- 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.
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:
- To add a
host:
The system displays the following output:mmblock host add --host-alias host0 -iscsi-name iqn.1994-05.com.example:7c9c9c3c93c1
Configuration successfully updated. Now apply settings on the Protocol nodes. 192.168.40.68: Done mmblock host add: The Host 'host0' was created successfully.
- To list all the created hosts:
The system displays the following output:mmblock host list
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
- To remove a defined host:
The system displays the following output:mmblock host remove host0
Configuration successfully updated. Now apply settings on the Protocol nodes. 192.168.40.68: Done mmblock: The Host 'host0' was removed successfully.
- To manage the storage volume
objects:
The system displays the following output:mmblock volume add --volume-name vol1 -F /ibm/gpfs/VOL1
Configuration successfully updated. Now apply settings on the Protocol nodes. 192.168.40.68: Done mmblock: The Volume 'vol1' was created successfully.
- To remove a volume:
The system displays the following output:mmblock volume remove vol1
Configuration successfully updated. Now apply settings on the Protocol nodes. 192.168.40.68: Done mmblock: The Volume 'vol1' was removed successfully.
- To list all the created volumes:
The system displays the following output:mmblock volume list
Volume Name Backend File --------------------------------- vol1 /ibm/gpfs/VOL1
- To map a volume to a
host:
The system displays the following output:mmblock map-volume add --host-alias host1 --volume-name vol1
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.
- To remove a
mapping:
The system displays the following output:mmblock map-volume remove --host-alias host1 --volume-name vol1
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.
- To list mapping of a host:
The system displays the following output:mmblock map-volume list host1
LUN Volume Name --------------------------------- 1 vol1