KVM/QEMU thin provision sanal disk oluşturma
Thin Provision KVM / QEMU Virtual Disk
If you want to create a Thin Provisioned disk and actually want to use it ;-) You need to add:
-o preallocation=metadata
My following example I would like to create 2 disks for my Satellite
(lab) host. (I would not thin provision my production Satellite server -
for a number of reasons). I am building a test Satellite on my laptop
which introduces some additional caveats.
notice that 199M is consumed, but when you view the files, they appear to be 120Gig total.
qemu-img create -f qcow2 -o preallocation=metadata /var/lib/libvirt/images/${SATHOSTNAME}/${SATHOSTNAME}.img ${OSDISKSIZE}G
[root@neo ~]# df -h /var/lib/libvirt/images/RHNSAT01
[root@neo ~]# ls -lh
[root@neo RHNSAT01]# qemu-img info RHNSAT01-app.img
[root@neo RHNSAT01]# qemu-img info RHNSAT01-app.img
[root@neo RHNSAT01]# qemu-img info RHNSAT01.img
disk size: 3.0M
cluster_size: 65536