Ceph command pool image erasure

View all storage pools

rados lspools

View in the pool squadron

rados -p poolname ls

View cluster space usage

rados df
block device

List

rbd list

Create image

rbd create --size 1024 mypool/myimage --image-feature layering

View the image in the pool

rbd ls mypool

View the details of the image

rbd info mypool/myimage

image is mapped to a block device

rbd map mypool/myimage --id admin

Unmap

rbd unmap /dev/rbd/mypool/myimage

Show mapped devices

rbd showmapped

Check the status of the image and by whom

rbd status image

Adjust block size

rbd resize --size 20480 mypool/myimage

Support file system online expansion

resize2fs /dev/rbd0

Delete block device first unmap

rbd rm mypool/myimage
POOL操作

pool-name: POOL's name; must be added. pg-num: the total number of PGs owned by POOL; must be added. For details, please refer to the previous article: PG management operation pgp-num: the total number of PGP owned by POOL; it is not mandatory to add. The default is the same as pg-num. replicated|erasure: POOL type; not mandatory. If it is not specified as erasure, the default is replicated type. ruleset: CRUSH rule ID used by POOL. No need to add. The default is 0. If you need to specify another ruleset, you must ensure that the ruleset must exist. erasure-code-profile: POOL only used for erasure code type. Specify the erasure code configuration framework, this configuration must have been defined by the osd erasure-code-profile set

Get POOL overview

ceph osd pool ls detail #Create
a copy type POOL
ceph osd pool create {pool-name} {pg-num} [{pgp-num}] [replicated] \ [ruleset] #Create
an erasure code type POOL
ceph osd pool create {pool-name} {pg-num} {pgp-num} erasure [erasure-code-profile] [ruleset] #renaming
POOL
ceph osd pool rename {current-pool-name} {new-pool-name } #Delete
POOL
ceph osd pool delete {pool-name} [{pool-name} --yes-i-really-really-mean-it]

Erasure Code


#Create 3+2 k+m erasure code rules ceph osd erasure-code-profile set EC-profile ruleset-failure-domain=osd k=3 m=2

List configuration files

ceph osd erasure-code-profile ls

View the contents of the erasure code file

ceph osd erasure-code-profile get EC-profile

Create erasure type pool

ceph osd pool create EC-pool 16 16 erasure EC-profile

View storage pool rules

ceph osd pool get poolname all
object gateway

Create user

radosgw-admin user create --uid=“testuser” --display-name=“First User”

Show user list

radosgw-admin user list

User Info

radosgw-admin user info --uid username
placement map

POOL related information POOL name, number of copies, number of pg

ceph osd dump | grep size

Services enabled

ceoh mgr dump

mon related information

ceoh mgr dump

Guess you like

Origin blog.csdn.net/qq_33431394/article/details/107379944