添加 '存储/ceph/p版本安装/10-创建存储策略并和pool关联.md'
This commit is contained in:
parent
f4a9ba4df6
commit
19be9bcbed
1 changed files with 33 additions and 0 deletions
33
存储/ceph/p版本安装/10-创建存储策略并和pool关联.md
Normal file
33
存储/ceph/p版本安装/10-创建存储策略并和pool关联.md
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
1. 添加池
|
||||||
|
```shell
|
||||||
|
# ceph osd pool create ssdpool 256 256
|
||||||
|
# ceph osd pool create hddpool 256 256
|
||||||
|
## 列出池
|
||||||
|
# ceph osd lspools
|
||||||
|
1 .mgr
|
||||||
|
2 ssdpool
|
||||||
|
3 hddpool
|
||||||
|
```
|
||||||
|
2. 创建规则以使用该设备
|
||||||
|
```shell
|
||||||
|
# ceph osd crush rule create-replicated ssd default host ssd
|
||||||
|
# ceph osd crush rule create-replicated hdd default host hdd
|
||||||
|
## 查看池规则
|
||||||
|
# ceph osd crush rule ls
|
||||||
|
replicated_rule
|
||||||
|
ssd
|
||||||
|
hdd
|
||||||
|
```
|
||||||
|
3. 将池设置为使用规则
|
||||||
|
```shell
|
||||||
|
ceph osd pool set ssdpool crush_rule ssd
|
||||||
|
ceph osd pool set hddpool crush_rule hdd
|
||||||
|
```
|
||||||
|
4. 删除池
|
||||||
|
```shell
|
||||||
|
## 删除池时,池的名字要输入2次
|
||||||
|
# ceph osd pool rm testpool --yes-i-really-really-mean-it
|
||||||
|
Error EPERM: WARNING: this will *PERMANENTLY DESTROY* all data stored in pool testpool. If you are *ABSOLUTELY CERTAIN* that is what you want, pass the pool name *twice*, followed by --yes-i-really-really-mean-it.
|
||||||
|
|
||||||
|
# ceph osd pool rm testpool testpool --yes-i-really-really-mean-it
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue