varyoffvg Command

Purpose

Deactivates a volume group.

Syntax

varyoffvg [ -s ] VolumeGroup

Description

The varyoffvg command deactivates the volume group specified by the VolumeGroup parameter along with its associated logical volumes. The logical volumes first must be closed. For example, if the logical volume contains a file system, it must be unmounted.

To activate the volume group, use the varyonvg command.

Note: To use this command, you must either have root user authority or be a member of the system group.

You can use the System Management Interface Tool (SMIT) to run this command. To use SMIT, enter:

smit varyoffvg
Notes:
  • A volume group that has a paging space volume on it cannot be varied off while the paging space is active. Before you deactivate a volume group with an active paging space volume, ensure that the paging space is not activated automatically at system initialization, and then reboot the system.
  • The varyoffvg command discards any background space reclamation process that is running for the volume group. To identify whether a space reclamation is running, you can use the lvmstat command with -r option.

Flag

Item Description
-s Puts the volume group into System Management mode, so that only logical volume commands can be used on the volume group. In this mode, no logical volume can be opened or accessed by users.

Exit Status

This command returns the following exit values:
Item Description
0 Successful completion.
>0 An error occurred.

Security

Attention RBAC users and Trusted AIX 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 associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To deactivate volume group vg03, enter:
    varyoffvg vg03
  2. To deactivate volume group vg02, but allow logical volume commands to continue to take effect, enter:
    varyoffvg  -s vg02
    Logical volumes within the volume group cannot be opened, but logical volume commands continue to take effect.

File

Item Description
/usr/sbin/varyoffvg Contains the varyoffvg command.