From 19be9bcbedec3369175f777ea4c1b7a1ed45cbca Mon Sep 17 00:00:00 2001 From: iProbe Date: Sun, 25 Jun 2023 22:01:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'=E5=AD=98=E5=82=A8/ceph/p?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=AE=89=E8=A3=85/10-=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E7=AD=96=E7=95=A5=E5=B9=B6=E5=92=8Cpool?= =?UTF-8?q?=E5=85=B3=E8=81=94.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../p版本安装/10-创建存储策略并和pool关联.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 存储/ceph/p版本安装/10-创建存储策略并和pool关联.md diff --git a/存储/ceph/p版本安装/10-创建存储策略并和pool关联.md b/存储/ceph/p版本安装/10-创建存储策略并和pool关联.md new file mode 100644 index 0000000..8c67a03 --- /dev/null +++ b/存储/ceph/p版本安装/10-创建存储策略并和pool关联.md @@ -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 +``` \ No newline at end of file