Ceph常用维护操作


 

 

查看ceph 集群状态

 

1.ssh 登陆任一MON主机
2.执行 sudo ceph health detail 命令

 

启动、停止、重启、查看MON进程

 

1.登陆到MON的服务器,执行如下命令
sudo systemctl start ceph-mon@mon-host sudo systemctl stop ceph-mon@mon-host sudo systemctl restart ceph-mon@mon-host sudo systemctl status ceph-mon@mon-host

 

启动、停止、重启、查看OSD所有和单个进程

 

1.登陆到OSD 的服务器,对服务器上的所有OSD操作
sudo systemctl start ceph-osd@* sudo systemctl stop ceph-osd@* sudo systemctl restart ceph-osd@* sudo systemctl status ceph-osd@*  2.如上把@* 替换为OSD的ID 如@22,即可执行对应ID OSD的操作

 

查看OSD 与HOST 的归属关系

 

1.登陆到任意一台MON主机,执行命令 
sudo ceph osd tree 

 

查看OSD node上 所有OSD data目录和 挂载磁盘

1.ls /var/lib/ceph/osd/
2. sudo mount |grep osd 如:sudo mount|grep osd /dev/sdh1 on /var/lib/ceph/osd/ceph-222 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sdl1 on /var/lib/ceph/osd/ceph-227 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sdd1 on /var/lib/ceph/osd/ceph-218 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sdb1 on /var/lib/ceph/osd/ceph-216 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sdf1 on /var/lib/ceph/osd/ceph-220 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sdj1 on /var/lib/ceph/osd/ceph-224 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sdi1 on /var/lib/ceph/osd/ceph-223 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sdk1 on /var/lib/ceph/osd/ceph-225 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sdg1 on /var/lib/ceph/osd/ceph-221 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sde1 on /var/lib/ceph/osd/ceph-219 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sdc1 on /var/lib/ceph/osd/ceph-217 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota) /dev/sdm1 on /var/lib/ceph/osd/ceph-226 type xfs (rw,nodev,noexec,noatime,nodiratime,attr2,inode64,noquota)


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM