Erasure-coded Block Device Image Creation With qemu-img - Help
Hi Guys, So, new issue (I'm gonna get the hang of this if it kills me :-) ). I have a working/healthy Ceph (Octopus) Cluster (with qemu-img, libvert, etc, installed), and an erasure-coded pool called "my_pool". I now need to create a "my_data" image within the "my_pool" pool. As this is for a KVM host / block device (hence the qemu-img et.al.) I'm attempting to use qemu-img, so the command I am using is: ``` qemu-img create -f rbd rbd:my_pool/my_data 1T ``` The error message I received was: ``` qemu-img: rbd:my_pool/my_data: error rbd create: Operation not supported ``` So, I tried the 'raw' rbd command: ``` rbd create -s 1T my_pool/my_data ``` and got the error: ``` _add_image_to_directory: error adding image to directory: (95) Operation not supported rbd: create error: (95) Operation not supported ``` So I don't believe the issue is with the 'qemu-img' command - but I may be wrong. After doing some research I *think* I need to specify a replicated (as opposed to erasure-coded) pool for my_pool's metadata (eg 'my_pool_metadata'), and thus use the command: ``` rbd create -s 1T --data-pool my_pool my_pool_metadata/my_data ``` First Question: Is this correct? Second Question: What is the qemu-img equivalent command - is it: ``` qemu-img create -f rbd rbd:--data-pool my_pool my_pool_metadata/my_data 1T ``` or something similar? Thanks in advance Dulux-Oz
Hi Matthew, On 17/03/2021 06:29, duluxoz wrote:
After doing some research I *think* I need to specify a replicated (as opposed to erasure-coded) pool for my_pool's metadata (eg 'my_pool_metadata'), and thus use the command:
```
rbd create -s 1T --data-pool my_pool my_pool_metadata/my_data
```
First Question: Is this correct?
Yes, as explained here https://docs.ceph.com/en/latest/rados/operations/erasure-code/#erasure-codin... I don't know what the qemu equivalent is though. Cheers -- Loïc Dachary, Artisan Logiciel Libre
On Wed, Mar 17, 2021 at 04:29:10PM +1100, duluxoz wrote:
```
rbd create -s 1T --data-pool my_pool my_pool_metadata/my_data
```
First Question: Is this correct?
Yes
Second Question: What is the qemu-img equivalent command - is it:
```
qemu-img create -f rbd rbd:--data-pool my_pool my_pool_metadata/my_data 1T
```
To make qemu-img use the data pool you can set rbd_default_data_pool param in ceph.conf, or use CEPH_ARGS environment variable. Something like this: ``` CEPH_ARGS=--rbd_default_data_pool=my_pool qemu-img create -f rbd rbd:my_pool_metadata/my_data 1T ``` -- Mykola Golub
participants (3)
-
duluxoz
-
Loïc Dachary
-
Mykola Golub