{"id":2862,"date":"2014-03-02T11:56:53","date_gmt":"2014-03-02T03:56:53","guid":{"rendered":"http:\/\/rmohan.com\/?p=2862"},"modified":"2014-03-02T11:56:53","modified_gmt":"2014-03-02T03:56:53","slug":"gluster-on-centos-6-5","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2862","title":{"rendered":"GLUSTER ON CENTOS 6.5"},"content":{"rendered":"<p>cat \/etc\/hosts<\/p>\n<p>127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4<br \/>\n::1 localhost localhost.localdomain localhost6 localhost6.localdomain6<br \/>\n192.168.1.45 cluster1.rmohan.com cluster1<br \/>\n192.168.1.41 cluster2.rmohan.com cluster2<br \/>\n192.168.1.42 cluster3.rmohan.com cluster3<\/p>\n<p>&nbsp;<\/p>\n<p>rpm &#8211;import \/etc\/pki\/rpm-gpg\/RPM-GPG-KEY*<\/p>\n<p>rpm &#8211;import https:\/\/fedoraproject.org\/static\/0608B895.txt<br \/>\ncd \/tmp<br \/>\nwget http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm<br \/>\nrpm -ivh epel-release-6-8.noarch.rpm<br \/>\nyum install yum-priorities<br \/>\nvi \/etc\/yum.repos.d\/epel.repo<\/p>\n<p>priority=10<br \/>\n[epel]<br \/>\nname=Extra Packages for Enterprise Linux 6 &#8211; $basearch<br \/>\n#baseurl=http:\/\/download.fedoraproject.org\/pub\/epel\/6\/$basearch<br \/>\nmirrorlist=https:\/\/mirrors.fedoraproject.org\/metalink?repo=epel-6&amp;arch=$basearch<br \/>\nfailovermethod=priority<br \/>\nenabled=1<br \/>\npriority=10<br \/>\ngpgcheck=1<br \/>\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-EPEL-6<\/p>\n<p>glusterfsd &#8211;version<br \/>\ngluster peer probe cluster2.rmohan.com<br \/>\ngluster peer status<br \/>\nmkdir \/data<br \/>\ngluster volume create testvol replica 2 transport tcp cluster1.rmohan.com:\/data cluster2.rmohan.com:\/data<br \/>\ngluster volume start testvol<\/p>\n<p>netstat -tap | grep glusterfsd<br \/>\ngluster volume info<br \/>\nmkdir \/data\/test<br \/>\nmkdir \/data\/test1<br \/>\nmkdir \/data\/test2<br \/>\nmkdir \/data\/test3<br \/>\ngluster volume create testvol replica 2 transport tcp cluster1.rmohan.com:\/data cluster2.rmohan.com:\/data<br \/>\ngluster volume start testvol<br \/>\ngluster peer status<\/p>\n<p>mkdir \/data\/test3<br \/>\nls -la<br \/>\ncd \/data\/<br \/>\nvi test<\/p>\n<p>&nbsp;<br \/>\nClient<br \/>\nyum install glusterfs-client<br \/>\nmkdir \/mnt\/glusterfs<br \/>\nmount.glusterfs cluster1.rmohan.com:\/testvol \/mnt\/glusterfs\/<br \/>\nmount<br \/>\ndf -h<br \/>\ncd \/mnt\/glusterfs\/<br \/>\nls -la<\/p>\n<p>vi \/etc\/fstab<\/p>\n<p>server1.example.com:\/testvol \/mnt\/glusterfs glusterfs defaults,_netdev 0 0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>cat \/etc\/hosts<\/p>\n<p>127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.45 cluster1.rmohan.com cluster1 192.168.1.41 cluster2.rmohan.com cluster2 192.168.1.42 cluster3.rmohan.com cluster3<\/p>\n<p>&nbsp;<\/p>\n<p>rpm &#8211;import \/etc\/pki\/rpm-gpg\/RPM-GPG-KEY*<\/p>\n<p>rpm &#8211;import https:\/\/fedoraproject.org\/static\/0608B895.txt cd \/tmp wget http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm yum install yum-priorities vi \/etc\/yum.repos.d\/epel.repo<\/p>\n<p>priority=10 [epel] name=Extra Packages for Enterprise Linux 6 &#8211; $basearch #baseurl=http:\/\/download.fedoraproject.org\/pub\/epel\/6\/$basearch mirrorlist=https:\/\/mirrors.fedoraproject.org\/metalink?repo=epel-6&amp;arch=$basearch failovermethod=priority enabled=1 priority=10 [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2862"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2862"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2862\/revisions"}],"predecessor-version":[{"id":2864,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2862\/revisions\/2864"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}