User Tools

Site Tools


linux:ceph:ceph_cheatsheet

CEPH: Cheatsheet!

Documentation
Name: CEPH: Cheatsheet!
Description: CHEATSHEET
Modification date :25/01/2019
Owner:dodger
Notify changes to:Owner
Tags: ceph, object storage
Scalate to:Thefuckingbofh

Cheatsheet

Admin

Health

##############cmd############## ——————————————————————
ceph health
Status of the cluster
ceph health detail
Detailed status of the cluster
ceph -s
Another way to see the status

disk

##############cmd############## ——————————————————————
ceph df
df of the cluster
ceph df detail
Detailed usage of the cluster

Object Gateway

##############cmd############## ——————————————————————
radosgw-admin metadata list user
list current created users
radosgw-admin --uid=user1 user info 
Show user info
radosgw-admin --uid=user1 user suspend 
Suspend user account
radosgw-admin bucket list
list ALL buckets
radosgw-admin bucket list --uid=userID
list buckets from user
radosgw-admin bucket rm --bucket=mybucket --purge-objects 
Drop bucket INCLUDING CONTENTS

MON

##############cmd############## ——————————————————————
ceph mon_status -f json-pretty
Local monitor status
ceph --cluster=ceph --admin-daemon /var/run/ceph/ceph-mon.${THESERVER}.asok mon_status -f json-pretty
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: 2022/02/11 11:36 by 127.0.0.1