Detailed mon server status, change ${THESERVER} variable
OSD
##############cmd##############
——————————————————————
ceph osd df
osd disk usage (aka df)
CRUSH
##############cmd##############
——————————————————————
ceph osd crush tree
view the CRUSH hierarchy
ceph osd crush rule ls
view the CRUSH rules
ceph osd crush rule dump
view the CRUSH rules definition
ceph osd getcrushmap -o crushmap.bin
write live crushmap to crushmap.bin
crushtool -d crushmap.bin -o crushmap.txt
Decompile crushmap.bin
crushtool -c crushmap.txt -o crushmap.bin.new
Compile crushmap
ceph osd setcrushmap -i crushmap.bin.new
Push new CRUSHmap to cluster
POOL
##############cmd##############
——————————————————————
ceph osd pool ls
list pools
ceph osd pool ls detail
list pools with additional info
ceph osd crush rule dump
view the CRUSH rules definition
ceph osd pool create ${new_pool}
Create ${newpool} |
|<code bash>ceph osd pool create ${newpool} 500 500 replicated ciberterminalRule</code> | Create pool with pgnum, pgpnum, type and crush rule |
|<code bash>rados cppool ${oldpool} ${newpool}</code> | Copy one pool to another |
|<code bash>ceph osd pool rename ${newpool} ${oldpool}</code> | rename pool |
|<code bash>ceph osd pool ls</code> | list pools |
|<code bash>ceph osd pool ls</code> | list pools |
|<code bash>ceph osd pool set ${POOLNAME} pgnum 500</code> | Change pg's of a pool |
|<code bash>ceph osd pool set ${POOLNAME} crushrule ciberterminalRule</code> | Change pg's CRUSH map |
|<code bash>ceph osd pool get ${POOLNAME} all</code> | get options set for ${POOLNAME}
MGR
##############cmd##############
——————————————————————
ceph mgr services
running services
ceph mgr module ls
list modules for mgr</code> |
===== MDS (cehpfs) =====
^ ##############cmd############## ^ —————————————————————— ^
|<code bash>ceph fs ls</code> | list filesystems |
|<code bash>ceph mgr module ls</code> | list modules for mgr</code>
linux/ceph/ceph_cheatsheet.txt · Last modified: by 127.0.0.1