首页 > 其他分享 >07 Ceph 集群运维

07 Ceph 集群运维

时间:2022-10-22 20:45:54浏览次数:86  
标签:1.00000 ceph 07 运维 systemctl 0.04880 up Ceph hdd

目录

Ceph 守护服务管理

https://docs.ceph.com/en/latest/rados/operations/operating/

全局管理 一台机器有多个ceph 服务

STARTING ALL daemons

To start all daemons on a Ceph Node (irrespective of type), execute the following:

sudo systemctl start ceph.target    # start all daemons

STOPPING ALL daemons

To stop all daemons on a Ceph Node (irrespective of type), execute the following:

sudo systemctl stop ceph\*.service ceph\*.target

服务分类管理

STARTING ALL DAEMONS BY TYPE

To start all daemons of a particular type on a Ceph Node, execute one of the following:

sudo systemctl start ceph-osd.target
sudo systemctl start ceph-mon.target
sudo systemctl start ceph-mds.target

STOPPING ALL DAEMONS BY TYPE

To stop all daemons of a particular type on a Ceph Node, execute one of the following:

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

更细力度的服务管理

STARTING A DAEMON

To start a specific daemon instance on a Ceph Node, execute one of the following:

sudo systemctl start ceph-osd@{id}
sudo systemctl start ceph-mon@{hostname}
sudo systemctl start ceph-mds@{hostname}

For example:

sudo systemctl start ceph-osd@1
sudo systemctl start ceph-mon@ceph-server
sudo systemctl start ceph-mds@ceph-server

STOPPING A DAEMON

To stop a specific daemon instance on a Ceph Node, execute one of the following:

sudo systemctl stop ceph-osd@{id}
sudo systemctl stop ceph-mon@{hostname}
sudo systemctl stop ceph-mds@{hostname}

For example:

sudo systemctl stop ceph-osd@1
sudo systemctl stop ceph-mon@ceph-server
sudo systemctl stop ceph-mds@ceph-server

演示

# 查看集群状态
[root@node0 ~]# ceph osd tree
ID CLASS WEIGHT  TYPE NAME      STATUS REWEIGHT PRI-AFF 
-1       0.29279 root default                           
-3       0.09760     host node0                         
 0   hdd 0.04880         osd.0      up  1.00000 1.00000 
 3   hdd 0.04880         osd.3      up  1.00000 1.00000 
-5       0.09760     host node1                         
 1   hdd 0.04880         osd.1      up  1.00000 1.00000 
 4   hdd 0.04880         osd.4      up  1.00000 1.00000 
-7       0.09760     host node2                         
 2   hdd 0.04880         osd.2      up  1.00000 1.00000 
 5   hdd 0.04880         osd.5      up  1.00000 1.00000 

# 按类型停止 osd 守护进程   STOPPING ALL DAEMONS BY TYPE
[root@node0 ~]# systemctl stop ceph-osd.target

# 再次查看集群状态,node0 节点 2个 osd 服务都 down
[root@node0 ~]# ceph osd tree
ID CLASS WEIGHT  TYPE NAME      STATUS REWEIGHT PRI-AFF 
-1       0.29279 root default                           
-3       0.09760     host node0                         
 0   hdd 0.04880         osd.0    down  1.00000 1.00000 
 3   hdd 0.04880         osd.3    down  1.00000 1.00000 
-5       0.09760     host node1                         
 1   hdd 0.04880         osd.1      up  1.00000 1.00000 
 4   hdd 0.04880         osd.4      up  1.00000 1.00000 
-7       0.09760     host node2                         
 2   hdd 0.04880         osd.2      up  1.00000 1.00000 
 5   hdd 0.04880         osd.5      up  1.00000 1.00000 

# 启动守护进程 STARTING A DAEMON
[root@node0 ~]# systemctl start ceph-osd@0


[root@node0 ~]# ceph osd tree
ID CLASS WEIGHT  TYPE NAME      STATUS REWEIGHT PRI-AFF 
-1       0.29279 root default                           
-3       0.09760     host node0                         
 0   hdd 0.04880         osd.0    down  1.00000 1.00000 
 3   hdd 0.04880         osd.3      up  1.00000 1.00000 
-5       0.09760     host node1                         
 1   hdd 0.04880         osd.1      up  1.00000 1.00000 
 4   hdd 0.04880         osd.4      up  1.00000 1.00000 
-7       0.09760     host node2                         
 2   hdd 0.04880         osd.2      up  1.00000 1.00000 
 5   hdd 0.04880         osd.5      up  1.00000 1.00000 
[root@node0 ~]# systemctl start ceph-osd@3
[root@node0 ~]# ceph osd tree
ID CLASS WEIGHT  TYPE NAME      STATUS REWEIGHT PRI-AFF 
-1       0.29279 root default                           
-3       0.09760     host node0                         
 0   hdd 0.04880         osd.0      up  1.00000 1.00000 
 3   hdd 0.04880         osd.3      up  1.00000 1.00000 
-5       0.09760     host node1                         
 1   hdd 0.04880         osd.1      up  1.00000 1.00000 
 4   hdd 0.04880         osd.4      up  1.00000 1.00000 
-7       0.09760     host node2                         
 2   hdd 0.04880         osd.2      up  1.00000 1.00000 
 5   hdd 0.04880         osd.5      up  1.00000 1.00000 

Ceph 服务日志分析

Ceph 集群状态监控

Ceph 资源池管理

Ceph PG 数据分布

Ceph 参数配置调整

标签:1.00000,ceph,07,运维,systemctl,0.04880,up,Ceph,hdd
From: https://www.cnblogs.com/evescn/p/16817246.html

相关文章

  • 【运维这些事儿】- 网络文件系统之NFS
    NFS是一种分布式文件系统,通过网络可以将不同操作系统的文件共享。其通信协议定基于TCP/IP协议层,将远程的计算机磁盘挂载到本地,读写文件跟本地磁盘一样。NFS简介NFS服务在......
  • P2607 [ZJOI2008] 骑士
    #include<bits/stdc++.h>//#include<windows.h>usingnamespacestd;#definelllonglongconstintN=1e6+1;intn;inth[N],nt[N*2],to[N*2];intcnt;voidadd(i......
  • Python教程Day07-集合
    集合一、创建集合创建集合使用​​{}​​​或​​set()​​​,但是如果要创建空集合只能使用​​set()​​​,因为​​{}​​用来创建空字典。s1={10,20,30,40,50}pri......
  • 【openGauss】运维常用的SQL
    一、查模式二、查对象查看某模式下的表名selecttablenamefrompg_tableswhereschemaname='hsjc_bi';查看某表的字段SELECTA.attnameASNAME,format_t......
  • ceph容器版初始化
    文档说明:只记录关键地方;ceph初始化#!/bin/envbashset-eux__DIR__=$(cd"$(dirname"$0")";pwd)cd${__DIR__}if[!"$BASH_VERSION"];thenecho"Plea......
  • 单调栈(P1823 [COI2007] Patrik 音乐会的等待)
    [COI2007]Patrik音乐会的等待题目描述\(n\)个人正在排队进入一个音乐会。人们等得很无聊,于是他们开始转来转去,想在队伍里寻找自己的熟人。队列中任意两个人\(a\)和......
  • LY3207/LY3208可定时18秒36秒集成充电马达
    概述LY3208 是一款可充电的带使能控制的马达驱动芯片,集成了锂电池充电管理模块、马达驱动控制模块和保护模块,关机待机电流仅 5uA。LY3208 充电电流为 0.3A-1A 可调,最大......
  • 自然语言处理学习笔记-lecture07-句法分析01
    句法分析(syntacticparsing)的任务就是识别句子的句法结构(syntacticstructure)。包含短语结构分析(Phraseparsing)和依存句法分析(Dependencyparsing)短语结构分析......
  • Python教程Day07-列表
    一、列表的应用场景当我们需要存一个数据时,可以直接使用变量,但是,当我们要存储100个,设置更多的时候,变量肯定不行,这时候我们要用啥?此时列表就有它的用武之地了,一次性存储多个......
  • 05 CephFS 文件系统
    目录CephFS文件系统介绍CephFileSystemCephFS组件架构客户端元数据服务器(MDS)安装部署CephFS安装MDS集群查看MDS集群信息创建CephFS文件系统创建资源池创建C......