Ceph 操作集群
参考:https://docs.ceph.com/en/pacific/rados/operations/operating/
使用 SYSTEMD 运行 CEPH
对于所有支持 systemd 的发行版(CentOS 7、Fedora、Debian Jessie 8 及更高版本、SUSE),ceph 守护程序现在使用本机 systemd 文件而不是旧的 sysvinit 脚本进行管理。例如:
sudo systemctl start ceph.target # start all daemons
sudo systemctl status ceph-osd@12 # check status of osd.12
要列出节点上的 Ceph systemd 单元,请执行:
sudo systemctl status ceph\*.service ceph\*.target
启动所有守护进程
要启动 Ceph 节点上的所有守护进程(无论类型如何),请执行以下命令:
sudo systemctl start ceph.target
停止所有守护进程
要停止 Ceph 节点上的所有守护进程(无论类型如何),请执行以下命令:
sudo systemctl stop ceph\*.service ceph\*.target
按类型启动所有守护进程
要在 Ceph 节点上启动特定类型的所有守护进程,请执行以下操作之一:
sudo systemctl start ceph-osd.target
sudo systemctl start ceph-mon.target
sudo systemctl start ceph-mds.target
按类型停止所有守护进程
要停止 Ceph 节点上特定类型的所有守护进程,请执行以下操作之一:
sudo systemctl stop ceph-mon\*.service ceph-mon.target
sudo systemctl stop ceph-osd\*.service ceph-osd.target
sudo systemctl stop ceph-mds\*.service ceph-mds.target
启动守护进程
要在 Ceph 节点上启动特定的守护程序实例,请执行以下操作之一:
sudo systemctl start ceph-osd@{id}
sudo systemctl start ceph-mon@{hostname}
sudo systemctl start ceph-mds@{hostname}
例如:
sudo systemctl start ceph-osd@1
sudo systemctl start ceph-mon@ceph-server
sudo systemctl start ceph-mds@ceph-server
停止守护进程
要停止 Ceph 节点上的特定守护程序实例,请执行以下操作之一:
sudo systemctl stop ceph-osd@{id}
sudo systemctl stop ceph-mon@{hostname}
sudo systemctl stop ceph-mds@{hostname}
例如:
sudo systemctl stop ceph-osd@1
sudo systemctl stop ceph-mon@ceph-server
sudo systemctl stop ceph-mds@ceph-server