vgconvert
Convert volume group metadata format
SYNOPSIS
vgconvert [options] VolumeGroupName
PARAMETERS
-a y|n
Activate or deactivate the Volume Group. 'y' activates, 'n' deactivates.
--activationmode {complete|degraded|partial}
Specifies the activation mode. Options include 'complete', 'degraded', and 'partial'.
-c y|n
Enable or disable clustering for the Volume Group.
--clusterid String
Sets the cluster ID for the Volume Group.
--config String
Uses String to pass command-line configuration overrides. See lvmconfig(8) for details.
-M {0|1}
Converts the Volume Group metadata format. 0 for LVM1, 1 for LVM2. Use with extreme caution and backup your data.
--lockopt String
Used to pass options directly to the locking system.
-l
List LVM devices and other file-system/storage information.
--metadatatype String
Change Volume Group metadata type, see lvm(8) for supported metadata types.
-n
Do not run the command, show what would happen.
--noudevsync
Disable udev synchronisation (useful in multipath environments).
-q
Suppress output messages.
--sysinit
Indicate that command is run from system initialisation scripts.
-t
Run in test mode.
-v
Increase verbosity.
--version
Display the LVM version and exit.
DESCRIPTION
The vgconvert command is used to modify attributes of a Volume Group (VG). Its primary purpose is to activate or deactivate a VG, making its Logical Volumes (LVs) accessible or inaccessible to the system. It can also be used to change the metadata format of the VG, which might be necessary for compatibility with older or newer versions of LVM.
Deactivating a VG makes its LVs unavailable, preventing any I/O operations. This is useful for tasks such as backups, migrations, or maintenance. Activating a VG makes its LVs available, allowing the system to access the data stored within them. Improper use can lead to data loss, so caution should be exercised. Metadata conversion must only be done if a good backup is available as it could render a volume group unreadable. The command provides options to control activation policy, clustering, and other advanced LVM features.
CAVEATS
Metadata conversions (using the -M option) are potentially dangerous and should only be performed with a proper backup strategy in place. Deactivating a VG while it's in use can lead to data corruption or system instability. Verify that no processes are actively using the LVs before deactivation.
ACTIVATION MODES
The different activation modes, like complete, degraded and partial, control how the volume group is activated when there are physical volumes that are missing. Understanding these modes is essential for ensuring data availability in various failure scenarios.
CLUSTERED VOLUME GROUPS
When clustering is enabled on a Volume Group, LVM coordinates its activities across multiple nodes in a cluster. The -c option toggles this functionality, requiring a clustered environment to be correctly configured.