Adding MDisks to storage pools using the CLI

You can use the command-line interface (CLI) to add managed disks (MDisks) to storage pools.

The MDisks must be in unmanaged mode. Disks that already belong to a storage pool cannot be added to another storage pool until they have been deleted from their current storage pool. An MDisk can be deleted from a storage pool under these circumstances:
  • If the MDisk does not contain any extents in use by a volume
  • If you can first migrate the extents in use onto other free extents within the group
Important: Do not add an MDisk using this procedure if you are mapping the MDisk to an image mode volume. Adding an MDisk to a storage pool enables the system to write new data to the MDisk; therefore, any existing data on the MDisk is lost. If you want to create an image mode volume, use the mkvdisk command instead of addmdisk.

If you are using a flash drive managed disk on your system, ensure that you are familiar with the flash drive configuration rules.

The system performs tests on the MDisks in the list before the MDisks are allowed to become part of a storage pool when:
  • Adding MDisks to a storage pool using the addmdisk command
  • Creating a storage pool using the mkmdiskgrp -mdisk command

These tests include checks of the MDisk identity, capacity, status and the ability to perform both read and write operations. If these tests fail or exceed the time allowed, the MDisks are not added to the group. However, with the mkmdiskgrp -mdisk command, the storage pool is still created even if the tests fail, but it does not contain any MDisks. If tests fail, confirm that the MDisks are in the correct state and that they have been correctly discovered.

These events contribute to an MDisk test failure:
  • The MDisk is not visible to all system nodes in the clustered system.
  • The MDisk identity has changed from a previous discovery operation.
  • The MDisk cannot perform read or write operations.
  • The status of the MDisk can be either degraded paths, degraded ports, excluded, or offline.
  • The MDisk does not exist.
These events contribute to an MDisk test timeout:
  • The disk controller system on which the MDisk resides is failing.
  • A SAN fabric or cable fault condition exists that is preventing reliable communication with the MDisk.
Note: The first time that you add a new flash drive to a pool, the flash drive is automatically formatted and set to a block size of 512 bytes.

To add MDisks to storage pools, complete the following steps.

  1. Issue the lsmdiskgrp CLI command to list the existing storage pools.

    This example is a CLI command that you can issue to list the existing storage pools:

    lsmdiskgrp -delim :

    This is an example of the output that is displayed:

  2. Issue the addmdisk CLI command to add MDisks to the storage pool.

    This is an example of the CLI command you can issue to add MDisks to a storage pool:

    svctask addmdisk -mdisk mdisk4:mdisk5:mdisk6:mdisk7bkpmdiskgroup

    Where mdisk4:mdisk5:mdisk6:mdisk7 are the names of the MDisks that you want to add to the storage pool and bkpmdiskgroup is the name of the storage pool for which you want to add the MDisks.