只需要在主节点ceph1执行。
1 2 |
cd /etc/ceph ceph-deploy new ceph1 ceph2 ceph3 |
1
|
vi /etc/ceph/ceph.conf |
将ceph.conf中的内容修改为如下所示:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[global] fsid = f5a4f55c-d25b-4339-a1ab-0fceb4a2996f mon_initial_members = ceph1, ceph2, ceph3 mon_host = 192.168.3.166,192.168.3.167,192.168.3.168 auth_cluster_required = cephx auth_service_required = cephx auth_client_required = cephx public_network = 192.168.3.0/24 cluster_network = 192.168.4.0/24 bluestore_prefer_deferred_size_hdd = 0 rbd_op_threads=16 # rbd tp线程数 osd_memory_target = 2147483648 # 限制osd内存的参数 bluestore_default_buffered_read = false # 当读取完成时,根据标记决定是否缓存 [mon] mon_allow_pool_delete = true |
1 2 |
osd_pool_default_size = 1 osd_pool_default_min_size = 1 |
参数名称 |
参数含义 |
优化建议 |
---|---|---|
rbd_op_threads |
块设备支持的最大线程数量 |
16 |
osd_memory_target |
osd最大可以使用的内存数量 |
2147483648 |
bluestore_default_buffered_read |
bluestore 读buffer开关 |
false |
1
|
ceph-deploy mon create-initial |
1
|
ceph-deploy --overwrite-conf admin ceph1 ceph2 ceph3 client1 client2 client3 |
1
|
ceph -s
|
如下所示:
1 2 3 4 5 |
cluster: id: f6b3c38c-7241-44b3-b433-52e276dd53c6 health: HEALTH_OK services: mon: 3 daemons, quorum ceph1,ceph2,ceph3 (age 25h) |