ceph pool 管理

Posted 左丿仔

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ceph pool 管理相关的知识,希望对你有一定的参考价值。

 

创建池
[[email protected] ~]# ceph osd pool create monitor 128
pool monitor created
查看池
[[email protected] ~]# ceph osd pool ls
rbd
zstack
bak-t-2ea1196a7ada4fa0adc0f19177a1c101
pri-c-601e39f80c6a4659a223ddcfb1f4c929
pri-v-r-601e39f80c6a4659a223ddcfb1f4c929
pri-v-d-601e39f80c6a4659a223ddcfb1f4c929
monitor
上传镜像
[[email protected] ~]# qemu-img convert -p -f qcow2 -O raw openstack-centos7.qcow2 rbd:monitor/test1.img
    (100.00/100%)

查看池中的镜像
[[email protected] ~]# rbd ls zstack
mnvm.img
test.img
test1.img
查看镜像信息
[[email protected] ~]# rbd info zstack/test.img
rbd image test.img:
    size 10240 MB in 2560 objects
    order 22 (4096 kB objects)
    block_name_prefix: rbd_data.3bf902ae8944a
    format: 2
    features: layering, striping
    flags: 
    stripe unit: 4096 kB
    stripe count: 1
删除镜像信息
[[email protected] ~]# rbd rm zstack/test.img
Removing image: 100% complete...done.
[[email protected] ~]# 
删除pool 
[[email protected] ~]# 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.

[[email protected] ~]# ceph osd pool delete monitor monitor --yes-i-really-really-mean-it
pool monitor removed
确认
[[email protected] ~]# ceph osd pool ls
rbd
zstack
bak-t-2ea1196a7ada4fa0adc0f19177a1c101
pri-c-601e39f80c6a4659a223ddcfb1f4c929
pri-v-r-601e39f80c6a4659a223ddcfb1f4c929
pri-v-d-601e39f80c6a4659a223ddcfb1f4c929
[[email protected] ~]# 

 

以上是关于ceph pool 管理的主要内容,如果未能解决你的问题,请参考以下文章

Ceph运维ceph 日常运维

006 管理Ceph的RBD块设备

Ceph中的容量计算与管理

Ceph pool配额设置

ceph学习笔记之五 Pool与映射过程

ceph pool 性能测试