ceph常用操作指令

安装ceph客户端

1
2
apt install ceph -y       # ubuntu
yum install ceph -y     # centos

查看现有的pool

1
ceph osd lspools

创建pool

1
ceph osd pool create pool_name pg_num

查看pool列表

1
ceph osd lspools

创建块存储

1
rbd create image-name --size megabytes --pool pool_name

查看块设备列表

1
rbd ls

查看快设备信息

1
rbd --image image-name info

映射块设备

1
rbd map image-name  --pool pool-name --id username

查看映射的块设备

1
rbd showmapped

关闭不支持的特性

1
rbd feature disable image-name unsupported-feature1,unsupported-feature2

取消映射

1
rbd unmap /dev/rbd/pool-name/image-name

创建块设备并挂载

1
2
3
4
5
6
rbd create image-name --size megabytes --pool pool_name
rbd map image-name  --pool pool-name --id username
rbd showmapped
mkfs.ext4 -q 块设备
mkdir 挂载目录
mount 块设备  挂载目录

块设备扩容

1
2
rbd resize rbd/navy  --size 2048
resize2fs /dev/rbd0

创建用户

1
2
3
4
# 创建s3用户
radosgw-admin user create --uid="admin" --display-name="admin"
# 创建子用户
radosgw-admin subuser create --uid="admin-swift" --subuser="admin:swift" --access=full

查看子用户信息

1
radosgw-admin user info --uid=admin

  

  

posted @   NAVYSUMMER  阅读(83)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2019-02-26 python中那些双下划线开头得函数和变量
交流群 编程书籍
点击右上角即可分享
微信分享提示