How to Import Disk to Ceph

Convert Disk to RAW

1
2
3
4
#qcow2
qemu-img convert  -f qcow2  xxx.qcow2 -O raw xxxx.raw
#vmware
qemu-img convert -f vmdk xxx-flat.vmdk -O raw xxx.raw

Import RAW to ceph

1
2
3
4
5
6
rbd list --pool ${ceph-pool-name}
rbd import ./xxx.raw --pool ${ceph-pool-name}
rbd rm ${old-file-rm} --pool ${ceph-pool-name]
rbd mv xxx.raw ${old-file-rm)

rbd list --poll ${ceph-pool-name}

Reference

Licensed under CC BY-NC-SA 4.0
Last updated on Sep 19, 2024 09:13 UTC
Built with Hugo
Theme Stack designed by Jimmy