ubuntu 18.04 搭建ceph luminous 12.2.12 创建存储池 块设备

ceph 搭建 ubuntu 18.04 块设备 创建

1,ceph 搭建 ubuntu 18.04 块设备 创建

  • 创建存储池(OSD数量在5到10个时,pg_num设置为512)
ceph osd pool create rbd 512
  • 查看存储池
# 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
  • 不设置存储池配额
  • 设置存储池副本数为2
# ceph osd pool get rbd size
size: 3
# ceph osd pool set rbd size 2
set pool 1 size to 2

2,创建rbd

# rbd create --size=102400G rbd/diskceph
# rbd ls
diskceph
# rbd info diskceph
rbd image 'diskceph':
	size 100TiB in 26214400 objects
  • 映射块设备
# 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 
  • 挂载块设备
# mkfs.xfs  /dev/rbd0

mkdir storage
mount /dev/rbd0 /storage

参考:

  1. ceph 搭建 ubuntu 18.04 osd 创建
  2. 部署Ceph存储集群及块设备测试:创建池和块设备
  3. ceph (luminous 版) pool 管理
  4. Ceph-04 Ceph 存储池
  5. ceph pool 官方文档
  6. ceph pg 数量设置
  7. Ceph-05 Ceph 块存储之 RBD
发布了646 篇原创文章 · 获赞 179 · 访问量 115万+

猜你喜欢

转载自blog.csdn.net/u010953692/article/details/104804374