# list all device ceph orch device ls # list device used by ceph ceph device ls # locate current ods node used disk ceph-volume lvm list # locate specify ods's devices, e.g. ceph device ls-by-daemon osd.1 ceph device ls-by-daemon <daemon> # check ceph ods tree # Creating New OSDs ceph orch apply osd --all-available-devices # or ceph orch daemon add osd *<host>*:*<device-path>* # e.g. ceph orch daemon add osd host1:/dev/sdb ceph orch daemon add osd host1:data_devices=/dev/sda,/dev/sdb,db_devices=/dev/sdc,osds_per_device=2
pool
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# list available pool ceph osd pool ls # Check PG status: ceph pg stat # config Replica count: For a replicated pool, size sets how many copies of each object Ceph keeps, and min_size sets the minimum number of replicas that must be available before I/O is allowed.For an erasure-coded pool, Ceph says size is reported as K+M, but it cannot be set directly with ceph osd pool set ... size ...., For EC pools, you control redundancy through the erasure-code profile (k and m), and you can still set min_size; Ceph recommends setting min_size to a value greater than K. ceph osd pool set {pool-name} size 3 ceph osd pool set {pool-name} min_size 2 # config Capacity quota ceph osd pool set-quota {pool-name} max_bytes <bytesSize> ceph osd pool set-quota {pool-name} max_objects <objectsSize> # Check current settings ceph osd pool get {pool-name} size ceph osd pool get {pool-name} min_size ceph osd pool get-quota {pool-name} ceph osd pool ls detail | grep {pool-name}
replicated pool
If not specify the pool type, the default is replicated; Ceph also notes that each pool name must be unique and names beginning with . are reserved for internal use.
#e.g: creates a replicated pool named mypool with 32 PGs, then marks it for RBD use. ceph osd pool create mypool 32 ceph osd pool application enable mypool rbd
# create user radosgw-admin user create --uid=dongwei --display-name="Dongwei User" # check user radosgw-admin user info --uid=dongwei # check bucket info radosgw-admin bucket stats --bucket=<bucket-name> or radosgw-admin metadata get bucket:<bucket>
monitor
1 2
ceph mon dump # <mon-ip>:6789
Ceph Object Gateway
TBD
Dashboard
1 2
# locate mgr host could use by: `ceph orch ps | grep mgr` https://mgr-host:8443