Archive for March, 2012

Activating and Deactivating Volume Groups

When you create a volume group it is, by default, activated. This means that the logical volumes in that group are accessible and subject to change.

There are various circumstances for which you need to make a volume group inactive and thus unknown to the kernel. To deactivate or activate a volume group, use the -a (–available) argument of the vgchange command.

The following example deactivates the volume group my_volume_group.

# vgchange -a n my_volume_group

If clustered locking is enabled, add ā€™eā€™ to activate or deactivate a volume group exclusively on one node or ā€™lā€™ to activate or/deactivate a volume group only on the local node. Logical volumes with single-host snapshots are always activated exclusively because they can only be used on one node at once.

vgchange - change attributes of a volume group
vgchange allows you to change the attributes of one or more volume groups. Its main purpose is to activate and deactivate VolumeGroupName, or all volume groups if none is specified. Only active volume groups are subject to changes and allow access to their logical volumes.

During volume group activation, if vgchange recognizes snapshot logical volumes which were dropped because they ran out of space, it displays a message informing the administrator that such snapshots should be removed.
EXAMPLES
To activate all known volume groups in the system:

vgchange -a y

To change the maximum number of logical volumes of inactive volume group vg00 to 128.

vgchange -l 128 /dev/vg00

« Prev