You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
682 B
42 lines
682 B
10 years ago
|
<b>LVM cheatsheet</b>
|
||
|
|
||
|
Here is a cheatsheet for LVM:
|
||
|
|
||
|
LVM exists in the following order:
|
||
|
|
||
|
-PV (physical volume)
|
||
|
-VG (volume group)
|
||
|
-LV (logical volume)
|
||
|
|
||
|
Create a physical volume
|
||
|
|
||
|
pvcreate /dev/hdX1
|
||
|
pvscan
|
||
|
pvdisplay
|
||
|
|
||
|
Create a volume group
|
||
|
|
||
|
vgcreate vg_name /dev/hdX1 /dev/hdX2
|
||
|
vgscan
|
||
|
vgdisplay
|
||
|
|
||
|
Create a logical volume
|
||
|
|
||
|
lvcreate -L 10G -n lv_name vg_name
|
||
|
lvscan
|
||
|
lvdisplay
|
||
|
|
||
|
Activate an external LVM volume
|
||
|
Usefull when you are repairing an external harddisk with a LVM volume.
|
||
|
|
||
|
lvscan
|
||
|
lvchange -a y lv_name
|
||
|
lvscan
|
||
|
|
||
|
Disable an external LVM volume
|
||
|
Usefull when you are repairing an external harddisk with a LVM volume.
|
||
|
|
||
|
lvscan
|
||
|
lvchange -a n lv_name
|
||
|
lvscan
|