ceph 添加删除磁盘mon osd mds

Posted

tags:

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

一、删除节点包含(mon osd mds)的节点

1、摘除mon

[[email protected] ~]# ceph mon remove ceph01

removed mon.bgw-os-node153 at 10.240.216.153:6789/0, there are now 2 monitors

2、摘除此节点上所有的osd

1)、查看此节点的osd

[[email protected] ~]# ceph osd tree 

-4      1.08                    host ceph01

8       0.27                            osd.8   up      1

9       0.27                            osd.9   up      1

10      0.27                            osd.10  up      1

11      0.27                            osd.11  up      1

11      0.27                            osd.12  up      1

2)、把上面的节点的osd进程停掉

[[email protected] ~]# /etc/init.d/ceph stop osd

=== osd.10 === 

Stopping Ceph osd.10 on ceph01..kill 2251...done

=== osd.9 === 

Stopping Ceph osd.9 on ceph01...kill 2023...kill 2023...done

=== osd.8 === 

Stopping Ceph osd.8 on ceph01 kill 1724...kill 1724...done

=== osd.11 === 

Stopping Ceph osd.8 on ceph01 kill 1724...kill 1724...done

=== osd.12=== 

Stopping Ceph osd.11 on ceph01...kill 1501...done

3)、再次查看ceph osd状态

[[email protected] ~]# ceph osd tree

-4      1.08                    host ceph01

8       0.27                            osd.8   down    1

9       0.27                            osd.9   down    1

10      0.27                            osd.10  down    1

11      0.27                            osd.11  down    1

4)、删除所有的osd

[[email protected]ceph01 ~]# ceph osd rm 8

removed osd.8

[[email protected]ceph01 ~]# ceph osd rm 9

removed osd.9

[[email protected]ceph01 ~]# ceph osd rm 10

^[[Aremoved osd.10

[[email protected]ceph01 ~]# ceph osd rm 11

removed osd.11

5)、删除所有osd的crush map 

[[email protected]ceph01~]# ceph osd crush rm osd.8

removed item id 8 name ‘osd.8‘ from crush map

[[email protected]ceph01 ~]# ceph osd crush rm osd.9

removed item id 9 name ‘osd.9‘ from crush map

[[email protected]ceph01 ~]# ceph osd crush rm osd.10

[[Aremoved item id 10 name ‘osd.10‘ from crush map

[[email protected]ceph01 ~]# ceph osd crush rm osd.11

removed item id 11 name ‘osd.11‘ from crush map

6)、删除所有osd的认证

[[email protected]ceph01 ~]# ceph auth del osd.8

updated

[[email protected]ceph01~]# ceph auth del osd.9

updated

[[email protected]ceph01 ~]# ceph auth del osd.10

updated

[[email protected]ceph01 ~]# ceph auth del osd.11

updated

7)、在ceph osd tree中删除此机器host的crush map

[[email protected]ceph01 ~]# ceph osd crush rm  ceph01

removed item id -4 name ‘ceph01‘ from crush map

8)、卸载所有挂载在osd的硬盘

[[email protected]ceph01 ~]# umount /var/lib/ceph/osd/ceph-8

[[email protected]ceph01 ~]# umount /var/lib/ceph/osd/ceph-9

[[email protected]ceph01 ~]# umount /var/lib/ceph/osd/ceph-10

[[email protected]ceph01 ~]# umount /var/lib/ceph/osd/ceph-11


3、删除掉mds

1、直接关闭此节点的mds进程

[[email protected] ~]# /etc/init.d/ceph stop mds

=== mds.bgw-os-node153 === 

Stopping Ceph mds.ceph01 on ceph013...kill 4981...done

[[email protected]ceph01 ~]# 

2、删除此mds的认证

[[email protected]ceph01 ~]# ceph auth del mds.ceph01

updated


本文出自 “云计算” 博客,请务必保留此出处http://8278399.blog.51cto.com/8268399/1750538

以上是关于ceph 添加删除磁盘mon osd mds的主要内容,如果未能解决你的问题,请参考以下文章

ceph磁盘管理添加删除

ceph搭建练习1

Ceph集群搭建

ceph集群部署

SUSE Ceph 增加节点减少节点 删除OSD磁盘等操作 - Storage6

Ceph Nautilus安装配置 MGR-dashboard