On 05/06/14 17:01, [email protected] wrote:
Hi All,
I have a ceph storage cluster with four nodes. I have created block storage
using cinder in openstack and ceph as its storage backend.
So, I see a volume is created in ceph in one of the pools. But how to get
information like on which OSD, PG, the volume is created in ?
Hi,
While a volume is created in a pool, it is not contained in a single pg,
but pieces of it (usually 4M chunks) are placed in many pgs. You can see
this using the rbd and rados tools:
$ rbd -p volumes ls -l
NAME SIZE PARENT FMT PROT LOCK
volume-74fbf226-ac23-4767-8c89-a929a40bf567 3072M 2
So I have a single 3G volume in the 'volumes' pool.
$ sudo rados -p volumes ls
rbd_directory
rbd_id.volume-74fbf226-ac23-4767-8c89-a929a40bf567
rbd_header.49f232c5c21d
rbd_data.49f232c5c21d.0000000000000240
rbd_data.49f232c5c21d.00000000000000ea
rbd_data.49f232c5c21d.000000000000016f
rbd_data.49f232c5c21d.0000000000000023
rbd_data.49f232c5c21d.0000000000000260
rbd_data.49f232c5c21d.0000000000000012
rbd_data.49f232c5c21d.00000000000000e0
rbd_data.49f232c5c21d.0000000000000152
...
The rbd volume is composed of a number of rados objects. If we pick
*one* of these (e.g rbd_data.49f232c5c21d.0000000000000240) we can see
which pg it gets put into:
$ ceph osd map volumes rbd_data.49f232c5c21d.0000000000000240
osdmap e141 pool 'volumes' (3) object
'rbd_data.49f232c5c21d.0000000000000240' -> pg 3.89e8a582 (3.2) -> up
([0,2,3], p0) acting ([0,2,3], p0)
So this object is mapped to pg 3.89e8a582 and lives on ods numbers 0,2
and 3. (this pool has 3 replicas).
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com