创建池
[root@node1 ~]# ceph osd pool create monitor
pool 'monitor' created
查看池
[root@node1 ~]# ceph osd pool ls
rbd
zstack
bak-t-2ea1196a7ada4fa0adc0f19177a1c101
pri-c-601e39f80c6a4659a223ddcfb1f4c929
pri-v-r-601e39f80c6a4659a223ddcfb1f4c929
pri-v-d-601e39f80c6a4659a223ddcfb1f4c929
monitor
上传镜像
[root@node1 ~]# qemu-img convert -p -f qcow2 -O raw openstack-centos7.qcow2 rbd:monitor/test1.img
(100.00/%) 查看池中的镜像
[root@node1 ~]# rbd ls zstack
mnvm.img
test.img
test1.img
查看镜像信息
[root@node1 ~]# rbd info zstack/test.img
rbd image 'test.img':
size MB in objects
order ( kB objects)
block_name_prefix: rbd_data.3bf902ae8944a
format:
features: layering, striping
flags:
stripe unit: kB
stripe count:
删除镜像信息
[root@node1 ~]# rbd rm zstack/test.img
Removing image: % complete...done.
[root@node1 ~]#
删除pool
[root@node1 ~]# ceph osd pool delete monitor --yes-i-really-really-mean-it
Error EPERM: WARNING: this will *PERMANENTLY DESTROY* all data stored in pool monitor. If you are *ABSOLUTELY CERTAIN* that is what you want, pass the pool name *twice*, followed by --yes-i-really-really-mean-it. [root@node1 ~]# ceph osd pool delete monitor monitor --yes-i-really-really-mean-it
pool 'monitor' removed
确认
[root@node1 ~]# ceph osd pool ls
rbd
zstack
bak-t-2ea1196a7ada4fa0adc0f19177a1c101
pri-c-601e39f80c6a4659a223ddcfb1f4c929
pri-v-r-601e39f80c6a4659a223ddcfb1f4c929
pri-v-d-601e39f80c6a4659a223ddcfb1f4c929
[root@node1 ~]#
05-28 04:29