LVM management includes the following parts:
1. vg
* vgcreate
vgcreate vg0 /dev/sda5 /dev/sda6 (sda5, sda6 are in vg0)
* vgscan
* vgdisplay
* vgextend
[root@san iscsi]# vgextend vg0 /dev/sda5
Volume group "vg0" successfully extended
* vgreduce
[root@san iscsi]# vgreduce vg0 /dev/sda5
Removed "/dev/sda5" from volume group "vg0"
* vgchange
* vgremove
2. lv
#lvcreate -L 30G vg0
3. lvm
The following is the operation when I want to create one LV on my host.
------------------------------------------------------------
[root@localhost kvm-test]# losetup --offset $((1034240*512)) /dev/loop0 fedora.img
[root@localhost kvm-test]# lvmdiskscan
[root@localhost kvm-test]# vgdisplay
[root@localhost kvm-test]# vgcreate vg0 /dev/loop0
[root@localhost kvm-test]# ls /dev/mapper/
[root@localhost kvm-test]# lvcreate -L 29G vg0
[root@localhost kvm-test]# vgdisplay
[root@localhost kvm-test]# lvdisplay
[root@localhost kvm-test]# lvremove /dev/vg0/lvol0
[root@localhost kvm-test]# dmsetup info
[root@localhost kvm-test]# pvs
[root@localhost kvm-test]# lvscan
[root@localhost kvm-test]# lvs
阅读(1255) | 评论(0) | 转发(0) |