分布式存储系统之Ceph集群部署( 五 )


设置管理员密钥能够被cephadm用户有读权限

分布式存储系统之Ceph集群部署

文章插图
提示:上述设置权限的命令需要在每个节点都要设置;
7、配置Manager节点,启动ceph-mgr进程(仅Luminious+版本)
查看ceph-deploy mgr帮助
[cephadm@ceph-admin ceph-cluster]$ ceph-deploy mgr --helpusage: ceph-deploy mgr [-h] {create} ...Ceph MGR daemon managementpositional arguments:{create}createDeploy Ceph MGR on remote host(s)optional arguments:-h, --helpshow this help message and exit[cephadm@ceph-admin ceph-cluster]$提示:mgr子命令就只有一个create命令用于部署mgr;
[cephadm@ceph-admin ceph-cluster]$ ceph-deploy mgr create ceph-mgr01 ceph-mgr02[ceph_deploy.conf][DEBUG ] found configuration file at: /home/cephadm/.cephdeploy.conf[ceph_deploy.cli][INFO] Invoked (2.0.1): /bin/ceph-deploy mgr create ceph-mgr01 ceph-mgr02[ceph_deploy.cli][INFO] ceph-deploy options:[ceph_deploy.cli][INFO]username: None[ceph_deploy.cli][INFO]verbose: False[ceph_deploy.cli][INFO]mgr: [('ceph-mgr01', 'ceph-mgr01'), ('ceph-mgr02', 'ceph-mgr02')][ceph_deploy.cli][INFO]overwrite_conf: False[ceph_deploy.cli][INFO]subcommand: create[ceph_deploy.cli][INFO]quiet: False[ceph_deploy.cli][INFO]cd_conf: <ceph_deploy.conf.cephdeploy.Conf instance at 0x7f58a0514950>[ceph_deploy.cli][INFO]cluster: ceph[ceph_deploy.cli][INFO]func: <function mgr at 0x7f58a0d8d230>[ceph_deploy.cli][INFO]ceph_conf: None[ceph_deploy.cli][INFO]default_release: False[ceph_deploy.mgr][DEBUG ] Deploying mgr, cluster ceph hosts ceph-mgr01:ceph-mgr01 ceph-mgr02:ceph-mgr02[ceph-mgr01][DEBUG ] connection detected need for sudo[ceph-mgr01][DEBUG ] connected to host: ceph-mgr01[ceph-mgr01][DEBUG ] detect platform information from remote host[ceph-mgr01][DEBUG ] detect machine type[ceph_deploy.mgr][INFO] Distro info: CentOS Linux 7.9.2009 Core[ceph_deploy.mgr][DEBUG ] remote host will use systemd[ceph_deploy.mgr][DEBUG ] deploying mgr bootstrap to ceph-mgr01[ceph-mgr01][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf[ceph-mgr01][WARNIN] mgr keyring does not exist yet, creating one[ceph-mgr01][DEBUG ] create a keyring file[ceph-mgr01][DEBUG ] create path recursively if it doesn't exist[ceph-mgr01][INFO] Running command: sudo ceph --cluster ceph --name client.bootstrap-mgr --keyring /var/lib/ceph/bootstrap-mgr/ceph.keyring auth get-or-create mgr.ceph-mgr01 mon allow profile mgr osd allow * mds allow * -o /var/lib/ceph/mgr/ceph-ceph-mgr01/keyring[ceph-mgr01][INFO] Running command: sudo systemctl enable ceph-mgr@ceph-mgr01[ceph-mgr01][WARNIN] Created symlink from /etc/systemd/system/ceph-mgr.target.wants/ceph-mgr@ceph-mgr01.service to /usr/lib/systemd/system/ceph-mgr@.service.[ceph-mgr01][INFO] Running command: sudo systemctl start ceph-mgr@ceph-mgr01[ceph-mgr01][INFO] Running command: sudo systemctl enable ceph.target[ceph-mgr02][DEBUG ] connection detected need for sudo[ceph-mgr02][DEBUG ] connected to host: ceph-mgr02[ceph-mgr02][DEBUG ] detect platform information from remote host[ceph-mgr02][DEBUG ] detect machine type[ceph_deploy.mgr][INFO] Distro info: CentOS Linux 7.9.2009 Core[ceph_deploy.mgr][DEBUG ] remote host will use systemd[ceph_deploy.mgr][DEBUG ] deploying mgr bootstrap to ceph-mgr02[ceph-mgr02][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf[ceph-mgr02][WARNIN] mgr keyring does not exist yet, creating one[ceph-mgr02][DEBUG ] create a keyring file[ceph-mgr02][DEBUG ] create path recursively if it doesn't exist[ceph-mgr02][INFO] Running command: sudo ceph --cluster ceph --name client.bootstrap-mgr --keyring /var/lib/ceph/bootstrap-mgr/ceph.keyring auth get-or-create mgr.ceph-mgr02 mon allow profile mgr osd allow * mds allow * -o /var/lib/ceph/mgr/ceph-ceph-mgr02/keyring[ceph-mgr02][INFO] Running command: sudo systemctl enable ceph-mgr@ceph-mgr02[ceph-mgr02][WARNIN] Created symlink from /etc/systemd/system/ceph-mgr.target.wants/ceph-mgr@ceph-mgr02.service to /usr/lib/systemd/system/ceph-mgr@.service.[ceph-mgr02][INFO] Running command: sudo systemctl start ceph-mgr@ceph-mgr02[ceph-mgr02][INFO] Running command: sudo systemctl enable ceph.target[cephadm@ceph-admin ceph-cluster]$在集群节点上执行ceph -s来查看现在ceph集群的状态
分布式存储系统之Ceph集群部署

文章插图
提示:可以看到现在集群有一个mon节点和两个mgr节点;mgr01处于当前活跃状态,mgr02处于备用状态;对应没有osd,所以集群状态显示health warning;
向RADOS集群添加OSD
列出并擦净磁盘
查看ceph-deploy disk命令的帮助
分布式存储系统之Ceph集群部署

文章插图
提示:ceph-deploy disk命令有两个子命令,list表示列出对应主机上的磁盘;zap表示擦净对应主机上的磁盘;
分布式存储系统之Ceph集群部署

文章插图
擦净mon01的sdb和sdc

推荐阅读