ceph常见问题
# 创建OSD失败
现象描述
创建OSD失败,错误信息如下:
[ceph4][ERROR ] RuntimeError: command returned non-zero exit status: 1
[ceph_deploy.osd][ERROR ] Failed to execute command: /usr/sbin/ceph-volume --cluster ceph lvm create --bluestore --data /dev/nvme0n1p1
[ceph_deploy][ERROR ] GenericError: Failed to create 1 OSDs
1
2
3
2
3
原因分析
- OSD所依赖的lvm创建失败,lvs查看逻辑卷信息时未找到Ceph的逻辑卷,但lsblk可以发现Ceph逻辑卷,可见Ceph逻辑卷的DM映射未清除。
- 磁盘存在文件
处理步骤
- 清除逻辑卷的DM映射,操作如下:
dmsetup info -C
dmsetup remove [dm_map_name]
1
2
2
- 格式化磁盘
mkfs.ext4 /dev/vdb
1
# bucket设置公共读写
cat acl
{
"Version": "2022-05-05",
"Statement": [{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": [
"arn:aws:s3:::se-ecox-static/*"
]
}]
}
s3cmd setpolicy acl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# 开启rgw dashboard
- 创建用户
radosgw-admin user create --uid=dashboard --display-name="this is dashboard user" --system
1
- 查看用户秘钥
radosgw-admin user info --uid=dashboard
1
- 设置秘钥
ceph dashboard set-rgw-api-access-key "EBJ07WSC3KUI81RX0EIH"
ceph dashboard set-rgw-api-secret-key "RsMNoMmcA9Opt7b2loGTcpmvfkzPEq1IhH3Nu9xs"
1
2
2
- 设置用户
ceph dashboard set-rgw-api-user-id dashboard
1
- 设置ip端口
ceph dashboard set-rgw-api-host 172.30.65.21
ceph dashboard set-rgw-api-port 7480
1
2
2
- 设置http协议
ceph dashboard set-rgw-api-scheme http
1
- 设置ssl、超时时间
ceph dashboard set-rgw-api-ssl-verify False
ceph dashboard set-rest-requests-timeout 60
1
2
2
参考文档:https://docs.ceph.com/en/latest/mgr/dashboard/#enabling-the-object-gateway-management-frontend
上次更新: 2023/02/13, 13:52:57