仅需在主节点ceph1节点上执行。
1 2 | cd /etc/ceph ceph-deploy new ceph1 ceph2 ceph3 |
“/etc/ceph”目录下自动生成的“ceph.conf”文件。
配置节点命令以及使用ceph-deploy配置
1 | vim /etc/ceph/ceph.conf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | [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 rbd_op_threads=16 # rbd tp线程数 bluestore_prefer_deferred_size_hdd = 0 osd_memory_target = 2147483648 # 限制OSD内存的参数 bluestore_default_buffered_read = false # 当读取完成时,根据标记决定是否缓存 [mon] mon_allow_pool_delete = true |
1 | ceph-deploy mon create-initial |
执行完成后,脚本会自动生成ceph.client.admin.keyring,该密钥并不会在回显中打印。执行成功回显如下图所示。
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) |