4.创建一个存储池,存储池的名称为testpool
ceph osd pool create {name} {size}
副本类型:ceph osd pool create {pool-name}
纠删码类型:ceph osd pool create {pool-name}
eg:
ceph osd pool create test-pool
5.上传一个对象到testpool存储池,对象的名称为testobject
rados put {git} {srouce} -p {pool}
6.创建一个RBD的image,image名称为testimage,大小为100M
rbd create textpool/testimage.img --image-feature layering --size 100M
网络例子:
ceph osd pool set-quota {pool-name} [max_objects {obj-count}] [max_bytes {bytes}]
eg:
ceph osd pool set-quota data max_objects 10000
7.将testimage映射为块设备
rbd map textpool/testimage.img --id admin
8.删除testpool存储池
要删除池,必须在/etc/ceph/ceph.conf中mon的配置中将mon_allow_pool_delete标志设置为true
解答:
ceph osd pool delete textpool textpool --yes-i-really-really-mean-it
/etc/ceph/ceph.conf
mon allow pool delete = true
ceph osd pool rmsnap {pool-name} {snap-name}
或 rados rmsnap -p {pool-name} {snap-name}