docker筆記41-ceph叢集的日常運維
檢視ceph的所有守護程式
[root@k8s-node1 ceph]# systemctl list-unit-files |grep ceph ceph-disk@.service static ceph-mds@.service disabled ceph-mgr@.service disabled ceph-mon@.service enabled ceph-osd@.service enabled ceph-radosgw@.service disabled ceph-mds.target enabled ceph-mgr.target enabled ceph-mon.target enabled ceph-osd.target enabled ceph-radosgw.target enabled ceph.target enabled
按照型別在 ceph 節點上啟動特定型別的守護程式
systemctl start ceph-osd.target systemctl start ceph-mon.target systemctl start ceph-mds.target
ceph 節點上啟動特定的守護程式例項
systemctl start ceph-osd@{id} systemctl start ceph-mon@{hostname} systemctl start ceph-msd@{hostname}
mon 監控狀態檢查
[root@k8s-node1 ceph]# ceph -s cluster 2e6519d9-b733-446f-8a14-8622796f83ef health HEALTH_OK monmap e4: 3 mons at {k8s-node1=172.16.22.201:6789/0,k8s-node2=172.16.22.202:6789/0,k8s-node3=172.16.22.203:6789/0} election epoch 26, quorum 0,1,2 k8s-node1,k8s-node2,k8s-node3 mgr active: k8s-node1 standbys: k8s-node3, k8s-node2 osdmap e31: 3 osds: 3 up, 3 in flags sortbitwise,require_jewel_osds,require_kraken_osds pgmap v13640: 64 pgs, 1 pools, 0 bytes data, 0 objects 35913 MB used, 21812 MB / 57726 MB avail 64 active+clean
[root@k8s-node1 ceph]# ceph ceph> status cluster 2e6519d9-b733-446f-8a14-8622796f83ef health HEALTH_OK monmap e4: 3 mons at {k8s-node1=172.16.22.201:6789/0,k8s-node2=172.16.22.202:6789/0,k8s-node3=172.16.22.203:6789/0} election epoch 26, quorum 0,1,2 k8s-node1,k8s-node2,k8s-node3 mgr active: k8s-node1 standbys: k8s-node3, k8s-node2 osdmap e31: 3 osds: 3 up, 3 in flags sortbitwise,require_jewel_osds,require_kraken_osds pgmap v13670: 64 pgs, 1 pools, 0 bytes data, 0 objects 35915 MB used, 21810 MB / 57726 MB avail 64 active+clean
ceph> health HEALTH_OK
ceph> mon_status {"name":"k8s-node1","rank":0,"state":"leader","election_epoch":26,"quorum":[0,1,2],"features":{"required_con":"9025616074522624","required_mon":["kraken"],"quorum_con":"1152921504336314367","quorum_mon":["kraken"]},"outside_quorum":[],"extra_probe_peers":["172.16.22.202:6789\/0","172.16.22.203:6789\/0"],"sync_provider":[],"monmap":{"epoch":4,"fsid":"2e6519d9-b733-446f-8a14-8622796f83ef","modified":"2018-10-28 21:30:09.197608","created":"2018-10-28 09:49:11.509071","features":{"persistent":["kraken"],"optional":[]},"mons":[{"rank":0,"name":"k8s-node1","addr":"172.16.22.201:6789\/0","public_addr":"172.16.22.201:6789\/0"},{"rank":1,"name":"k8s-node2","addr":"172.16.22.202:6789\/0","public_addr":"172.16.22.202:6789\/0"},{"rank":2,"name":"k8s-node3","addr":"172.16.22.203:6789\/0","public_addr":"172.16.22.203:6789\/0"}]}}
ceph 日誌記錄
ceph 日誌預設的位置儲存在節點/var/log/ceph/ceph.log 裡面可以使用 ceph -w 檢視實時的日誌記錄情況
哪個節點報錯了,就登入到哪個節點上用下面的命令看日誌。
[root@k8s-node1 ceph]# ceph -w
ceph mon 也在不斷的對自⼰狀態進⾏各種檢查,檢查失敗的時候會將自⼰的資訊寫到叢集日誌中去
[root@k8s-node1 ceph]# ceph mon stat e4: 3 mons at {k8s-node1=172.16.22.201:6789/0,k8s-node2=172.16.22.202:6789/0,k8s-node3=172.16.22.203:6789/0}, election epoch 26, quorum 0,1,2 k8s-node1,k8s-node2,k8s-node3
檢查 osd
[root@k8s-node1 ceph]# ceph osd stat osdmap e31: 3 osds: 3 up, 3 in flags sortbitwise,require_jewel_osds,require_kraken_osds
[root@k8s-node1 ceph]# ceph osd tree ID WEIGHT TYPE NAME UP/DOWN REWEIGHT PRIMARY-AFFINITY -1 0.05516 root default -2 0.01839 host k8s-node1 0 0.01839 osd.0 up 1.00000 1.00000 -3 0.01839 host k8s-node2 1 0.01839 osd.1 up 1.00000 1.00000 -4 0.01839 host k8s-node3 2 0.01839 osd.2 up 1.00000 1.00000
檢查 pool 的⼤小以及可用狀態
[root@k8s-node1 ceph]# ceph df GLOBAL: SIZE AVAIL RAW USED %RAW USED 57726M 21811M 35914M 62.21 POOLS: NAME ID USED %USED MAX AVAIL OBJECTS rbd 0 0 0 5817M 0
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28916011/viewspace-2217864/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Docker Swarm 日常運維命令筆記DockerSwarm運維筆記
- Oracle RAC日常運維-NetworkManager導致叢集故障Oracle運維
- rac叢集日常維護命令
- redis哨兵,叢集和運維Redis運維
- RabbitMQ叢集運維實踐MQ運維
- Tidb 運維--叢集檢視的使用TiDB運維
- Docker 學習筆記(第十集:docker 叢集管理工具 swarm )Docker筆記Swarm
- mongos分片叢集管理和運維Go運維
- 400+ 節點的 Elasticsearch 叢集運維Elasticsearch運維
- ElasticSearch 叢集的規劃部署與運維Elasticsearch運維
- 400+節點的 Elasticsearch 叢集運維Elasticsearch運維
- redis cluster叢集管理工具redis-trib.rb命令小結-運維筆記Redis運維筆記
- RAC日常運維運維
- Elasticsearch叢集運維相關知識Elasticsearch運維
- Linux 系統日常運維 9 大技能,搞定 90% 日常運維Linux運維
- docker筆記20-初始化k8s叢集Docker筆記K8S
- 「實戰篇」開源專案docker化運維部署-搭建mysql叢集(四)Docker運維MySql
- 運維日常工作運維
- 老凡的運維筆記 | 智慧化運維知多少?運維筆記
- 四:GTID中的運維(筆記)運維筆記
- 運維除錯記錄:Ubuntu14.04下部署Opendaylight Nitrogen叢集運維除錯Ubuntu
- SQL SERVER日常運維(一)SQLServer運維
- 用Docker搭建RabbitMq的普通叢集和映象叢集DockerMQ
- 如何運維多叢集資料庫?58 同城 NebulaGraph Database 運維實踐運維資料庫Database
- 阿里超大規模 Flink 叢集運維實踐阿里運維
- 阿里雲註冊叢集+Prometheus 解決多雲容器叢集運維痛點阿里Prometheus運維
- 膝上型電腦日常維護的六個常識,筆記本日常維護小竅門筆記
- SpringBoot運維學習筆記Spring Boot運維筆記
- Docker 與 K8S學習筆記(二十三)—— Kubernetes叢集搭建DockerK8S筆記
- Docker Swarm 叢集搭建DockerSwarm
- docker搭建consul叢集Docker
- docker部署mysql叢集DockerMySql
- Docker 搭建叢集 MongoDBDockerMongoDB
- docker-redis叢集DockerRedis
- docker搭建mysql叢集DockerMySql
- Docker搭建ELK叢集Docker
- Docker Elasticsearch 叢集配置DockerElasticsearch
- Docker部署ElasticSearch叢集DockerElasticsearch