- CRUSH Controlled Replication Under Scalable Hashing 可扩展哈希的受控副本分布算法
- PG Placement Group
- PG到OSD的映射,需要CRUSH规则和Hash一起设置
- Scrub机制负责数据正确性与一致性
- PGP Placement Group Placement
- PG-UPMAP 支持显示调整pg到osdmap的关系
ceph操作
- systemct/sysvinit集群操作
#检查ceph状态
systemctl status ceph\*.service ceph\*.target
- 监控检查
ceph health detail
ceph tell mon.\* sessions
ceph -s
ceph df [detail]
ceph osd
ceph osd pool set <poolname>
ceph report |jq -c ''
#bluefs可用空间
ceph daemon osd.* bluestore bluefs available
#device_health
ceph device info <device-id>
ceph health detail
ceph tell <pgid> query
ceph pg scrub <pgid>
ceph crash ls-new
ceph crash info <crash-id>
- 监控集群
ceph health
ceph status/ -s
ceph quorum_status
ceph mon stat
ceph -c /path/to/conf -k /path/to/keyring health
#日志查看 /var/log/ceph/ceph.log
ceph -w
ceph log last [n]
ceph daemon /var/run/ceph/ceph-mgr.x.asok dump_osd_network 0
ceph health mute <code>
ceph health mute OSD_DOWN
#USAGE STATS
ceph df
#OSD STATS
ceph osd stat
ceph osd dump
ceph osd tree
#MONITOR STATUS
ceph mon stat
ceph mon dump
ceph quorum_status
# ADMIN SOCKET
ceph daemon {daemon-name} [help]
ceph daemon {path-to-socket-file}
#PG SETS
ceph pg dump
ceph osd pool get {pool-name} pg_num
ceph pg map {pg-num}
ceph pg stat
ceph pg {poolnum}.{pg-id} query
ceph osd pool scrub {pool-name}
ceph pg dump -o {filename} --format=json
#FINDING AN OBJECT LOCATION
ceph osd map {poolname} {object-name} [namespace]
rados -p data ls
rados put {object-name} {file-path} --pool=data
ceph osd map {pool-name} {object-name}
#POOLS
ceph osd lspools
ceph osd pool autoscale-status
#BALANCER
ceph balancer status
ceph balancer off
- pg-upmap
-ceph balancer off
-ceph osd set-require-min-compat-client luminous
-ceph features
ceph osd getmap -o om
-CRUSH
ceph osd crush rule ls
ceph osd crush rule dump
ceph osd crush tree --show-shadow
ceph osd getcrushmap -o {compiled-crushmap-filename}
-DEVICE MANAGEMENT
ceph device ls
ceph device ls-by-daemon <daemon>
ceph device ls-by-host <host>
ceph device info <devid>
ceph device monitoring on
ceph device monitoring off
ceph device scrape-health-metrics <device-id>
ceph device scrape-daemon-health-metrics <who>
ceph device get-health-metrics <devid> [sample-timestamp]
ceph device check-health
-元数据
ceph osd metadata $ID |grep osd_objectstore
ceph osd count-metadata osd_objectstore
ceph osd out $ID
ceph-volume lvm create --bluestore --data $DEVICE --osd-id $ID
-LOGGING AND DEBUGGING
/var/log/ceph
ceph daemon {daemon-name} config show |less
ceph daemon osd.0 config show | less
-ceph-volume
ceph-volume lvm list
ceph-volume lvm new-wal --osd-id 1 --osd-fsid 55BD4219-16A7-4037-BC20-0F158EFCC83D --target vgname/new_wal
ceph-volume lvm new-db --osd-id 1 --osd-fsid 55BD4219-16A7-4037-BC20-0F158EFCC83D --target vgname/new_db
-三种块设备
Slow、DB、WAL
sgdisk -p /dev/sdb
lsblk lsscsi