Re: A confuse of using rbd image disk with kvm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Ceph uses thin-provisioning so it will not allocate the full block device when you create it with qemu-img.

When you write to the data it then allocates the block devices.

However, you can enable TRIM/DISCARD in the VM as per the documentation here: http://ceph.com/docs/next/rbd/qemu-rbd/ - this should allow ceph to reclaim the deleted space.

Regards
--
Brad.


On 10 January 2014 09:21, lyz_pro <lyz_pro@xxxxxxx> wrote:
Hi
I have a question:
I used qemu-img create a rbd disk. and attach it to a vm.
then I format the disk as ext3 and mount the disk in vm.
After above steps,
I dd a 1G file to the rbd disk in vm. then remove the disk,
 and dd a 1G file again, then remove it. do this several times.

I use `watch ceph -s` during dd operation and found the used space in ceph cluster is always increase,
and not found decrease.

The above condition make me confuse, Is there any one could kindly explan why this happened , is there somthing I miss ?

additional:
The qemu and libvirt version I use is :
Compiled against library: libvirt 0.10.2
Using library: libvirt 0.10.2
Using API: QEMU 0.10.2
Running hypervisor: QEMU 0.12.1

ceph-0.72.2-0.el6.x86_64
qemu-img-0.12.1.2-2.415.el6.3ceph.x86_64
qemu-kvm-tools-0.12.1.2-2.415.el6.3ceph.x86_64



--------------
lyz_pro
2014-01-10

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux