Ubuntu12.0464bit install glusterfs3.3.0 to configure replica

Source: Internet
Author: User
Ubuntu12.0464bit install glusterfs3.3.0 to configure replica. two servers are required for the glusterreplicationserver. at the same time, the server must be the client server 110.10.10.10server210.10.10.11 and enter the sudo-s under server1root...
Ubuntu 12.04 64-bit installation of glusterfs 3.3.0 to configure replica requires two servers as the gluster replication server, add vim/etc/hosts server110.10.10.10.10.11 server2 cat/etc/hosts 127.0.0.1 localhost10.10.10.10 then to the sudo-s servers under the client server 1 root server2 # The following lines are desirable for IPv6 capable hosts:: 1 localhost ip6-localhost ip6-loopbackfe00: 0 ip6-localnetff00: 0 ip6-mcastprefixff02: 1 ip6-allnodesff02: 2 ip6-allroutersff02: 3 ip6-allhosts installation configuration Gluster http://download.gluster.org/pub/gluster/glusterfs/LATEST/Ubuntu/12.04/glusterfs_3.3.0-1_amd64.deb Apt-get install flex bison libssl-dev fuse-utils libevent-dev libreadline6-dev dpkg-I glusterfs_3.3.0-1_amd64.deb update-rc.d glusterd defaults/etc/init. d/glusterd start www.2cto.com after installation, run the following command in server1: glusterfs -- version glusterfs 3.3.0 built on Jun 4 2012 11: 39: 45 Repository revision: git: // Configure (c) 2006-2011 Gluster Inc. GlusterFS comes with absolutely no warranty. you may redistribute copies of GlusterFS under the terms of the GNU General Public License. gluster> peer probe server2Probe successful> peer statusNumber of Peers: 1 Hostname: server2Uuid: Peers: Peer in Cluster (Connected)> volume create filestore replica 2 server1:/data/disk01 server2: /data/disk01Creation of volume fil Estore has been successful. please start the volume to access data.> volume start filestoreStarting volume filestore has been volume> Volume info filestore volume Name: filestoreType: ReplicateStatus: StartedNumber of Bricks: 2Transport-type: tcpBricks: Brick1: server1:/data/volumes: server2: /data/disk01 www.2cto.com mkdir/srv/filestoremount-t glusterfs server2:/filestore/srv/filstore Then run mount or df-h to check whether mount/dev/mapper/server3-root on/type ext4 (rw, errors = remount-ro) is mounted) proc on/proc type proc (rw, noexec, nosuid, nodev) sysfs on/sys type sysfs (rw, noexec, nosuid, nodev) udev on/dev type devtmpfs (rw, mode = 0755) devpts on/dev/pts type devpts (rw, noexec, nosuid, gid = 5, mode = 0620) tmpfs on/run type tmpfs (rw, noexec, nosuid, size = 10%, mode = 0755)/dev/sdb1 on/data/disk01 type ext4 (rw )/ Dev/sda1 on/boot type ext2 (rw) server2:/filestore on/mnt/glusterfs type fuse. glusterfs (rw, allow_other, default_permissions, max_read = 131072) echo "server1:/filestore/srv/filestore glusterfs ULTS ults, _ netdev 0 0 ">/etc/fstab restart server shutdown-h now mounting server2:/filestore cd/srv/filestore/touch {1, 2, 3, 4} dd if =/dev/zero of = test01 bs = 1 M count = 10 dd if =/dev/zero of = test02 bs = 1 M count = 10 ls-l/ s Rv/filestore-rw-r -- 1 root 0 Oct 8 1-rw-r -- r -- 1 root 0 Oct 8 2-rw-r -- r -- 1 root 0 Oct 8 3-rw-r -- r -- 1 root 0 Oct 8 4-rw-r -- r -- 1 root 10485760 Oct 8 test01-rw-r -- r -- 1 root 10485760 Oct 8 test02 view on server1/data/ content in disk01 ls-l/data/disk01/-rw-r -- 1 root 0 Oct 8 1-rw-r -- r -- 1 root 0 Oct 8 2-rw-r -- r -- 1 root 0 Oct 8 3-rw-r -- r -- 1 root 0 Oct 8 4-rw-r -- r -- 1 root 10485760 Oct 8 test01-rw-r -- r -- 1 root 10485760 Oct 8 test02 View/data/disk01 content ls-l/data/disk01-rw-r -- 1 root 0 Oct 8 1-rw-r -- r -- 1 root 0 Oct 8 2-rw-r -- r -- 1 root 0 Oct 8 3-rw-r -- r -- 1 root 0 Oct 8 4-rw-r -- r -- 1 root 10485760 Oct 8 test01-rw-r -- r -- 1 root 10485760 Oct 8 test02 www.2cto.com if you want to configure distribute replication, you can add two more disks for replication. Gluster volume filestore add-brick server1:/data/disk02 server02:/data/disk02 gluster volume info filestore will become Volume Name: filestoreType: Distribute Replicate Status: StartedNumber of Bricks: 2 × 2Transport-type: tcpBricks: Brick1: server1:/data/disk01Brick2: server2:/data/disk01Brick3: server1:/data/disk02Brick4: server2: /data/disk02 data must be fixed-layout and migrate-data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.