Slide

  • LINUX

    LINUX:In 1969 AT&T made a decision to withdraw Multics and go with GECOS (General Electric Comprehensive Operating Supervisor / System), with AT & T in Bells Lab when Multics was withdrawn some of the programmers named Ken Thompson and Dennis Ritchie decided to rewrite operating system in order to support low cost computer..To Know More

    CLICK HERE

  • MICROSOFT

    MICROSOFT:Microsoft was established to develop and sell BASIC interpreters for the Altair 8800. It rose to dominate the home computer operating system market with MS-DOS in the mid-1980s,followed by the Microsoft Windows line of operating systems. To Know More

    CLICK HERE

  • CISCO

    CISCO:During the early 1980s, there was a married couple namely Len and Sandy Bosack who used to work in two different departments of computer located in Stanford University. This couple was facing problem in making their computers communicate with each other To Know More

    CLICK HERE

showinfo=1

GLusterfs Replication Setup


GLusterfs Replication Setup


Note:- you can create a partition, mount it to the directory which we will create below and then do the following steps. If you don’t create a partition directly create a directory in / it will use the / partition size.
In this tutorial I use three systems, two servers and a client:
server1.example.com: IP address 192.168.0.100 (server)
server2.example.com: IP address 192.168.0.101 (server)
client1.example.com: IP address 192.168.0.102 (client)
Server setup……

#vi /etc/hosts
192.168.0.100 server1.example.com server1
192.168.0.101 server2.example.com server2
192.168.0.102 client1.example.com client1
:wq!
(It is also possible to use IP addresses instead of hostnames in the following setup. If you prefer to use IP addresses, you don't have to care about whether the hostnames can be resolved or not.)

#yum install libibverbs-devel fuse-devel
#wget http://ftp.gluster.com/pub/gluster/glusterfs/2.0/LATEST/glusterfs-2.0.9.tar.gz
Or
#wget http://pkgs.fedoraproject.org/repo/pkgs/glusterfs/glusterfs-2.0.9.tar.gz/0467740f423e32bdf2f66d2cf63467f3/glusterfs-2.0.9.tar.gz

#tar -xvfz glusterfs-2.0.9.tar.gz
#cd glusterfs-2.0.9
#./configure
#make && make install
#ldconfig
#glusterfs --version
#mkdir /data/
#mkdir /etc/glusterfs
#vi /etc/glusterfs/glusterfsd.vol
volume posix
type storage/posix
option directory /data
end-volume

volume locks
type features/locks
subvolumes posix
end-volume

volume brick
type performance/io-threads
option thread-count 8
subvolumes locks
end-volume

volume server
type protocol/server
option transport-type tcp
option auth.addr.brick.allow 192.168.0.102
subvolumes brick
end-volume

:wq!
Please note that it is possible to use wildcards for the IP addresses (like 192.168.*) and that you can specify multiple IP addresses separated by comma (e.g. 192.168.0.102,192.168.0.103).

Afterwards we create the following symlink...
#ln -s /usr/local/sbin/glusterfsd /sbin/glusterfsd
and then the system startup links for the GlusterFS server and start it
#chkconfig --levels 35 glusterfsd on
#/etc/init.d/glusterfsd start
Same configuration for server-2 also…………..

Client setup…….
#yum install libibverbs-devel fuse-devel
Then we load the fuse kernel module...
#modprobe fuse
and create the file /etc/rc.modules with the following contents so that the fuse kernel module will be loaded automatically whenever the system boots
#vi /etc/rc.modules
modprobe fuse
:wq!
# chmod +x /etc/rc.modules
#wget http://ftp.gluster.com/pub/gluster/glusterfs/2.0/LATEST/glusterfs-2.0.9.tar.gz
Or
#wget http://pkgs.fedoraproject.org/repo/pkgs/glusterfs/glusterfs-2.0.9.tar.gz/0467740f423e32bdf2f66d2cf63467f3/glusterfs-2.0.9.tar.gz
#tar -xvfz glusterfs-2.0.9.tar.gz
#cd glusterfs-2.0.9
#./configure
#make && make install
#ldconfig
#mkdir /mnt/glusterfs
#mkdir /etc/glusterfs
#vi /etc/glusterfs/glusterfs.vol
volume remote1
type protocol/client
option transport-type tcp
option remote-host server1.example.com
option remote-subvolume brick
end-volume

volume remote2
type protocol/client
option transport-type tcp
option remote-host server2.example.com
option remote-subvolume brick
end-volume

volume replicate
type cluster/replicate
subvolumes remote1 remote2
end-volume

volume writebehind
type performance/write-behind
option window-size 1MB
subvolumes replicate
end-volume

volume cache
type performance/io-cache
option cache-size 512MB
subvolumes writebehind
end-volume

:wq!
Make sure you use the correct server hostnames or IP addresses in the option remote-host lines!
That's it! Now we can mount the GlusterFS filesystem to /mnt/glusterfs with one of the following two commands:

#glusterfs -f /etc/glusterfs/glusterfs.vol /mnt/glusterfs
or
#mount -t glusterfs /etc/glusterfs/glusterfs.vol /mnt/glusterfs
#mount
#df -h
If you get the following error “Transport endpoint is not connected”. Check the glusterfsd.vol file at server “option auth.addr.brick.allow 192.168.0.102” ip is proper or not then again mount the file system
For permanent mounting make entry in fstab file
#vi /etc/fstab
/etc/glusterfs/glusterfs.vol /mnt/glusterfs glusterfs defaults 0 0

:wq!

For testing you create files and check the replication.. on each server as well as client……….
Testing GLuster…….
Now let's create some test files on the GlusterFS share:
client1.example.com:
#touch /mnt/glusterfs/test1
#touch /mnt/glusterfs/test2
Now let's check the /data/export directory on server1.example.com and server2.example.com. The test1 and test2 files should be present on each node:
server1.example.com/server2.example.com:
#ls -l /data/export
[root@server1 ~]# ls -l /data/export
total 0
-rw-r--r-- 1 root root 0 2010-02-22 16:50 test1
-rw-r--r-- 1 root root 0 2010-02-22 16:50 test2
[root@server1 ~]#
Now we shut down server1.example.com and add/delete some files on the GlusterFS share on client1.example.com.
server1.example.com:
#shutdown -h now
client1.example.com:
#touch /mnt/glusterfs/test3
#touch /mnt/glusterfs/test4
#rm -f /mnt/glusterfs/test2
The changes should be visible in the /data/export directory on server2.example.com:
server2.example.com:
#ls -l /data/export
[root@server2 ~]# ls -l /data/export
total 0
-rw-r--r-- 1 root root 0 2010-02-22 16:50 test1
-rw-r--r-- 1 root root 0 2010-02-22 16:53 test3
-rw-r--r-- 1 root root 0 2010-02-22 16:53 test4
[root@server2 ~]#
Let's boot server1.example.com again and take a look at the /data/export directory:
server1.example.com:
#ls -l /data/export
[root@server1 ~]# ls -l /data/export
total 0
-rw-r--r-- 1 root root 0 2010-02-22 16:50 test1
-rw-r--r-- 1 root root 0 2010-02-22 16:50 test2
[root@server1 ~]#
As you see, server1.example.com hasn't noticed the changes that happened while it was down. This is easy to fix, all we need to do is invoke a read command on the GlusterFS share on client1.example.com, e.g.:
client1.example.com:
#ls -l /mnt/glusterfs/
[root@client1 ~]# ls -l /mnt/glusterfs/
total 0
-rw-r--r-- 1 root root 0 2010-02-22 16:50 test1
-rw-r--r-- 1 root root 0 2010-02-22 16:53 test3
-rw-r--r-- 1 root root 0 2010-02-22 16:53 test4
[root@client1 ~]#
Now take a look at the /data/export directory on server1.example.com again, and you should see that the changes have been replicated to that node:
server1.example.com:
#ls -l /data/export
[root@server1 ~]# ls -l /data/export
total 0
-rw-r--r-- 1 root root 0 2010-02-22 16:50 test1
-rw-r--r-- 1 root root 0 2010-02-22 16:53 test3
-rw-r--r-- 1 root root 0 2010-02-22 16:53 test4
[root@server1 ~]#
Note:- there is no limit for server and client, configuration will be same…….. 

26 comments:

  1. This is a fantastic website and I can not recommend you guys enough. Full of useful resource and great layout very easy on the eyes.
    http://www.healthseum.com |

    ReplyDelete
  2. Generally I do not read article on blogs, but I wish to say that this write-up very compelled me to check out and do so! Your writing style has been amazed me. Thanks, very nice post.
    real-estate-tucson |

    ReplyDelete
  3. I'm now not sure the place you are getting your information, but good topic. I must spend a while finding out more or understanding more. Thank you for fantastic information I used to be searching for this info for my mission.
    homewoodappliancerepair.com |

    ReplyDelete
  4. A good informative post that you have shared and appreciate your work for sharing the information.
    http://www.chinahouseokc.com |

    ReplyDelete
  5. You actually make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post, I will try to get the hang of it!
    www.onestopautomarket.com |

    ReplyDelete
  6. I really think that one of the best articles is this one. It has everything. I needed this information to prove wrong my teacher. I knew this was happening. But my teacher did not agree with me. Now, he'll know I was right! Thank you!
    selecttoursinc.com |

    ReplyDelete
  7. You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site .
    stonewedgetechnology |

    ReplyDelete
  8. Superbly written article, if only all bloggers oered the same content as you, the internet would be a far better place..
    http://www.7tz8.org |

    ReplyDelete
  9. This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article.
    thedetailsmovie |

    ReplyDelete
  10. I am really glad to be here.I hope to see more great articles here in the future too so keep it up and good luck to all of you!
    Falcon Profits |

    ReplyDelete
  11. Great story:) Makes these characters alive. Are you thinking to make this sword little longer, as it is presented on the poster?
    http://www.greenupcountyhealth.com |

    ReplyDelete
  12. You could post on the friendless of the blog owner. You may illustrate it's mesmerizing. Your blog feedback may add to your contacts.
    cureforyoutech.com |

    ReplyDelete
  13. I always spent my half an hour to read this blog’s articles everyday along with a cup of coffee.
    www.speedanycar.com |

    ReplyDelete
  14. Consider having online contests as a method of the Facebook marketing and advertising plan. Offer cash incentives or discounts in your users if they like the page. Constantly actually send out the winning prize or you’ll damage
    Buy Bulk Food Online |

    ReplyDelete
  15. You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. 
    www.pwautosales.com |

    ReplyDelete
  16. I enjoy what you guys are usually up too. This type of clever work and exposure! Keep up the amazing works guys I’ve incorporated you guys to my personal blogroll.
    http://www.boulder-vision-care.com |

    ReplyDelete
  17. Your blog is really nice. If I may share some insight, traffic studies on blogs show most people read blogs on Mondays. So it should encourage blogger to write new updates over the weekend primarily.

    ReplyDelete
  18. With football we always have exciting games such as head soccer and head soccer unblocked and soccer heads and head soccer 2 or big head basketball big head soccer or head soccer will bring to everyone the good entertainment Best. After work you can play with Big Head Football and Big Head Soccer or Head Soccer to reduce the pressure of work. With big head basketball

    ReplyDelete
  19. for beginners like me need a lot of reading and searching for information on various blogs. and articles that you share a very nice and inspires me

    ReplyDelete
  20. Find all government exam schedule updated on www.findsarkarijobs.com.

    NDA Exam Schedule 2018
    CDS Exam Notification 2018

    ReplyDelete
  21. This is a very good article material and it is very useful for us all. thank you . cara menggugurkan kandungan

    ReplyDelete
  22. I was very impressed by this post, this site has always been pleasant news. Thank you very much for such an interesting post. Keep working, great job! In my free time, I like play game: douchebagworkout2.org. What about you?

    ReplyDelete
  23. Thanks for sharing the information. It is very useful for my future. keep sharing

    potaup.com

    ReplyDelete

Note:- Comment as: Option available to post without login select "Anonymous" from the drop down...........

For Latest Updates: Subscribe Now | | Test Your Knowledge, Take a Quiz now Click Here | | Site Best Viewed In Firefox

X