Use the rmvdisk command to delete a volume. This command cannot be
used for high availability volumes. Use the rmvolume command for high
availability volumes.
Syntax
rmvdisk { [ -removehostmappings ] | [ -force ] } { vdisk_id | vdisk_name }
Parameters
- -force
- (Optional) The specified volume is to be deleted, even if mappings still exist between this
volume and one or more hosts. Host-to-volume mappings and any FlashCopy mappings that
exist for this volume are deleted.
Important: If you stop a
FlashCopy mapping that has
dependent
FlashCopy mappings,
the dependent mapping target volumes might become unusable.
If you stop a FlashCopy mapping whose target
volume is also in a Metro Mirror or Global Mirror relationship, the relationship stops. If a
remote copy relationship that is associated with the target was mirroring I/O when the map
was copying, the relationship might lose its difference recording capability and require a
full resynchronization on a subsequent restart.
To determine your dependent FlashCopy mappings before you use
the -force parameter, run the lsfcmapdependentmaps
command.
Important: To prevent an active volume from being deleted
unintentionally, you can use a global system setting to enable volume protection (see the
chsystem command). You can specify a time period for which the volume
must be idle before you can delete it. If volume protection is enabled and the time period is
not expired, the volume deletion fails even if the -force parameter is
used.
If the -force deletion of a volume causes
dependent mappings to be stopped, any target volumes for those mappings that are in Metro
Mirror or Global Mirror relationships are also stopped. The dependent mappings can be
identified by using the lsvdiskdependentmaps command on the volume that you
want to delete. Note: Using the -force parameter might result in a data
loss. Use it only under the direction of your product support information, or if you are
willing to accept the risk of volume data loss.
If you do not specify this parameter, a volume cannot be deleted while
a backup operation is in progress. Additionally, a volume that contains image mode copies
cannot be deleted while a restore operation is in progress (if the volume contains
inconsistent data).
- -removehostmappings
- (Optional) Removes all host mappings for the specified volume before the volume is deleted.
Note: Using the -removehostmappings parameter might result in a data
loss. Use it only under the direction of your product support information, or if you are
willing to accept the risk of volume data loss.
- vdisk_id | vdisk_name
- Specifies the name of the volume to delete, either by ID or by name.
Note: To deactivate compression, use the rmvdiskcopy to
delete the last compressed volume copy for an I/O group.
Description
This command deletes an
existing managed mode volume or an existing image mode volume. The extents that made up this
volume are returned to the pool of free extents that are available on the storage pool, if the
volume is in managed mode.
Remember: If you run this command, any data that was on
the volume is lost. Before you run this command, ensure that the volume (and any data that
resides on it) is no longer required.
This command is unsuccessful if:
- Volume protection is enabled (by using the chsystem command).
- The volume that is being removed received I/O within the defined volume protection time
period.
- The data reduction pool is corrupted.
With an
active-active relationship, either or both of the master and auxiliary volumes
can provide the information for host systems to read through the master volume ID. To remove the
auxiliary volume from the relationship, delete the relationship so hosts can access the master
copy.
Remember: Any
FlashCopy mappings with the
specified volume as their source volume are deleted when you specify this
command.
Deleting a managed mode volume
When you use this
command to delete a managed mode volume, all the data on the volume is deleted. The extents that
make up the volume are returned to the pool of free extents that are available in the storage
pool.
If host mappings exist for the volume, or if any FlashCopy mappings would be affected,
the deletion fails. You can use the -force parameter to force the deletion.
If you use the -force parameter, mappings that have the volume as source or
target are deleted, other mappings in a cascade might be stopped, and then the volume is
deleted. The -force parameter also deletes any Metro Mirror or Global
Mirror relationships that exist for the specified volume (and any information that is not staged
in the fast write cache).
If the volume is in the process of migrating to an image mode
volume (by using the migratetoimage command), the deletion fails unless you
use the -force parameter. If you use the -force
parameter, the migration is halted and then the volume is deleted. Before you run this command,
ensure that the volume (and any data that resides on it) is no longer required.
Deleting an image mode volume
If the volume is
mirrored and one or both copies is in image mode, you must first wait for all fast-write data to
be moved to the controller logical unit. This pause ensures that the data on the controller is
consistent with the data on the image mode volume before the volume is deleted. This process can
take several minutes to complete, and is indicated by the fast_write_state of the volume, which
is empty. If the -force parameter is specified, the fast-write data is
discarded and the volume is deleted immediately; the data on the controller logical unit is left
inconsistent and unusable. If the copies are not synchronized, you must use the
-force parameter.
If you run the command while data is in the
cache, the system attempts to move the data out of the cache; this process can time out,
however.
If any virtual medium errors exist on the volume, the command fails. You can force the deletion
by using the
-force parameter; however, using
-force
can cause data integrity problems.
Note: A virtual medium error occurs when you copy data from
one disk (the source) to another (the target). Reading the source indicates that a medium error
was found. At that moment, you must have two identical copies of data and you must then
simulate a medium error on the target disk. You can simulate a medium error on the target disk
by creating a virtual medium error on the target disk.
If FlashCopy mappings or host
mappings exist for the volume, the deletion fails unless you use the -force
parameter. If you use the -force parameter, mappings are deleted and the
volume is deleted. If any data is not staged in the fast write cache for this volume, the
deletion of the volume fails. When the -force parameter is specified, any
data that is not staged in the fast write cache is deleted. Deleting an image mode volume causes
the managed disk that is associated with the volume to be removed from the storage pool. The
mode of the managed disk is returned to unmanaged.
If the relationship is in consistent_copying or consistent_stopped state,
and the change volume is being used by a Global Mirror relationship that uses multicycling mode,
the relationship moves to inconsistent_copying or inconsistent_stopped state.
Note: If the
relationship is part of a consistency group, the entire group is affected by this state
transition.
The secondary volume becomes corrupted, and inaccessible for host
input/output I/O data, if the following conditions are true:
- A changed volume is part of an idling relationship.
- The changed volume is being used for secondary protection.
- The background copy process is still migrating the change volume data to the secondary
volume.
You must run the
recovervdisk command to regain access to the
volume contents. If all of the following conditions are true, the secondary volume also becomes corrupted:
- The change volume was part of an idling relationship.
- The change volume was being used for a Global Mirror relationship that uses multicycling
mode.
- The relationship was deleted, but the background copy process continued and is still
migrating data to the secondary volume.
In any of these cases, this
recovervdisk command fails unless you
specify the
-force parameter.
Note: - The -force parameter must be used if rmvdisk is
specified and rejected if the volume is a change volume for a relationship.
- If the volume is a change volume for a relationship, specifying rmvdisk
with -force removes the change volume from the relationship.
An invocation example
rmvdisk -force vdisk5
The
resulting output:
No feedback
An invocation
example
rmvdisk -removehostmappings vdisk3
The resulting
output:
No feedback