{"id":686,"date":"2016-10-13T15:57:22","date_gmt":"2016-10-13T15:57:22","guid":{"rendered":"https:\/\/peloo.net\/?p=686"},"modified":"2017-08-08T05:38:16","modified_gmt":"2017-08-08T05:38:16","slug":"glusterfs3-7-3%e6%ba%90%e7%a0%81%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/peloo.net\/?p=686","title":{"rendered":"GlusterFS3.7.3\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5"},"content":{"rendered":"<p>\n\t<span style=\"font-size:16px\"><strong>\u4e00\u3001\u80cc\u666f\u7b80\u4ecb<\/strong><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; \u6700\u8fd1\u5728\u5b66\u4e60\u6027\u80fd\u6d4b\u8bd5\uff0c\u9996\u5148\u60f3\u5230\u5982\u679c\u80fd\u771f\u662f\u642d\u5efa\u4e2a\u57fa\u7840\u7f51\u7ad9\u67b6\u6784\uff0c\u80af\u5b9a\u5bf9\u8fdb\u4e00\u6b65\u7684\u5b66\u4e60\u6709\u5e2e\u52a9\uff0c\u80af\u5b9a\u6bd4lordrunner\u81ea\u5e26\u7684\u90a3\u4e2a\u7f51\u7ad9\u7a0b\u5e8f\u66f4\u6709\u5e2e\u52a9\u3002\u5728\u642d\u5efa\u7684\u8fc7\u7a0b\u4e2d\uff0c\u56e0\u4e3a\u662f\u8981\u5efa\u7acb\u4e2a\u8fdc\u7a0b\u6587\u4ef6\u670d\u52a1\u5668\uff0cglusterfs\u662f\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\uff0c\u642d\u5efaglusterfs\u670d\u52a1\u5668\u8d39\u4e86\u4e0d\u5c11\u5468\u6298\uff0c\u6298\u817e\u4e86\u4e00\u4e2a\u591a\u661f\u671f\u624d\u641e\u5b9a\uff0c\u5728\u8fd9\u91cc\u6709\u5fc5\u8981\u603b\u7ed3\u4e0b\u3002<\/span>\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<strong><span style=\"font-size:16px\">\u4e8c\u3001\u7cfb\u7edf\u73af\u5883&nbsp;<\/span><\/strong>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; \u73af\u5883\u4e2d\u51713\u53f0\u670d\u52a1\u5668\uff0cIP\u5206\u522b\u662f172.17.1.135&nbsp; 172.17.1.134&nbsp; 172.17.1.133\uff0c\u5176\u4e2d133\u548c134\u4f5c\u4e3aglusterfs\u670d\u52a1\u5668\u7aef\uff0c135\u4f5c\u4e3a\u5ba2\u6237\u7aef\u6302\u8f7d\u670d\u52a1\u5668\u7aef\u7684\u5377\u3002<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; \u4e09\u4e2a\u670d\u52a1\u5668172.17.1.135&nbsp; 172.17.1.134&nbsp; 172.17.1.133\u7684\u4fe1\u606f\u4f9d\u6b21\u5982\u4e0b\u56fe\u6240\u793a\uff0c<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/peloo.net\/wp-content\/uploads\/2016\/10\/135.png\" \/><\/span>\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<span style=\"font-size:14px\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/peloo.net\/wp-content\/uploads\/2016\/10\/134.png\" \/><\/span>\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<span style=\"font-size:14px\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/peloo.net\/wp-content\/uploads\/2016\/10\/133.png\" \/><\/span>\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<span style=\"font-size:16px\"><strong>\u4e09\u3001\u7f16\u8bd1\u5b89\u88c5<\/strong><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; \u4e09\u53f0\u670d\u52a1\u5668\u4e0a\u5747\u6267\u884c\u4ee5\u4e0b\u5b89\u88c5\u6b65\u9aa4<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">#&nbsp; \u6dfb\u52a0 epel \u8f6f\u4ef6\u6e90<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp; &nbsp;&nbsp;rpm -Uvh&nbsp;<a href=\"http:\/\/mirrors.ustc.edu.cn\/fedora\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm\" style=\"line-height: 1.6\">http:\/\/mirrors.ustc.edu.cn\/fedora\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm<\/a><\/span>\n<\/p>\n<div>\n<p style=\"margin: 0px\">\n\t\t&nbsp;\n\t<\/p>\n<p style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\">#&nbsp; \u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u5305<\/span>\n\t<\/p>\n<p style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\"><span style=\"line-height: 1.6\">&nbsp; &nbsp;&nbsp;<\/span>yum install -y aclocal autoconf aotuheader automake libtool<\/span>\n\t<\/p>\n<p style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\"><span style=\"line-height: 1.6\">&nbsp; &nbsp;&nbsp;<\/span>yum install -y &nbsp;automake autoconf libtool flex bison openssl-devel libxml2-devel python-devel libaio-devel libibverbs-devel librdmacm-devel readline-devel lvm2-devel glib2-devel userspace-rcu-devel libcmocka-devel &nbsp;<\/span>\n\t<\/p>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\"><span style=\"line-height: 1.6\">&nbsp; &nbsp;&nbsp;<\/span>yum -y install libacl-devel<\/span>\n\t<\/div>\n<\/div>\n<div>\n<p style=\"margin: 0px\">\n\t\t&nbsp;\n\t<\/p>\n<p style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\">#&nbsp; \u626b\u63cf\u6574\u4e2a\u78c1\u76d8\uff0c\u53d1\u73b0\u6709\u4ee5\u524d\u5b89\u88c5\u8fc7\u7684glusterfs\u7248\u672c\u6587\u4ef6\u5373\u5220\u9664\uff0c\u8bf7\u914c\u60c5\u4f7f\u7528\uff0c\u672c\u4eba\u5c31\u5728\u8fd9\u4e00\u70b9\u88ab\u5751\u4e86\u4e00\u4e2a\u591a\u661f\u671f\uff0c\u539f\u56e0\u662f\u53cd\u590d\u5b89\u88c5\u4e86\u597d\u591a\u6b21glusterfs\u591a\u4e2a\u7248\u672c\uff0c\u591a\u4f59\u7684\u7248\u672c\u6587\u4ef6\u672a\u6e05\u9664\uff0c\u5bfc\u81f4\u540e\u6765\u7684glusterfs\u6302\u8f7d\u51fa\u73b0\u7248\u672c\u4e0d\u4e00\u81f4\u7684\u95ee\u9898\u3002<\/span>\n\t<\/p>\n<p style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\">&nbsp; &nbsp;&nbsp;find \/ | grep -i &nbsp;gluster | grep -Ei -v &#039;\/home|\/tmp&#039; | xargs rm -rf<\/span>\n\t<\/p>\n<p style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\">&nbsp; &nbsp; yum -y remove `rpm -qa | grep -i gluster` 2&gt;\/dev\/null<\/span>\n\t<\/p>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\"><span style=\"line-height: 1.6\">&nbsp; &nbsp;&nbsp;<\/span><\/span>\n\t<\/div>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\">#&nbsp; \u5b98\u7f51\u4e0b\u8f7d\u6e90\u7801\u5305\u5e76\u7f16\u8bd1\u5b89\u88c5\uff0c\u7f16\u8bd1\u8017\u65f6\u5927\u69822\u5206\u949f\uff0c\u6709\u95ee\u9898\u770b\u62a5\u9519\uff0c\u5bfb\u627e\u89e3\u51b3\u529e\u6cd5\u3002<\/span>\n\t<\/div>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\">&nbsp; &nbsp; wget -c -P \/tmp http:\/\/download.gluster.org\/pub\/gluster\/glusterfs\/3.7\/3.7.3\/glusterfs-3.7.3.tar.gz<\/span>\n\t<\/div>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\">&nbsp; &nbsp; cd \/tmp<\/span>\n\t<\/div>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\">&nbsp;&nbsp;<span style=\"line-height: 1.6\">&nbsp; tar xvf glusterfs-3.7.3.tar.gz<\/span><\/span>\n\t<\/div>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\">&nbsp; &nbsp; cd glusterfs-3.7.15<\/span>\n\t<\/div>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\">&nbsp; &nbsp;&nbsp;<span style=\"line-height: 1.6\">.\/configure --enable-debug &nbsp; &nbsp; --disable-tiering<\/span><\/span>\n\t<\/div>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\"><span style=\"line-height: 1.6\">&nbsp; &nbsp; make &amp;&amp; make install<\/span><\/span>\n\t<\/div>\n<div style=\"margin: 0px\">\n\t\t<span style=\"font-size:14px\"><span style=\"line-height: 1.6\">&nbsp; &nbsp; gluster --version<\/span>&nbsp; &nbsp;<\/span>\n\t<\/div>\n<\/div>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<strong><span style=\"font-size:16px\">\u56db\u3001glusterfs\u6587\u4ef6\u7cfb\u7edf\u7684\u6302\u8f7d\u4f7f\u7528<\/span><\/strong>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; #&nbsp; \u4e24\u4e2aglusterfs\u670d\u52a1\u5668\u5747\u6dfb\u52a0\u4e24\u5757\u786c\u76d8\uff0c\u8fd9\u91cc\u662f\/dev\/sdb\uff0c\u7136\u540e\u5728\u4e24\u53f0\u670d\u52a1\u5668\u4e0a\u5206\u522b\u521b\u5efalv\u5377\u997c\u683c\u5f0f\u5316\u4e3axfs\u6587\u4ef6\u7cfb\u7edf\u997c\u6302\u8f7d<\/span>\n<\/p>\n<pre>\r\n<span style=\"font-size:14px\"><code style=\"margin: 8px 0px\">  parted -s -- \/dev\/sdb mktable gpt\r\n  parted -s -- \/dev\/sdb mkpart primary 2048s 100%\r\n  parted -s -- \/dev\/sdb set 1 lvm on\r\n  partx -a \/dev\/sdb\r\n  pvcreate \/dev\/sdb1\r\n  vgcreate vgglus1 \/dev\/sdb1\r\n  lvcreate -l 100%VG -n gbrick1 vgglus1\r\n  mkfs.xfs -i size=512 \/dev\/vgglus1\/gbrick1\r\n  echo -e &#039;\/dev\/vgglus1\/gbrick1\\t\/data\/gluster\\txfs\\tinode64,nobarrier\\t0 0&#039; &gt;&gt; \/etc\/fstab\r\n  mkdir -p \/data\/gluster\/v1\r\n  mount \/data\/gluster<\/code><\/span><\/pre>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; #&nbsp; \u4e24\u4e2aglusterfs\u670d\u52a1\u5668\u7ec4\u6210\u4e00\u4e2a\u5b58\u50a8\u6c60\uff0c\u5728172.17.1.134\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; gluster peer probe 172.17.1.133<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; #&nbsp; \u521b\u5efaglusterfs\u5377\u5e76\u542f\u52a8\uff0c\u8fd9\u91cc\u4f7f\u7528replica<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; gluster volume create gvol0 replica 2 172.17.1.133:\/data\/gluster\/v1 172.17.1.134:\/data\/gluster\/v1<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; gluster volume start gvol0<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; gluster volume info<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; #&nbsp; \u5ba2\u6237\u7aef172.17.1.135\u6302\u8f7dglusterfs\u5377<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; mkdir -p \/data\/gvol0<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:14px\">&nbsp;&nbsp;&nbsp; mount -t glusterfs 172.17.1.134:\/gvol0 \/data\/gvol0<\/span><br \/>\n\t&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u80cc\u666f\u7b80\u4ecb &nbsp;&nbsp;&nbsp; \u6700\u8fd1\u5728\u5b66\u4e60\u6027\u80fd\u6d4b\u8bd5\uff0c\u9996\u5148\u60f3\u5230\u5982\u679c\u80fd\u771f\u662f\u642d\u5efa\u4e2a\u57fa\u7840\u7f51\u7ad9\u67b6\u6784\uff0c\u80af\u5b9a\u5bf9\u8fdb\u4e00\u6b65\u7684\u5b66\u4e60\u6709\u5e2e\u52a9\uff0c\u80af\u5b9a\u6bd4lordrunner\u81ea\u5e26\u7684\u90a3\u4e2a\u7f51\u7ad9\u7a0b\u5e8f\u66f4\u6709\u5e2e\u52a9\u3002\u5728\u642d\u5efa\u7684\u8fc7\u7a0b\u4e2d\uff0c\u56e0\u4e3a\u662f\u8981\u5efa\u7acb\u4e2a\u8fdc\u7a0b\u6587\u4ef6\u670d\u52a1\u5668\uff0cglusterfs\u662f\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\uff0c\u642d\u5efaglusterfs\u670d\u52a1\u5668\u8d39\u4e86\u4e0d\u5c11\u5468\u6298\uff0c\u6298\u817e\u4e86\u4e00\u4e2a\u591a\u661f\u671f\u624d\u641e\u5b9a\uff0c\u5728\u8fd9\u91cc\u6709\u5fc5\u8981\u603b\u7ed3\u4e0b\u3002 &nbsp; \u4e8c\u3001\u7cfb\u7edf\u73af\u5883&nbsp; &nbsp;&nbsp;&nbsp; \u73af\u5883\u4e2d\u51713\u53f0\u670d\u52a1\u5668\uff0cIP\u5206\u522b\u662f172.17.1.135&nbsp; 172.17.1.134&nbsp; 172.17.1.133\uff0c\u5176\u4e2d133\u548c134\u4f5c\u4e3aglusterfs\u670d\u52a1\u5668\u7aef\uff0c135\u4f5c\u4e3a\u5ba2\u6237\u7aef\u6302\u8f7d\u670d\u52a1\u5668\u7aef\u7684\u5377\u3002 &nbsp;&nbsp;&nbsp; \u4e09\u4e2a\u670d\u52a1\u5668172.17.1.135&nbsp; 172.17.1.134&nbsp; 172.17.1.133\u7684\u4fe1\u606f\u4f9d\u6b21\u5982\u4e0b\u56fe\u6240\u793a\uff0c &nbsp; &nbsp; &nbsp; \u4e09\u3001\u7f16\u8bd1\u5b89\u88c5 &nbsp;&nbsp;&nbsp; \u4e09\u53f0\u670d\u52a1\u5668\u4e0a\u5747\u6267\u884c\u4ee5\u4e0b\u5b89\u88c5\u6b65\u9aa4 #&nbsp; \u6dfb\u52a0 epel \u8f6f\u4ef6\u6e90 &nbsp; &nbsp;&nbsp;rpm -Uvh&nbsp;http:\/\/mirrors.ustc.edu.cn\/fedora\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm &nbsp; #&nbsp; \u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u5305 &nbsp; &nbsp;&nbsp;yum install -y aclocal autoconf aotuheader automake libtool &nbsp; &nbsp;&nbsp;yum install -y &nbsp;automake autoconf libtool flex bison openssl-devel libxml2-devel python-devel libaio-devel libibverbs-devel librdmacm-devel readline-devel lvm2-devel&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/686"}],"collection":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=686"}],"version-history":[{"count":6,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/686\/revisions"}],"predecessor-version":[{"id":933,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/686\/revisions\/933"}],"wp:attachment":[{"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}