rmlv Command

Purpose

Removes logical volumes from a volume group.

Syntax

rmlv-B ] [  -f ] [ -w  ] [  -p Physical Volume LogicalVolume ...

Description

Attention: This command destroys all data in the specified logical volumes.
The rmlv command removes a logical volume. The LogicalVolume parameter can be a logical volume name or logical volume ID. The logical volume first must be closed. If the volume group is varied on in concurrent mode, the logical volume must be closed on all the concurrent nodes on which volume group is varied. For example, if the logical volume contains a file system, it must be unmounted. However, removing the logical volume does not notify the operating system that the file system residing on it have been destroyed. The command rmfs updates the /etc/filesystems file.
Note:
  1. To use this command, you must either have root user authority or be a member of the system group.
  2. You cannot use the rmlv command on a snapshot volume group or a volume group that has a snapshot volume group.
  3. You cannot use the rmlv command on an active firmware that is assisted dump logical volume.
  4. In AIX® 7.2 Technology Level 1, or later, after the partition is freed by running the rmlv command, the space reclamation process runs for the freed partition.
  5. Delete the key server and key file authentication methods of all encrypted logical volumes that are configured on the physical volumes before you run the rmlv command. The rmlv command deletes only the Platform keystore (PKS) authentication method before the encrypted logical volume is deleted.

You can also use the System Management Interface Tool (SMIT) smit rmlv fast path to run this command.

Flags

Table 1. Flags
Item Description
-B Issues a chlvcopy -B -s for the parent logical volume if the logical volume was created by using the -l flag. If it is a regular logical volume, then the -B flag is ignored.
-f Removes the logical volumes without requesting confirmation.
-p PhysicalVolume Removes only the logical partition on the PhysicalVolume. The logical volume is not removed unless there are no other physical partitions allocated.
Attention: If the logical volume spans multiple physical volumes, the removal of only logical partitions on the PhysicalVolume can jeopardize the integrity of the entire logical volume.
-w Waits for the completion of the space reclamation process.
Note: The wait time for space reclaim completion depends on the number of physical partitions.

Security

RBAC users
Attention RBAC users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations that are associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

Attention: The command that is used in this example destroys all data in the logical volumes.

To remove logical volume lv05 without requiring user confirmation, enter the following command:

rmlv  -f lv05

The logical volume is removed from the volume group.

Files

Table 2. Files
Item Description
/usr/sbin/rmlv Directory where the rmlv command resides.
/tmp Directory where the temporary files are stored while the command is running.
/etc/filesystems Lists the known file systems and defines their characteristics.