rmmdisk

You can use the rmmdisk command to delete a managed disk from a managed disk group. There are some constraints on this command.

Syntax

Read syntax diagramSkip visual syntax diagram>>- svctask -- -- rmmdisk -- ----------------------------------->

>-- -mdisk --+- mdisk_id_list ---+-- --+----------+-- ---------->
             '- mdisk_name_list -'     '- -force -'

>--+- mdisk_group_id ---+--------------------------------------><
   '- mdisk_group_name -'

Parameters

-mdisk mdisk_id_list | mdisk_name_list
Specifies one or more managed disk IDs or names to delete from the group.
-force
Optionally specifies the force flag. If you do not supply the -force flag and virtual disks exist that are made from extents on one or more of the managed disks specified, the command will fail. If you do supply the force flag, and virtual disks exist that are made from extents on one or more of the managed disks specified, any data on the disks will be migrated to other disks in the group if there are enough free extents in the group. This operation might take some time.
mdisk_group_id | mdisk_group_name
Specifies the ID or name of the managed disk group to delete the disk, or disks, from.

Description

This command attempts to remove the managed disk or disks from the group.

Deleting a managed disk from a group can only be done if the managed disk does not contain any extents in use by a virtual disk. If there are extents in use and you do not supply the force flag, the command will fail.

Attention: Attention: If this disk being removed has already been powered down, removed, or is suffering a power outage, the migrate will be pending and will not complete until the MDisk comes back online. This also means that the MDisk will not be removed from the list of MDisks contained in the group.

The rmmdisk command will fail if there are insufficient free extents on other disks in the mdisk group for the duration of the command. To avoid this problem, do not issue new commands that use extents until rmmdisk is completed.

If you do specify the force flag, an attempt will be made to migrate the extents that are in use onto other free extents within the group. If there are not enough free extents in the group, the command will fail even if the force flag is specified.

If you still want to delete the disks from the group, you have the following options:

  1. Delete the virtual disk that is using the extents specified on the managed disk.
  2. Add more managed disks to the group, rerun the command and specify the -force flag.

When data is being migrated off the managed disk, it might take some time for the command to be completed. The command itself will return with a success code, notifying you that migration is in progress. An event will be logged when the migration is complete and the disk will be deleted from the group at this time. You can also check the progress of any active migrations by running the svcinfo lsmigrate command.

Possible failures

Examples

An invocation example

svctask rmmdisk -mdisk mdisk12 -force Group3