{"id":1917,"date":"2020-07-21T17:17:36","date_gmt":"2020-07-21T09:17:36","guid":{"rendered":"http:\/\/39.97.231.10\/?p=1917"},"modified":"2020-07-21T17:17:36","modified_gmt":"2020-07-21T09:17:36","slug":"%e5%bc%80%e6%ba%90%e5%88%86%e5%b8%83%e5%bc%8f%e5%ad%98%e5%82%a8%e7%b3%bb%e7%bb%9fcurve","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=1917","title":{"rendered":"\u5f00\u6e90\u5206\u5e03\u5f0f\u5b58\u50a8\u7cfb\u7edfCurve"},"content":{"rendered":"<h2>\u6982\u8ff0<\/h2>\n<p>CURVE\u662f\u7f51\u6613\u81ea\u4e3b\u8bbe\u8ba1\u7814\u53d1\u7684\u9ad8\u6027\u80fd\u3001\u9ad8\u53ef\u7528\u3001\u9ad8\u53ef\u9760\u5206\u5e03\u5f0f\u5b58\u50a8\u7cfb\u7edf\uff0c\u5177\u6709\u975e\u5e38\u826f\u597d\u7684\u6269\u5c55\u6027\u3002\u57fa\u4e8e\u8be5\u5b58\u50a8\u5e95\u5ea7\u53ef\u4ee5\u6253\u9020\u9002\u7528\u4e8e\u4e0d\u540c\u5e94\u7528\u573a\u666f\u7684\u5b58\u50a8\u7cfb\u7edf\uff0c\u5982\u5757\u5b58\u50a8\u3001\u5bf9\u8c61\u5b58\u50a8\u3001\u4e91\u539f\u751f\u6570\u636e\u5e93\u7b49\u3002\u5f53\u524d\u6211\u4eec\u57fa\u4e8eCURVE\u5df2\u7ecf\u5b9e\u73b0\u4e86\u9ad8\u6027\u80fd\u5757\u5b58\u50a8\u7cfb\u7edf\uff0c\u652f\u6301\u5feb\u7167\u514b\u9686\u548c\u6062\u590d ,\u652f\u6301QEMU\u865a\u62df\u673a\u548c\u7269\u7406\u673aNBD\u8bbe\u5907\u4e24\u79cd\u6302\u8f7d\u65b9\u5f0f, \u5728\u7f51\u6613\u5185\u90e8\u4f5c\u4e3a\u9ad8\u6027\u80fd\u4e91\u76d8\u4f7f\u7528\u3002<br \/>\nansible\u662f\u4e00\u6b3e\u81ea\u52a8\u5316\u8fd0\u7ef4\u5de5\u5177\uff0ccurve-ansible \u662f\u57fa\u4e8e ansible playbook \u529f\u80fd\u7f16\u5199\u7684\u96c6\u7fa4\u90e8\u7f72\u5de5\u5177\u3002\u672c\u6587\u6863\u4ecb\u7ecd\u5982\u4f55\u5feb\u901f\u4e0a\u624b\u4f53\u9a8c CURVE \u5206\u5e03\u5f0f\u7cfb\u7edf\uff1a1. \u4f7f\u7528 curve-ansible \u5728\u5355\u673a\u4e0a\u6a21\u62df\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u6b65\u9aa4 2. \u4f7f\u7528 curve-ansible \u5728\u591a\u673a\u4e0a\u90e8\u7f72\u6700\u5c0f\u751f\u4ea7\u73af\u5883<\/p>\n<h2><a id=\\\"user-content-\u5355\u673a\u90e8\u7f72\\\" href=\\\"https:\/\/github.com\/opencurve\/curve\/blob\/master\/docs\/cn\/deploy.md#%E5%8D%95%E6%9C%BA%E9%83%A8%E7%BD%B2\\\" aria-hidden=\\\"true\\\"><\/a>\u5355\u673a\u90e8\u7f72<\/h2>\n<ul>\n<li>\u9002\u7528\u573a\u666f\uff1a\u5e0c\u671b\u7528\u5355\u53f0 Linux \u670d\u52a1\u5668\uff0c\u4f53\u9a8c CURVE \u6700\u5c0f\u7684\u62d3\u6251\u7684\u96c6\u7fa4\uff0c\u5e76\u6a21\u62df\u751f\u4ea7\u90e8\u7f72\u6b65\u9aa4\u3002<\/li>\n<\/ul>\n<h4><a id=\\\"user-content-\u51c6\u5907\u73af\u5883\\\" href=\\\"https:\/\/github.com\/opencurve\/curve\/blob\/master\/docs\/cn\/deploy.md#%E5%87%86%E5%A4%87%E7%8E%AF%E5%A2%83\\\" aria-hidden=\\\"true\\\"><\/a>\u51c6\u5907\u73af\u5883<\/h4>\n<p>\u51c6\u5907\u4e00\u53f0\u90e8\u7f72\u4e3b\u673a\uff0c\u786e\u4fdd\u5176\u8f6f\u4ef6\u6ee1\u8db3\u9700\u6c42:<\/p>\n<ul>\n<li>\u63a8\u8350\u5b89\u88c5 Debian 9 \u6216\u8005 Centos 8.0\n<ul>\n<li>Linux \u64cd\u4f5c\u7cfb\u7edf\u5f00\u653e\u5916\u7f51\u8bbf\u95ee\uff0c\u7528\u4e8e\u4e0b\u8f7d CURVE \u7684\u5b89\u88c5\u5305<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u6700\u5c0f\u89c4\u6a21\u7684 CURVE \u96c6\u7fa4\u62d3\u6251\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5b9e\u4f8b<\/th>\n<th>\u4e2a\u6570<\/th>\n<th>IP<\/th>\n<th>\u914d\u7f6e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>MDS<\/td>\n<td>1<\/td>\n<td>127.0.0.1<\/td>\n<td>\u9ed8\u8ba4\u7aef\u53e3<br \/>\n\u5168\u5c40\u76ee\u5f55\u914d\u7f6e<\/td>\n<\/tr>\n<tr>\n<td>Chunkserver<\/td>\n<td>3<\/td>\n<td>127.0.0.1<\/td>\n<td>\u9ed8\u8ba4\u7aef\u53e3<br \/>\n\u5168\u5c40\u76ee\u5f55\u914d\u7f6e<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u90e8\u7f72\u4e3b\u673a\u8f6f\u4ef6\u548c\u73af\u5883\u8981\u6c42\uff1a<\/p>\n<ul>\n<li>\u90e8\u7f72\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u6709root\u6743\u9650\u7684\u516c\u5171\u7528\u6237<\/li>\n<li>\u90e8\u7f72\u4e3b\u673a\u9700\u8981\u5f00\u653e CURVE \u96c6\u7fa4\u8282\u70b9\u95f4\u6240\u9700\u7aef\u53e3<\/li>\n<li>\u76ee\u524d\u4ec5\u652f\u6301\u5728 x86_64 (AMD64) \u67b6\u6784\u4e0a\u90e8\u7f72 CURVE \u96c6\u7fa4<\/li>\n<li>\u5b89\u88c5 ansible 2.5.9\uff0c\u7528\u4e8e\u90e8\u7f72\u96c6\u7fa4<\/li>\n<li>\u5b89\u88c5 docker 18.09 \u53ca\u4ee5\u4e0a\uff0c \u7528\u4e8e\u90e8\u7f72\u5feb\u7167\u514b\u9686\u670d\u52a1\u5668<\/li>\n<li>\u5b89\u88c5daemon\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5f00\u542fmds\uff0cetcd\uff0csnapshotclone\u7684\u5b88\u62a4\u8fdb\u7a0b<\/li>\n<\/ul>\n<h4><a id=\\\"user-content-\u5b9e\u65bd\u90e8\u7f72\\\" href=\\\"https:\/\/github.com\/opencurve\/curve\/blob\/master\/docs\/cn\/deploy.md#%E5%AE%9E%E6%96%BD%E9%83%A8%E7%BD%B2\\\" aria-hidden=\\\"true\\\"><\/a>\u5b9e\u65bd\u90e8\u7f72<\/h4>\n<ol>\n<li>\u4ee5\u00a0root\u00a0\u7528\u6237\u767b\u5f55\u4e2d\u63a7\u673a\uff0c \u5728\u4e2d\u63a7\u673a\u4e0a\u521b\u5efa\u00a0curve\u00a0\u7528\u6237\uff0c \u5e76\u751f\u6210ssh key<\/li>\n<li>\u4e0b\u8f7dtar\u5305\u5e76\u89e3\u538b\n<pre>wget https:\/\/github.com\/opencurve\/curve\/releases\/download\/v0.1.0\/curve_0.1.0+55cecca7.tar.gz\nwget https:\/\/github.com\/opencurve\/curve\/releases\/download\/v0.1.0\/nbd_0.1.0+55cecca7.tar.gz\nwget https:\/\/github.com\/opencurve\/curve\/releases\/download\/v0.1.0\/nebd_0.1.0+55cecca7.tar.gz\ntar zxvf curve_0.1.0+55cecca7.tar.gz\ntar zxvf nbd_0.1.0+55cecca7.tar.gz\ntar zxvf nebd_0.1.0+55cecca7.tar.gz\ncd curve\/curve-ansible\n<\/pre>\n<\/li>\n<li>\u90e8\u7f72\u96c6\u7fa4\u5e76\u542f\u52a8\u670d\u52a1\n<pre>ansible-playbook -i server.ini deploy_curve.yml\n<\/pre>\n<\/li>\n<li>\u5982\u679c\u9700\u8981\u4f7f\u7528\u5feb\u7167\u514b\u9686\u529f\u80fd\uff0c\u9700\u8981\u6709S3\u8d26\u53f7\uff0c\u53ef\u4ee5\u4f7f\u7528<a href=\\\"https:\/\/www.163yun.com\/product\/nos\\\" rel=\\\"nofollow\\\">\u7f51\u6613\u4e91\u7684\u5bf9\u8c61\u5b58\u50a8<\/a>\n<pre>1. \u5728 server.ini \u4e2d\uff0c\u586b\u5199s3_ak=\\\"\\\" s3_sk=\\\"\\\"\n2. \u5b89\u88c5\u5feb\u7167\u514b\u9686\u670d\u52a1\n   ansible-playbook -i server.ini deploy_snapshotcloneserver.yml\n   ansible-playbook -i server.ini deploy_snapshotcloneserver_nginx.yml\n<\/pre>\n<\/li>\n<li>\u6267\u884c\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u96c6\u7fa4\u72b6\u6001\n<pre>curve_ops_tool status\n<\/pre>\n<\/li>\n<li>\u5b89\u88c5 Nebd \u670d\u52a1\u548c NBD \u5305\n<pre>ansible-playbook -i client.ini deploy_nebd.yml\nansible-playbook -i client.ini deploy_nbd.yml\nansible-playbook -i client.ini deploy_curve_sdk.yml\n<\/pre>\n<\/li>\n<li>\u521b\u5efa CURVE \u5377\uff0c\u5e76\u901a\u8fc7 NBD \u6302\u8f7d\u5230\u672c\u5730\n<pre>1. \u521b\u5efa CURVE \u5377\uff1a \u547d\u4ee4\u4e3a curve create [-h] --filename FILENAME --length LENGTH --user USER\uff0c LENGTH &gt;= 10\n   curve create --filename \/test --length 10 --user curve\n2. \u6302\u8f7d\u5377\n   sudo curve-nbd map cbd:pool\/\/test_curve_\n3. \u67e5\u770b\u8bbe\u5907\u6302\u8f7d\u60c5\u51b5\n   curve-nbd list-mapped\n<\/pre>\n<\/li>\n<\/ol>\n<h2><a id=\\\"user-content-\u591a\u673a\u90e8\u7f72\\\" href=\\\"https:\/\/github.com\/opencurve\/curve\/blob\/master\/docs\/cn\/deploy.md#%E5%A4%9A%E6%9C%BA%E9%83%A8%E7%BD%B2\\\" aria-hidden=\\\"true\\\"><\/a>\u591a\u673a\u90e8\u7f72<\/h2>\n<ul>\n<li>\u9002\u7528\u573a\u666f\uff1a\u7528\u591a\u53f0 Linux \u670d\u52a1\u5668\uff0c\u642d\u5efa CURVE \u6700\u5c0f\u7684\u62d3\u6251\u7684\u96c6\u7fa4\uff0c\u53ef\u4ee5\u7528\u4e8e\u521d\u6b65\u6027\u80fd\u6d4b\u8bd5\u3002<\/li>\n<\/ul>\n<h4><a id=\\\"user-content-\u51c6\u5907\u73af\u5883-1\\\" href=\\\"https:\/\/github.com\/opencurve\/curve\/blob\/master\/docs\/cn\/deploy.md#%E5%87%86%E5%A4%87%E7%8E%AF%E5%A2%83-1\\\" aria-hidden=\\\"true\\\"><\/a>\u51c6\u5907\u73af\u5883<\/h4>\n<p>\u51c6\u5907\u4e09\u53f0\u90e8\u7f72\u4e3b\u673a\uff0c\u786e\u4fdd\u5176\u8f6f\u4ef6\u6ee1\u8db3\u9700\u6c42:<\/p>\n<ul>\n<li>\u63a8\u8350\u5b89\u88c5 Debian 9 \u6216\u8005 Centos 8.0\n<ul>\n<li>Linux \u64cd\u4f5c\u7cfb\u7edf\u5f00\u653e\u5916\u7f51\u8bbf\u95ee\uff0c\u7528\u4e8e\u4e0b\u8f7d CURVE \u7684\u5b89\u88c5\u5305<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>CURVE \u96c6\u7fa4\u62d3\u6251\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>\u5b9e\u4f8b<\/th>\n<th>\u4e2a\u6570<\/th>\n<th>IP<\/th>\n<th>\u7aef\u53e3<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>MDS<\/td>\n<td>3<\/td>\n<td>10.192.100.1<br \/>\n10.192.100.2<br \/>\n10.192.100.3<\/td>\n<td>6666<\/td>\n<\/tr>\n<tr>\n<td>Chunkserver<br \/>\n(\u4e09\u4e2aServer\u4e0a\u5206\u522b\u630210\u4e2a\u76d8\uff0c\u6bcf\u4e2aServer\u4e0a\u542f\u52a810\u4e2aChunkserver\u7528\u4f8b)<\/td>\n<td>10 * 3<\/td>\n<td>10.192.100.1<br \/>\n10.192.100.2<br \/>\n10.192.100.3<\/td>\n<td>8200<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u90e8\u7f72\u4e3b\u673a\u8f6f\u4ef6\u548c\u73af\u5883\u8981\u6c42\uff1a<\/p>\n<ul>\n<li>\u90e8\u7f72\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u6709root\u6743\u9650\u7684\u516c\u5171\u7528\u6237<\/li>\n<li>\u90e8\u7f72\u4e3b\u673a\u9700\u8981\u5f00\u653e CURVE \u96c6\u7fa4\u8282\u70b9\u95f4\u6240\u9700\u7aef\u53e3<\/li>\n<li>\u76ee\u524d\u4ec5\u652f\u6301\u5728 x86_64 (AMD64) \u67b6\u6784\u4e0a\u90e8\u7f72 CURVE \u96c6\u7fa4<\/li>\n<li>\u5b89\u88c5 ansible 2.5.9\uff0c\u7528\u4e8e\u90e8\u7f72\u96c6\u7fa4<\/li>\n<li>\u5b89\u88c5 docker 18.09 \u53ca\u4ee5\u4e0a\uff0c \u7528\u4e8e\u90e8\u7f72\u5feb\u7167\u514b\u9686\u670d\u52a1\u5668<\/li>\n<\/ul>\n<h4><a id=\\\"user-content-\u5b9e\u65bd\u90e8\u7f72-1\\\" href=\\\"https:\/\/github.com\/opencurve\/curve\/blob\/master\/docs\/cn\/deploy.md#%E5%AE%9E%E6%96%BD%E9%83%A8%E7%BD%B2-1\\\" aria-hidden=\\\"true\\\"><\/a>\u5b9e\u65bd\u90e8\u7f72<\/h4>\n<ol>\n<li>\u5728\u4e09\u53f0\u673a\u5668\u4e0a\u5206\u522b\u7528\u00a0root\u00a0\u7528\u6237\u767b\u5f55\uff0c\u521b\u5efa\u00a0curve\u00a0\u7528\u6237\uff0c \u5e76\u751f\u6210ssh key\uff0c\u4fdd\u8bc1\u8fd9\u4e09\u53f0\u673a\u5668\u53ef\u4ee5\u901a\u8fc7ssh\u4e92\u76f8\u767b\u5f55<\/li>\n<li>\u4e0b\u8f7dtar\u5305 \u5e76 \u89e3\u538b\n<pre>wget https:\/\/github.com\/opencurve\/curve\/releases\/download\/v0.1.0\/curve_0.1.0+55cecca7.tar.gz\nwget https:\/\/github.com\/opencurve\/curve\/releases\/download\/v0.1.0\/nbd_0.1.0+55cecca7.tar.gz\nwget https:\/\/github.com\/opencurve\/curve\/releases\/download\/v0.1.0\/nebd_0.1.0+55cecca7.tar.gz\ntar zxvf curve_0.1.0+55cecca7.tar.gz\ntar zxvf nbd_0.1.0+55cecca7.tar.gz\ntar zxvf nebd_0.1.0+55cecca7.tar.gz\ncd curve\/curve-ansible\n<\/pre>\n<\/li>\n<li>\u4fee\u6539\u914d\u7f6e\u6587\u4ef6<br \/>\nserver.ini<\/p>\n<pre>[mds]\nmds1 ansible_ssh_host=10.192.100.1 \/\/ \u6539\u52a8\nmds2 ansible_ssh_host=10.192.100.2 \/\/ \u6539\u52a8\nmds3 ansible_ssh_host=10.192.100.3 \/\/ \u6539\u52a8\n[etcd]\netcd1 ansible_ssh_host=10.192.100.1 etcd_name=etcd1 \/\/ \u6539\u52a8\netcd2 ansible_ssh_host=10.192.100.2 etcd_name=etcd2 \/\/ \u6539\u52a8\netcd3 ansible_ssh_host=10.192.100.3 etcd_name=etcd3 \/\/ \u6539\u52a8\n[snapshotclone]\nsnap1 ansible_ssh_host=10.192.100.1 \/\/ \u6539\u52a8\nsnap2 ansible_ssh_host=10.192.100.2 \/\/ \u6539\u52a8\nsnap3 ansible_ssh_host=10.192.100.3 \/\/ \u6539\u52a8\n[snapshotclone_nginx]\nnginx1 ansible_ssh_host=10.192.100.1 \/\/ \u6539\u52a8\nnginx2 ansible_ssh_host=10.192.100.2 \/\/ \u6539\u52a8\n[chunkservers]\nserver1 ansible_ssh_host=10.192.100.1 \/\/ \u6539\u52a8\nserver2 ansible_ssh_host=10.192.100.2 \/\/ \u6539\u52a8\nserver3 ansible_ssh_host=10.192.100.3 \/\/ \u6539\u52a8\n[mds:vars]\nmds_dummy_port=6667\nmds_port=6666\nmds_subnet=10.192.100.0\/22                      \/\/ \u6539\u52a8\ndefined_healthy_status=\\\"cluster is healthy\\\"\nmds_package_version=\\\"0.0.6.1+160be351\\\"\ntool_package_version=\\\"0.0.6.1+160be351\\\"\n# \u542f\u52a8\u547d\u4ee4\u662f\u5426\u7528sudo\nmds_need_sudo=true\nmds_config_path=\/etc\/curve\/mds.conf\ntool_config_path=\/etc\/curve\/tools.conf\nmds_log_dir=\/data\/log\/curve\/mds\ntopo_file_path=\/etc\/curve\/topo.json\n[etcd:vars]\netcd_listen_client_port=2379\netcd_listen_peer_port=2380\netcd_name=\\\"etcd\\\"\netcd_need_sudo=true\ndefined_healthy_status=\\\"cluster is healthy\\\"\netcd_config_path=\/etc\/curve\/etcd.conf.yml\netcd_log_dir=\/data\/log\/curve\/etcd\n[snapshotclone:vars]\nansible_ssh_port=1046\nsnapshot_port=5556\nsnapshot_dummy_port=8081\nsnapshot_subnet=10.192.100.0\/22                      \/\/ \u6539\u52a8\ndefined_healthy_status=\\\"cluster is healthy\\\"\nsnapshot_package_version=\\\"0.0.6.1.1+7af4d6a4\\\"\nsnapshot_need_sudo=true\nsnapshot_config_path=\/etc\/curve\/snapshot_clone_server.conf\nsnap_s3_config_path=\/etc\/curve\/s3.conf\nsnap_client_config_path=\/etc\/curve\/snap_client.conf\nsnap_tool_config_path=\/etc\/curve\/snapshot_tools.conf\nclient_register_to_mds=false\nclient_chunkserver_op_max_retry=50\nclient_chunkserver_max_rpc_timeout_ms=16000\nclient_chunkserver_max_stable_timeout_times=64\nclient_turn_off_health_check=false\nsnapshot_clone_server_log_dir=\/data\/log\/curve\/snapshotclone\naws_package_version=\\\"1.0\\\"\n[chunkservers:vars]\nwait_service_timeout=60\nenv_name=pubt1\ncheck_copysets_status_times=1000\ncheck_copysets_status_interval=1\ncs_package_version=\\\"0.0.6.1+160be351\\\"\naws_package_version=\\\"1.0\\\"\ndefined_copysets_status=\\\"Copysets are healthy\\\"\nchunkserver_base_port=8200\nchunkserver_format_disk=true        \/\/ \u6539\u52a8\uff0c\u4e3a\u4e86\u66f4\u597d\u7684\u6027\u80fd\uff0c\u5b9e\u9645\u751f\u4ea7\u73af\u5883\u9700\u8981\u5c06chunkserver\u4e0a\u7684\u78c1\u76d8\u5168\u90e8\u9884\u683c\u5f0f\u5316\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u6bd4\u8f83\u8017\u65f61T\u7684\u76d8\u683c\u5f0f80%\u5316\u5927\u6982\u9700\u89811\u4e2a\u5c0f\u65f6\nchunk_alloc_percent=80              \/\/ \u9884\u521b\u7684chunkFilePool\u5360\u636e\u78c1\u76d8\u7a7a\u95f4\u7684\u6bd4\u4f8b\uff0c\u6bd4\u4f8b\u8d8a\u5927\uff0c\u683c\u5f0f\u5316\u8d8a\u6162\n# \u6bcf\u53f0\u673a\u5668\u4e0a\u7684chunkserver\u7684\u6570\u91cf\nchunkserver_num=10                                      \/\/ \u6539\u52a8\nchunkserver_need_sudo=true\n# \u542f\u52a8chunkserver\u8981\u7528\u5230ansible\u7684\u5f02\u6b65\u64cd\u4f5c\uff0c\u5426\u5219ansible\u9000\u51fa\u540echunkserver\u4e5f\u4f1a\u9000\u51fa\n# \u5f02\u6b65\u7b49\u5f85\u7ed3\u679c\u7684\u603b\u65f6\u95f4\nchunkserver_async=5\n# \u5f02\u6b65\u67e5\u8be2\u7ed3\u679c\u7684\u95f4\u9694\nchunkserver_poll=1\nchunkserver_conf_path=\/etc\/curve\/chunkserver.conf\nchunkserver_data_dir=.\/data\nchunkserver_subnet=10.192.100.1\/22                      \/\/ \u6539\u52a8\nchunkserver_s3_config_path=\/etc\/curve\/cs_s3.conf\n# chunkserver\u4f7f\u7528\u7684client\u76f8\u5173\u7684\u914d\u7f6e\nchunkserver_client_config_path=\/etc\/curve\/cs_client.conf\nclient_register_to_mds=false\nclient_chunkserver_op_max_retry=3\nclient_chunkserver_max_stable_timeout_times=64\nclient_turn_off_health_check=false\ndisable_snapshot_clone=true                           \/\/ \u6539\u52a8\uff0c\u8fd9\u4e00\u9879\u53d6\u51b3\u4e8e\u662f\u5426\u9700\u8981\u4f7f\u7528\u5feb\u7167\u514b\u9686\u529f\u80fd\uff0c\u9700\u8981\u7684\u8bdd\u8bbe\u7f6e\u4e3afalse\uff0c\u5e76\u63d0\u4f9bs3_ak\u548cs3_sk\n[snapshotclone_nginx:vars]\nsnapshotcloneserver_nginx_dir=\/etc\/curve\/nginx\nsnapshot_nginx_conf_path=\/etc\/curve\/nginx\/conf\/nginx.conf\nsnapshot_nginx_lua_conf_path=\/etc\/curve\/nginx\/app\/etc\/config.lua\nnginx_docker_internal_port=80\nnginx_docker_external_port=5555\n[all:vars]\nsudo_user=curve\ndeploy_dir=\/home\/curve\nneed_confirm=true\ncurve_ops_tool_config=\/etc\/curve\/tools.conf\nneed_update_config=true\nwait_service_timeout=10\ns3_ak=\\\"\\\"\ns3_sk=\\\"\\\"\nansible_ssh_port=22\ncurve_root_username=root                           \/\/ \u6539\u52a8\uff0c\u4fee\u6539\u6210\u81ea\u5df1\u9700\u8981\u7684username\uff0c\u56e0\u4e3a\u76ee\u524d\u7684\u4e00\u4e2abug\uff0c\u7528\u5230\u5feb\u7167\u514b\u9686\u7684\u8bdd\u7528\u6237\u540d\u5fc5\u987b\u4e3aroot\ncurve_root_password=root_password                  \/\/ \u6539\u52a8\uff0c\u4fee\u6539\u6210\u81ea\u5df1\u9700\u8981\u7684\u5bc6\u7801\n<\/pre>\n<p>client.ini<\/p>\n<pre>[client]\nclient1 ansible_ssh_host=10.192.100.1  \/\/ \u6539\u52a8\n# \u4ec5\u7528\u4e8e\u751f\u6210\u914d\u7f6e\u4e2d\u7684mds\u5730\u5740\n[mds]\nmds1 ansible_ssh_host=10.192.100.1  \/\/ \u6539\u52a8\nmds2 ansible_ssh_host=10.192.100.2  \/\/ \u6539\u52a8\nmds3 ansible_ssh_host=10.192.100.3  \/\/ \u6539\u52a8\n[client:vars]\nansible_ssh_port=1046\nnebd_package_version=\\\"1.0.2+e3fa47f\\\"\nnbd_package_version=\\\"\\\"\nsdk_package_version=\\\"0.0.6.1+160be351\\\"\ndeploy_dir=\/usr\/bin\nnebd_start_port=9000\nnebd_port_max_range=5\nnebd_need_sudo=true\nclient_config_path=\/etc\/curve\/client.conf\nnebd_client_config_path=\/etc\/nebd\/nebd-client.conf\nnebd_server_config_path=\/etc\/nebd\/nebd-server.conf\nnebd_data_dir=\/data\/nebd\nnebd_log_dir=\/data\/log\/nebd\ncurve_sdk_log_dir=\/data\/log\/curve\n[mds:vars]\nmds_port=6666\n[all:vars]\nneed_confirm=true\nneed_update_config=true\n<\/pre>\n<p>group_vars\/mds.yml<\/p>\n<pre>---\n# \u96c6\u7fa4\u62d3\u6251\u4fe1\u606f\ncluster_map:\n  servers:\n    - name: server1\n      internalip: 10.192.100.1       \/\/ \u6539\u52a8\n      internalport: 0                \/\/ \u6539\u52a8\n      externalip: 10.192.100.1       \/\/ \u6539\u52a8\n      externalport: 0                \/\/ \u6539\u52a8\n      zone: zone1\n      physicalpool: pool1\n    - name: server2\n      internalip: 10.192.100.2       \/\/ \u6539\u52a8\n      internalport: 0                \/\/ \u6539\u52a8\n      externalip: 10.192.100.1       \/\/ \u6539\u52a8\n      externalport: 0                \/\/ \u6539\u52a8\n      zone: zone2\n      physicalpool: pool1\n    - name: server3\n      internalip: 10.192.100.3       \/\/ \u6539\u52a8\n      internalport: 0                \/\/ \u6539\u52a8\n      externalip: 10.192.100.1       \/\/ \u6539\u52a8\n      externalport: 0                \/\/ \u6539\u52a8\n      zone: zone3\n      physicalpool: pool1\n  logicalpools:\n    - name: logicalPool1\n      physicalpool: pool1\n      type: 0\n      replicasnum: 3\n      copysetnum: 2000\n      zonenum: 3\n      scatterwidth: 0\n<\/pre>\n<\/li>\n<li>\u90e8\u7f72\u96c6\u7fa4\u5e76\u542f\u52a8\u670d\u52a1\n<pre>ansible-playbook -i server.ini deploy_curve.yml\n<\/pre>\n<\/li>\n<li>\u5982\u679c\u9700\u8981\u4f7f\u7528\u5feb\u7167\u514b\u9686\u529f\u80fd\uff0c\u9700\u8981\u6709S3\u8d26\u53f7\uff0c\u53ef\u4ee5\u4f7f\u7528<a href=\\\"https:\/\/www.163yun.com\/product\/nos\\\" rel=\\\"nofollow\\\">\u7f51\u6613\u4e91\u7684\u5bf9\u8c61\u5b58\u50a8<\/a>\u00a0\u540c\u4e0a\n<pre>1. \u5728 server.ini \u4e2d\uff0c\u586b\u5199s3_ak=\\\"\\\" s3_sk=\\\"\\\" disable_snapshot_clone=false\n2. \u5b89\u88c5\u5feb\u7167\u514b\u9686\u670d\u52a1\n   ansible-playbook -i server.ini deploy_snapshotcloneserver.yml\n   ansible-playbook -i server.ini deploy_snapshotcloneserver_nginx.yml\n<\/pre>\n<\/li>\n<li>\u6267\u884c\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u96c6\u7fa4\u72b6\u6001\n<pre>curve_ops_tool status\n<\/pre>\n<\/li>\n<li>\u5b89\u88c5 Nebd \u670d\u52a1\u548c NBD \u5305\n<pre>ansible-playbook -i client.ini deploy_nebd.yml\nansible-playbook -i client.ini deploy_nbd.yml\nansible-playbook -i client.ini deploy_curve_sdk.yml\n<\/pre>\n<\/li>\n<li>\u521b\u5efa CURVE \u5377\uff0c\u5e76\u901a\u8fc7 NBD \u6302\u8f7d\u5230\u672c\u5730\n<pre>1. \u521b\u5efa CURVE \u5377\uff1a \u547d\u4ee4\u4e3a curve create [-h] --filename FILENAME --length LENGTH --user USER\uff0c LENGTH &gt;= 10\n   curve create --filename \/test --length 10 --user curve\n2. \u6302\u8f7d\u5377\n   sudo curve-nbd map cbd:pool\/\/test_curve_\n3. \u67e5\u770b\u8bbe\u5907\u6302\u8f7d\u60c5\u51b5\n   curve-nbd list-mapped<\/pre>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8ff0 CURVE\u662f\u7f51\u6613\u81ea\u4e3b\u8bbe\u8ba1\u7814\u53d1\u7684\u9ad8\u6027\u80fd\u3001\u9ad8\u53ef\u7528\u3001\u9ad8\u53ef\u9760\u5206\u5e03\u5f0f\u5b58\u50a8\u7cfb\u7edf\uff0c\u5177\u6709\u975e\u5e38\u826f\u597d\u7684\u6269\u5c55\u6027\u3002\u57fa\u4e8e\u8be5\u5b58\u50a8\u5e95\u5ea7 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=1917\"> <span class=\"screen-reader-text\">\u5f00\u6e90\u5206\u5e03\u5f0f\u5b58\u50a8\u7cfb\u7edfCurve<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[141,142],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"\u6982\u8ff0 CURVE\u662f\u7f51\u6613\u81ea\u4e3b\u8bbe\u8ba1\u7814\u53d1\u7684\u9ad8\u6027\u80fd\u3001\u9ad8\u53ef\u7528\u3001\u9ad8\u53ef\u9760\u5206\u5e03\u5f0f\u5b58\u50a8\u7cfb\u7edf\uff0c\u5177\u6709\u975e\u5e38\u826f\u597d\u7684\u6269\u5c55\u6027\u3002\u57fa\u4e8e\u8be5\u5b58\u50a8\u5e95\u5ea7&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/1917"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1917"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/1917\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1917"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}