monitor commands
时间:2010-05-20 来源:zhengsheng2010
Monitor commands
From Ceph wiki
Jump to: navigation, searchMonitor commands are issued using the ceph utility(in versions before Dec08 it was called cmonctl):
$ ceph [-m monhost] command
where the command is usually of the form
$ ceph subsystem command
Contents[hide]
|
[edit] System commands
$ ceph stop
Cleanly shut down the file system.
[edit] OSD subsystem
[edit] stat
$ ceph osd stat
Query osd subsystem status.
[edit] getmap
$ ceph osd getmap -o file
Write a copy of the most recent osd map to a file. See osdmaptool.
[edit] getcrushmap
$ ceph osd getcrushmap -o file
Write a copy of the crush map from the most recent osd map to file. This is functionally equivalent to
$ ceph osd getmap -o /tmp/osdmap
$ osdmaptool /tmp/osdmap --export-crush file
[edit] getmaxosd
$ ceph osd getmaxosd
Query the current max_osd parameter in the osd map.
[edit] setmap
$ ceph osd setmap -i file
Import the given osd map. Note that this can be a bit dangerous, since the osd map includes dynamic state about which OSDs are current on or offline; only do this if you've just modified a (very) recent copy of the map.
[edit] setcrushmap
$ ceph osd setcrushmap -i file
Import the given crush map.
[edit] setmaxosd
$ ceph osd setmaxosd
Set the max_osd parameter in the osd map. This is necessary when expanding the storage cluster.
[edit] down
$ ceph osd down N
Mark osdN down.
[edit] out
$ ceph osd out N
Mark osdN out of the distribution (i.e. allocated no data).
[edit] in
$ ceph osd in N
Mark osdN in the distribution (i.e. allocated data);