Wiki‎ > ‎

LVM commands on an external eSata/USB3 enclosure

posted Dec 4, 2017, 2:53 PM by Dong Xu   [ updated Dec 4, 2017, 2:53 PM ]

Volume Group commands

vgscan

Scans all the disks for volume groups and rebuilds the LVM cache file, also displays the volume groups.


vgchange -a n/y my_volume_group

Deactivate/activate a volume group

vgremove my_volume_group

Removes a volume group that contains no logical volumes.

vgrename vg02 my_volume_group
Renames a volume group
To move a volume group do the following:
First host:
  1. Set state to inactive
  2. vgexport my_volume_group
Second host:
  1.  vgimport my_volume_group
  2. Set the state to active

Reference: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/4/html/Cluster_Logical_Volume_Manager/index.html
Comments