On 05/19/2012 09:33 PM, Alexandre DERUMIER wrote:
Hi,
i'm planning to do rdb integration in proxmox2 kvm distribution (not using libvirt).
I found some doc here
http://ceph.com/wiki/QEMU-RBD
and also in libvirt mailing list.
some questions:
qemu drive command line :
-------------------------
-drive file=rbd:pool/image:id=myname:key=QVFDVm41aE82SHpGQWhBQXEwTkN2OGp0SmNJY0UrSE9CbE1RMUE=:auth_supported=cephx none:mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:6322,if=virtio,format=raw
is it the right syntax ?
Newer qemu doesn't like the space in auth_supported, so you'll want to
use a semicolon instead:
-drive
file=rbd:pool/image:id=myname:key=QVFDVm41aE82SHpGQWhBQXEwTkN2OGp0SmNJY0UrSE9CbE1RMUE=:auth_supported=cephx;none:mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:6322,if=virtio,format=raw
The key/value pairs separated by colons are Ceph configuration options.
The above drive line is equivalent the following settings:
/path/to/myname.keyring containing the keyring for myname, as shown by
'ceph auth list'.
/etc/ceph/ceph.conf containing:
[client.myname]
keyring = /path/to/myname.keyring
auth supported = cephx none
mon host =
mon1.example.org:6321;mon2.example.org:6322;mon3.example.org:6322
And a drive line like:
-drive file=rbd:pool/image:id=myname,if=virtio,format=raw
Qemu reads the from the ceph.conf file if it exists. Any extra
options you add override those from the configuration file.
You can have it read from another file by adding ':conf=/path/to/file'.
for image management, what is the best way ? qemu-img or rdb ?
rdb creation with qemu-img:
----------------------------
qemu-img create -f rbd rbd:data/foo 10G
how to specify monitor, authentification,.... ?
rdb delete/resize with qemu-img?
--------------------------------
don't find any infos.
The rbd tool has more features. As you noticed, qemu doesn't know how
to delete images. It also can't rename them. I'm not sure if qemu-img
lets you resize them. The monitor and auth options for qemu-img are the
same as for qemu's -drive syntax. You can configure them in
/etc/ceph/ceph.conf, or on the command line.
For the rbd tool, if you don't want to use a configuration file, the
options would be:
rbd --mon-host
'mon1.example.org:6321;mon2.example.org:6322;mon3.example.org:6322'
--keyring /path/to/keyring --id myname --auth-supported 'cephx;none'
These are generic ceph options, and work with any ceph command. They can
also be set in the CEPH_ARGS environment variable.
rdb commands
------------
Is the rdb kernel module require to use rdb command ?
Nope, it's only needed if you want to have /dev/rbd devices on your
hosts.
Also,I would like to not have any /dev/rdbx device on my client.
qemu goes directly through the userspace librbd to access rbd images.
The rbd kernel module isn't involved at all, and no devices appear on
the host. The guest does not know it's using rbd; it sees a block
device, just as if you were using e.g. a qcow2 file.
Josh
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html