ceph客户端安装配置访问rbd

客户端上操作:
yum -y install centos-release-ceph-nautilus.noarch
yum -y install ceph-common

ceph 服务器上操作:
ceph auth get-or-create client.clt132 mon 'allow r' osd 'allow class-read object_prefix rbd_children,allow rwx pool=rbd'

# ceph auth get-or-create client.clt132 mon 'allow r' osd 'allow class-read object_prefix rbd_children,allow rwx pool=rbd'
[client.clt132]
key = AQCRVYldu2N4CBAAD5UiNpWnrE3GlHVLa12Miw==

ceph auth get-or-create client.clt132 | tee /etc/ceph/ceph.client.clt132.keyring
scp /etc/ceph/ceph.client.clt132.keyring 192.168.111.132:/etc/ceph/
scp /etc/ceph/ceph.conf 192.168.111.132:/etc/ceph/

客户端上操作:
rbd --image rbd_data1 info --name client.clt132


ceph -s --name client.clt132
rbd create rbd/rbd132 --size 1G --image-feature layering --name client.clt132

rbd --image rbd132 info --name client.clt132
rbd map rbd/rbd132 --name client.clt132
rbd showmapped --name client.clt132
mkfs.xfs /dev/rbd0
mount /dev/rbd0 /mnt/
df -h
umount /mnt/
rbd unmap rbd/rbd132 --name client.clt132

rbd map rbd/rbd_data1 --name client.clt132
mount /dev/rbd1 /mnt/
umount /mnt/
rbd unmap rbd/rbd_data1 --name client.clt132

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 10
    评论
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值