ubuntu 18.04 ceph luminous 12.2.12 building block device to create a storage pool

ceph building block devices to create a ubuntu 18.04

1, ceph building block device created ubuntu 18.04

  • Creating a storage pool (the number when the OSD 5-10, pg_num to 512)
ceph osd pool create rbd 512
  • View Storage Pool
# ceph osd lspools
1 rbd,
# ceph osd pool ls detail
pool 1 'rbd' replicated size 3 min_size 2 crush_rule 0 object_hash rjenkins pg_num 512 pgp_num 512 last_change 68 flags hashpspool stripe_width 0
# rados df
POOL_NAME USED OBJECTS CLONES COPIES MISSING_ON_PRIMARY UNFOUND DEGRADED RD_OPS RD WR_OPS WR 
rbd         0B       0      0      0                  0       0        0      0 0B      0 0B 
# ceph osd pool get rbd pg_num
pg_num: 512
  • Do not set the storage pool quota
  • Set the number of copies of a storage pool 2
# ceph osd pool get rbd size
size: 3
# ceph osd pool set rbd size 2
set pool 1 size to 2

2. Create rbd

# rbd create --size=102400G rbd/diskceph
# rbd ls
diskceph
# rbd info diskceph
rbd image 'diskceph':
	size 100TiB in 26214400 objects
  • Mapping block device
# rbd map rbd/diskceph
rbd: sysfs write failed
RBD image feature set mismatch. You can disable features unsupported by the kernel with "rbd feature disable diskceph object-map fast-diff deep-flatten".
# rbd feature disable diskceph object-map fast-diff deep-flatten
# rbd map rbd/diskceph
/dev/rbd0
# rbd showmapped
id pool image    snap device    
0  rbd  diskceph -    /dev/rbd0 
  • Mounting block device
# mkfs.xfs  /dev/rbd0

mkdir storage
mount /dev/rbd0 /storage

reference:

  1. ceph build ubuntu 18.04 osd create
  2. Ceph storage cluster deployment and block device test: to create a pool and block devices
  3. ceph (luminous version) pool management
  4. Ceph-04 Ceph storage pool
  5. ceph pool of official documents
  6. ceph pg number of settings
  7. Ceph-05 Ceph storage block of RBD
Published 646 original articles · won praise 179 · Views 1.15 million +

Guess you like

Origin blog.csdn.net/u010953692/article/details/104804374