Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17770

KVM libvirt storage setup question

$
0
0

Hello Folks. I have inherited a few kvm hosts and trying to figure out the setup.

The setup is that there is raid 10 logical disk presented to the OS in the size of 8 TB. From that disk LVM VG created for all the space:

vgs VG #PV #LV #SN Attr VSize VFree vg_kvm-01_disk0 1 7 0 wz--n- 7.26t 6.92t 

then there is one physical volume:

pvs PV VG Fmt Attr PSize PFree /dev/sda3 vg_kvm-01_disk0 lvm2 a-- 7.26t 6.92t 

then there are logical volumes like these:

foreman-01.sec1 vg_kvm-01_disk0 -wi-ao---- 104.49g home vg_kvm-01_disk0 -wi-ao---- 16.00g prodweb-01.sec1_disk0 vg_kvm-01_disk0 -wi-ao---- 100.00g root vg_kvm-01_disk0 -wi-ao---- 6.00g usr vg_kvm-01_disk0 -wi-ao---- 8.00g var vg_kvm-01_disk0 -wi-ao---- 8.00g zabbix-01.sec1_disk0 vg_kvm-01_disk0 -wi-ao---- 100.00g 

So now, i've never seen the setup like this, meaning there is no storage pool created besides the default one on / in /var/lib/libvirt/images. There are no "images" files per volumes for VMs, So every time one needs to present storage to VM, he/she needs to create and lvm logical volume and present it directly to the hypervisor? The things i do not understand are:

1) What advantages of this setup?

2) When i look at fdisk on the host i see this for underlined VM storage logical disk:

Disk /dev/mapper/vg_kvm-01_disk0-zabbix-01.sec1_disk0: 107.4 GB, 107374182400 bytes 255 heads, 63 sectors/track, 13054 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00045c15 Device Boot Start End Blocks Id System /dev/mapper/vg_kvm-01_disk0-zabbix-01.sec1_disk0p1 * 1 131 1048576 83 Linux Partition 1 does not end on cylinder boundary. /dev/mapper/vg_kvm-01_disk0-zabbix-01.sec1_disk0p2 131 1176 8388608 82 Linux swap / Solaris /dev/mapper/vg_kvm-01_disk0-zabbix-01.sec1_disk0p3 1176 13055 95419392 8e Linux LVM 

But in /dev/mapper i see only "/dev/mapper/vg_kvm-01_disk0-zabbix-01.sec1_disk0" and no partitions, does that mean if i presented host LV to VM as disk storage and partitioned as LVM logical volumes on VM OS i will see those partitions on KVM host? I am confused about this.

3) Why would previous admin did not create separate physical volumes from this huge logical disk and create 2 volume groups, one for host OS partitions and another VG to present to storage pool from where you could create your disks and snapshot them using virsh tools or scripts?

4) Having VM disk as lvm lv i can see that it is useful that i can mount it on host and it is probably faster than image based (file) disks, but disks as images are so easy to move around and convenient to operate with in terms of moving VMs between hosts, snapshots and such.

I would appreciate everyone input on this subject, just trying to understand previous engineer thought process.
Thanks in advance.

submitted by DenDaZen
[link][10 comments]

Viewing all articles
Browse latest Browse all 17770

Trending Articles