Re: libvirt can not get right stats of a rbd pool

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

 





On 10/29/2012 03:33 PM, Daniel P. Berrange wrote:
On Fri, Oct 26, 2012 at 11:04:05AM +0800, yue wrote:
Allocation exceed Capacity ,but Available  is  not 0.

#virsh pool-info 2361a6d4-0edc-3534-87ae-e7ee09199921
Name:           2361a6d4-0edc-3534-87ae-e7ee09199921
UUID:           2361a6d4-0edc-3534-87ae-e7ee09199921
State:          running
Persistent:     yes
Autostart:      no
Capacity:       285.57 GiB
Allocation:     489.89 GiB
Available:      230.59 GiB

Hmm, these values do look a little bit suspect, but I don't know
enough about RBD to suggest what might be going wrong. I'm copying
Wido who wrote this code originally & thus might have an idea.


I think I know where this is coming from, a little background about RBD.

RBD is a disk device striped over 4MB RADOS objects inside a Ceph cluster. RBD devices are sparse, which means that (RADOS) objects get created whenever a write comes.

When a read comes for a non-existing object 4MB of nothing is returned.

However, when you do: $ rbd info disk1

You will get that the object COULD be 100GB, but that doesn't mean it actually occupies 100GB of disk space.

The problem is that you can't (at this point) find out how much space a RBD device actually occupies. Yes, it can be done, but that should not be done in the libvirt driver and it is pretty heavy for the Ceph cluster.

Also, a RBD device of 100GB could take up 300GB of space when your replication is set to 3x.

What you are seeing there is that you over provisioned your Ceph cluster by creating images which exceed 285GB in total.

Wido

Daniel


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]