Note: The operation of any disk may damage the data inside, please back up the data in advance, remember! Remember! Remember!
0X00:LVM Common Command control.
some basic operations for the LVM underlying PV
For the underlying PV, the commands for the operation are shown in the following table:
Command |
explain |
Pvchange |
Controls whether the specified PV can assign new space permissions |
Pvck |
Check the consistency of the LVM metadata for PV |
Pvcreate |
Convert the specified disk or partition to PV |
Pvdisplay |
View the current PV situation of the system in detail |
Pvmove |
Move a PV data inside the same VG volume group into another PV |
Pvremove |
Remove PV tags, i.e. remove PV |
PVs |
Briefly view the current PV situation of the system |
Pvresize |
When the PV corresponding device partition (such as MD soft RAID) is expanded, the command can be used to enlarge the PV |
Pvscan |
Scan all device files with PV tags |
some basic operations for LVM mid-level VG
For the middle-level VG, the command for the operation is shown in the following table
Command |
Command Explanation |
Vgcfgbackup |
Backup VG Profile (default/etc/lvm/backup, also freely specified) |
Vgcfgrestore |
The VG metadata is recovered from the backed up VG description file |
Vgck |
Check VG |
Vgchange |
Modify the properties of a particular VG, including whether it is active, uuid number, ... |
Vgconvert |
Modify the VG metadata format, for example, change from LVM1 to LVM2 |
Vgcreate |
Create a VG Volume group |
VGs |
Briefly view the system VG Volume group situation |
Vgdisplay |
View the usage of the System VG Volume group in detail |
Vgexport |
Change a specific VG to an unknown state for migrating volume groups to other systems |
Vgimport |
Change a specific VG volume group in an unknown state to a normal state for migrating volume groups to other systems |
Vgextend |
Adding PV to a specific VG |
Vgimportclone |
Used to import duplicate volume groups (for example, a snapshot of a volume group) and modify their UUID |
Vgmerge |
Merging multiple volume groups under specific conditions |
Vgmknodes |
Re-create Volume group device directory and Logical volume special files |
Vgreduce |
Remove unused PV from a specific VG |
Vgremove |
Remove a specific VG |
Vgrename |
Renames the name of the specified VG |
Vgsplit |
Moves the specified PV from one VG to another |
Vgscan |
The VG of the scanning system |
some basic operations for the upper LV of LVM
for the upper LV, the Operations command is shown in the following table:
Command |
Command Explanation |
Lvchange |
Modifies some properties of the specified LV, including whether it is active, read-only ... |
Lvconvert |
Converts the properties of a specified LV, from linear to mirror or snapshot |
Lvcreate |
Create LV |
Lvs |
Briefly view the LV situation within the system |
Lvdisplay |
View the LV situation in detail in the system |
Lvextend |
Expands the capacity size of the specified LV |
Lvm |
A shell tool for managing LVM |
Lvmconf |
LVM configuration modifier |
Lvmconfig |
Tools for viewing LVM configuration |
Lvmdiskscan |
Scan all LVM2 visible devices |
Lvmdump |
Create a dump file of LVM for diagnosing |
Lvmetad |
Daemon for caching LVM meta data |
Lvmpolld |
The polling daemon for LVM operations commands |
Lvreduce |
Indent the specified LV |
Lvremove |
Deletes the specified LV |
Lvrename |
Renames the specified LV |
Lvresize |
Adjusts the size of the specified LV, which can be expanded or scaled |
Lvscan |
LV of the scanning system |
Reference article:
Http://www.linuxidc.com/Linux/2017-05/143774.htm
This article is from the "Enlightened Grocery store" blog, please be sure to keep this source http://wutou.blog.51cto.com/615096/1980918
Linux two disk mount pointing to a folder LVM Disk Management (III)