ceph (luminous 版) osd 以 filestore 方式部署

目标创建 ceph filestore用户授权filestore 需要用到 client.bootstrap-osd 用户,因此需要先添加用户权限# ceph auth get-or-create client.bootstrap-osd mon 'allow profile bootstrap-osd'# ceph auth get-or-create client.bootstrap-mds mon 'allow profile bootstrap-mds'# ceph auth
摘要由CSDN通过智能技术生成

目标

创建 ceph filestore

用户授权

filestore 需要用到 client.bootstrap-osd 用户,因此需要先添加用户权限

# ceph auth get-or-create client.bootstrap-osd mon 'allow profile bootstrap-osd'
# ceph auth get-or-create client.bootstrap-mds mon 'allow profile bootstrap-mds'
# ceph auth get-or-create client.bootstrap-mgr mon 'allow profile bootstrap-mgr'
# ceph auth get-or-create client.storegw-external mon 'allow r' osd 'allow *'

生成 keyring

# ceph auth get client.bootstrap-osd -o  /var/lib/ceph/bootstrap-osd/ceph.keyring
# ceph auth get client.bootstrap-mds -o  /var/lib/ceph/bootstrap-mds/ceph.keyring
# ceph auth get client.bootstrap-mgr -o  /var/lib/ceph/bootstrap-mgr/ceph.keyring

合并到 admin keyring

# ceph-authtool /etc/ceph/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
importing contents of /var/lib/ceph/bootstrap-osd/ceph.keyring into /etc/ceph/ceph.mon.keyring
# ceph-authtool /etc/ceph/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-mds/ceph.keyring
importing contents of /var/lib/ceph/bootstrap-mds/ceph.keyring into /etc/ceph/ceph.mon.keyring
# ceph-authtool /etc/ceph/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-mgr/ceph.keyring
importing contents of /var/lib/ceph/bootstrap-mgr/ceph.keyring into /etc/ceph/ceph.mon.keyring

osd

磁盘准备

需要使用到 ssd 磁盘用于 journal disk (约 2GB 以上分区)
需要使用 hhd 用于 data disk
journal disk 需要预先进行分区格式化
data disk 不需要预先分区格式化

osd create

参考创建 osd 过程, 一个命令即可完成所有操作

# ceph-volume lvm create --filestore --data /dev/sdb --journal /dev/sdv1
Running command: /bin/ceph-authtool --gen-print-key
Running command: /bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new e0574137-1f39-422c-a919-0d06916e2932
Running command: vgcreate --force --yes ceph-7811ae8d-4032-4246-bfab-02a8dd47b8df /dev/sdb
 stdout: Physical volume "/dev/sdb" successfully created.
 stdout: Volume group "ceph-7811ae8d-4032-4246-bfab-02a8dd47b8df" successfully created
Running command: lvcreate --yes -l 100%FREE -n osd-data-e0574137-1f39-422c-a919-0d06916e2932 ceph-7811ae8d-4032-4246-bfab-02a8dd47b8df
 stdout: Logical volume "osd-data-e0574137-1f39-422c-a919-0d06916e2932" created.
Running command: /bin/ceph-authtool --gen-print-key
Running command: mkfs -t xfs -f -i size=2048 /dev/ceph-7811ae8d-4032-4246-bfab-02a8dd47b8df/osd-data-e0574137-1f39-422c-a919-0d06916e29
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Terry_Tsang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值