LVM command Summary

Source: Internet
Author: User
LVM command abstract-general Linux technology-Linux technology and application information. The following is a detailed description. Description
Extendfs

Extended File System: # extendfs/dev/vg00/rlvol3
Lvchange

Modify the features of a logical volume:
# Lvchange-t 60/dev/vg00/lvol3
Lvcreate

Create a logical volume in the volume group:
# Lvcreate-L 100/dev/vg00
Lvdisplay

Display information about logical volumes:
# Lvdisplay-v/dev/vg00/lvol1
Lvextend

Add an image to a logical volume
# Lvextend-m 1/dev/vg00/lvol3
Lvextend

Increase the logical volume size
# Lvextend-L 120/dev/vg00/lvol3
Lvlnboot

Prepare to use the logical volume as the root region, swap region, or dump region:
# Lvlnboot-d/dev/vg00/lvol2
Lvmerge

Merge the split volume into a logical volume:
# Lvmerge/dev/vg00/lvol4b/dev/vg00/lvol4
Lvreduce

Reduce the logical volume size:
# Lvreduce-L 100/dev/vg00/lvol3
Lvreduce

Reduce the number of logical volume image copies:
# Lvreduce-m 0/dev/vg00/lvol3
Lvremove

Delete a logical volume from a volume group:
# Lvremove/dev/vg00/lvol6
Lvrmboot

Delete the logical volume link to the root region, swap region, or dump region:
# Lvrmboot-d/dev/vg00/lvol2
Lvsplit

Split an image logical volume into two logical volumes:
# Lvsplit/dev/vg00/lvol4
Lvsync

Synchronize outdated logical volume images:
# Lvsync/dev/vg00/lvol1
Pvchange

Change the features of a physical volume:
# Pvchange-a n/dev/disk/disk2
Pvck

Perform consistency check on physical volumes:
# Pvck/dev/disk/disk47_p2
Pvcreate

Create a physical volume as part of the volume group:
# Pvcreate/dev/rdisk/disk2
Pvdisplay

Displays information about the physical volume:
# Pvdisplay-v/dev/disk/disk2
Pvmove

Move a disk from one physical volume to another:
# Pvmove/dev/disk/disk2/dev/disk/disk3
Pvremove

Delete the LVM data structure from the physical volume:
# Pvremove/dev/rdisk/disk2
Vgcfgbackup

Save the LVM configuration of the volume group:
# Vgcfgbackup vg00
Vgcfgrestore

Restore LVM Configuration:
# Vgcfgrestore-n/dev/vg00/dev/rdisk/disk2
Vgchange

Open or close a volume group:
# Vgchange-a y/dev/vg00
Vgchgid

Change the volume group ID of the physical volume:
# Vgchgid/dev/rdisk/disk3
Vgcreate

Create a volume group:
# Vgcreate/dev/vg01/dev/disk/disk2/dev/disk/disk3
Vgdisplay

Displays information about the volume group:
# Vgdisplay-v/dev/vg00
Vgextend

Expand the volume group by adding physical volumes:
# Vgextend/dev/vg00/dev/disk/disk2
Vgexport

Delete a volume group from the system:
# Vgexport/dev/vg01
Vgimport

Add an existing volume group to the system:
# Mkdir/dev/vg04
# Mknod/dev/vg04/group c 640x0n0000
# Vgimport-v/dev/vg04
(N numbers are unique among all volume groups ).
Vgmodify

Modify the configuration parameters of a volume group:
# Vgmodify-v-t-n-r/dev/disk/disk3
Vgscan

Scan the system disk of the volume group:
# Vgscan-v
Vgreduce

Delete one or more physical volumes from the volume group to narrow down the volume group:
# Vgreduce/dev/vg00/dev/disk/disk2
Vgremove

Delete the volume group definition from the system and disk:
# Vgremove/dev/vg00/dev/disk/disk2
Vgsync

Synchronize all mirror logical volumes in the volume group:
# Vgsync vg00

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.