33 lines
No EOL
938 B
Markdown
33 lines
No EOL
938 B
Markdown
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
|
||
``` |