cd /home/zzq/myceph
sudo ceph-deploy --overwrite-conf rgw create admin
正确输出如下:
[zzq@localhost myceph]$ sudo ceph-deploy --overwrite-conf rgw create admin
[ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
[ceph_deploy.cli][INFO ] Invoked (1.5.37): /usr/bin/ceph-deploy --overwrite-conf rgw create admin
[ceph_deploy.cli][INFO ] ceph-deploy options:
[ceph_deploy.cli][INFO ] username : None
[ceph_deploy.cli][INFO ] verbose : False
[ceph_deploy.cli][INFO ] rgw : [('admin', 'rgw.admin')]
[ceph_deploy.cli][INFO ] overwrite_conf : True
[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 0x265af38>
[ceph_deploy.cli][INFO ] cluster : ceph
[ceph_deploy.cli][INFO ] func : <function rgw at 0x25b8758>
[ceph_deploy.cli][INFO ] ceph_conf : None
[ceph_deploy.cli][INFO ] default_release : False
[ceph_deploy.rgw][DEBUG ] Deploying rgw, cluster ceph hosts admin:rgw.admin
[admin][DEBUG ] connected to host: admin
[admin][DEBUG ] detect platform information from remote host
[admin][DEBUG ] detect machine type
[ceph_deploy.rgw][INFO ] Distro info: CentOS 6.9 Final
[ceph_deploy.rgw][DEBUG ] remote host will use sysvinit
[ceph_deploy.rgw][DEBUG ] deploying rgw bootstrap to admin
[admin][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[admin][WARNIN] rgw keyring does not exist yet, creating one
[admin][DEBUG ] create a keyring file
[admin][DEBUG ] create path recursively if it doesn't exist
[admin][INFO ] Running command: ceph --cluster ceph --name client.bootstrap-rgw --keyring /var/lib/ceph/bootstrap-rgw/ceph.keyring auth get-or-create client.rgw.admin osd allow rwx mon allow rw -o /var/lib/ceph/radosgw/ceph-rgw.admin/keyring
[admin][INFO ] Running command: service ceph-radosgw start
[admin][DEBUG ] Starting client.rgw.admin...
[admin][WARNIN] /usr/bin/dirname: extra operand `-n'
[admin][WARNIN] Try `/usr/bin/dirname --help' for more information.
[admin][DEBUG ] 2018-05-27 17:55:20.895832 7f76e44c5820 -1 WARNING: libcurl doesn't support curl_multi_wait()
[admin][DEBUG ] 2018-05-27 17:55:20.895832 7f76e44c5820 -1 WARNING: cross zone / region transfer performance may be affected
[admin][DEBUG ] [ OK ]
[admin][INFO ] Running command: chkconfig ceph-radosgw on
[ceph_deploy.rgw][INFO ] The Ceph Object Gateway (RGW) is now running on host admin and default port 7480
Error in sys.exitfunc:
查看radosgw服务状态:
ps -ef | grep radosgw
sudo systemctl status ceph-radosgw.service #centos7
sudo service ceph-radosgw status #centos6
重启RGW使用命令
sudo systemctl restart ceph-radosgw.service #centos7
sudo service ceph-radosgw restart #centos6
如果报错ibcurl doesn’t support curl_multi_wait()说明没有权限认证或者需要的资源池没有创建好。
[zzq@localhost myceph]$ sudo service ceph-radosgw restart
Starting client.rgw.admin... [FAILED]
/usr/bin/dirname: extra operand `-n'
Try `/usr/bin/dirname --help' for more information.
2018-05-27 18:07:21.747065 7ff716144820 -1 WARNING: libcurl doesn't support curl_multi_wait()
2018-05-27 18:07:21.747066 7ff716144820 -1 WARNING: cross zone / region transfer performance may be affected