You've already forked www.colben.cn
update
This commit is contained in:
@@ -6,7 +6,7 @@ tags: ["ceph"]
|
||||
categories: ["storage"]
|
||||
---
|
||||
|
||||
# 测试环境
|
||||
## 测试环境
|
||||
操作系统 | 主机名 | IP | OSD 设备 | OSD ID | 容量 | ceph 版本
|
||||
---- | ---- | ---- | ---- | ---- | ---- | ----
|
||||
CentOS7 | ceph101 | 192.168.1.101 | /dev/sdb | 0 | 3TB | jewel
|
||||
@@ -19,7 +19,7 @@ CentOS7 | ceph103 | 192.168.1.103 | /dev/sdb | 2 | 3TB | jewel
|
||||
- 操作目录: /home/cephdeploy/ceph-cluster
|
||||
- IP: 192.168.1.100
|
||||
|
||||
# 新增 OSD
|
||||
## 新增 OSD
|
||||
- 设置 ceph 三个 noflag,禁止 ceph 自动迁移数据
|
||||
```bash
|
||||
# 在任一节点上执行下面命令即可
|
||||
@@ -65,7 +65,7 @@ CentOS7 | ceph103 | 192.168.1.103 | /dev/sdb | 2 | 3TB | jewel
|
||||
ceph -s
|
||||
```
|
||||
|
||||
# 删除 OSD
|
||||
## 删除 OSD
|
||||
- 把指定的 osd 踢出集群
|
||||
```bash
|
||||
# 在任一节点上执行下面命令即可
|
||||
@@ -122,7 +122,7 @@ CentOS7 | ceph103 | 192.168.1.103 | /dev/sdb | 2 | 3TB | jewel
|
||||
ceph -s
|
||||
```
|
||||
|
||||
# OSD 动态配置
|
||||
## OSD 动态配置
|
||||
- 查看 osd 当前配置
|
||||
```bash
|
||||
ceph -n osd.0 --show-config
|
||||
@@ -132,7 +132,7 @@ CentOS7 | ceph103 | 192.168.1.103 | /dev/sdb | 2 | 3TB | jewel
|
||||
ceph tell osd.* injectargs '--osd_max_backfills 7'
|
||||
```
|
||||
|
||||
# PG 和 PGP
|
||||
## PG 和 PGP
|
||||
- 少于 5 个 OSD 时可把 pg_num 设置为 128
|
||||
- OSD 数量在 5 到 10 个时,可把 pg_num 设置为 512
|
||||
- OSD 数量在 10 到 50 个时,可把 pg_num 设置为 1024
|
||||
@@ -159,7 +159,7 @@ CentOS7 | ceph103 | 192.168.1.103 | /dev/sdb | 2 | 3TB | jewel
|
||||
ceph pg map {pg-id}
|
||||
```
|
||||
|
||||
# CEPH 服务器关机维护
|
||||
## CEPH 服务器关机维护
|
||||
- 设置 ceph 节点 down 后不自动迁移或恢复数据
|
||||
```bash
|
||||
ceph osd set noout
|
||||
|
Reference in New Issue
Block a user