root@ceph-clt:~/src# cat v4.py
# -*- coding:utf-8 -*-
import rbd
import rados
FCONF='/etc/ceph/ceph.conf'
POOL='rbd'
try:
# connexion au cluster
cluster = rados.Rados(conffile=FCONF)
cluster.connect()
# utilisation du pool 'rbd'
p_ioctx = cluster.open_ioctx(POOL)
c_ioctx = cluster.open_ioctx(POOL)
try:
# instanciation d'un objet de type 'rbd' pour cloner l'image
rbd_inst = rbd.RBD()
# création du clone "c1-foo3
rbd_inst.clone(p_ioctx, 'foo3', 's1-foo3', c_ioctx, 'c1-foo3')
finally:
p_ioctx.close()
c_ioctx.close()
finally:
cluster.shutdown()
root@ceph-clt:~/src# python v4.py
Traceback (most recent call last):
File "v4.py", line 22, in <module>
rbd_inst.clone(p_ioctx, 'foo3', 's1-foo3', c_ioctx, 'c1-foo3', 0, 0)
File "/usr/lib/python2.7/dist-packages/rbd.py", line 239, in clone
raise make_ex(ret, 'error creating clone')
rbd.InvalidArgument: error creating clone
_______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com