Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@master-serveur:~# dd if=/dev/zero of=/home/glusterfs-loop bs=10M count=100
- root@slave-server:~# dd if=/dev/zero of=/home/glusterfs-loop bs=10M count=100
- root@master-serveur:~# mkfs.ext4 -L glusterfs-brick /home/glusterfs-loop
- root@slave-server:~# mkfs.ext4 -L glusterfs-brick /home/glusterfs-loop
- root@master-serveur:~# mkdir /home/glusterfs-brick
- root@slave-server:~# mkdir /home/glusterfs-brick
- root@master-serveur:~# mount -o loop /home/glusterfs-loop /home/glusterfs-brick
- root@slave-server:~# mount -o loop /home/glusterfs-loop /home/glusterfs-brick
- root@master-serveur:~# apt-get install -y glusterfs-server
- root@slave-server:~# apt-get install -y glusterfs-server
- root@master-serveur:~# gluster peer probe slave-server
- peer probe: success.
- root@slave-server:~# gluster peer probe master-serveur
- peer probe: success.
- root@master-serveur:~# ssh-keygen
- root@master-serveur:~# ssh-copy-id root@slave-server
- root@master-serveur:~# ssh root@slave-server whoami
- root
- root@master-serveur:~# gluster system:: execute gsec_create
- Common secret pub file present at /var/lib/glusterd/geo-replication/common_secret.pem.pub
- root@slave-server:~# gluster system:: execute gsec_create
- Common secret pub file present at /var/lib/glusterd/geo-replication/common_secret.pem.pub
- root@master-serveur:~# mkdir /home/glusterfs-brick/pool
- root@slave-server:~# mkdir /home/glusterfs-brick/pool
- root@master-serveur:~# gluster volume create gv-master0 master-serveur:/home/glusterfs-brick/pool
- volume create: gv-master0: success: please start the volume to access data
- root@slave-server:~# gluster volume create gv-slave0 slave-server:/home/glusterfs-brick/pool
- volume create: gv-slave0: success: please start the volume to access data
- root@master-serveur:~# gluster volume info
- Volume Name: gv-master0
- Type: Distribute
- Volume ID: fa88b9a1-eb47-4b08-8e45-d0825508b053
- Status: Created
- Snapshot Count: 0
- Number of Bricks: 1
- Transport-type: tcp
- Bricks:
- Brick1: master-serveur:/home/glusterfs-brick/pool
- Options Reconfigured:
- transport.address-family: inet
- performance.readdir-ahead: on
- nfs.disable: on
- Volume Name: gv-slave0
- Type: Distribute
- Volume ID: 593fe0fa-ebf0-4e44-bdc0-baf262cf06e7
- Status: Created
- Snapshot Count: 0
- Number of Bricks: 1
- Transport-type: tcp
- Bricks:
- Brick1: slave-server:/home/glusterfs-brick/pool
- Options Reconfigured:
- transport.address-family: inet
- performance.readdir-ahead: on
- nfs.disable: on
- root@slave-server:~# gluster volume info
- Volume Name: gv-master0
- Type: Distribute
- Volume ID: fa88b9a1-eb47-4b08-8e45-d0825508b053
- Status: Created
- Snapshot Count: 0
- Number of Bricks: 1
- Transport-type: tcp
- Bricks:
- Brick1: master-serveur:/home/glusterfs-brick/pool
- Options Reconfigured:
- transport.address-family: inet
- performance.readdir-ahead: on
- nfs.disable: on
- Volume Name: gv-slave0
- Type: Distribute
- Volume ID: 593fe0fa-ebf0-4e44-bdc0-baf262cf06e7
- Status: Created
- Snapshot Count: 0
- Number of Bricks: 1
- Transport-type: tcp
- Bricks:
- Brick1: slave-server:/home/glusterfs-brick/pool
- Options Reconfigured:
- transport.address-family: inet
- performance.readdir-ahead: on
- nfs.disable: on
- root@master-serveur:~# gluster volume start gv-master0
- volume start: gv-master0: success
- root@slave-server:~# gluster volume start gv-slave0
- volume start: gv-slave0: success
- root@master-serveur:~# mkdir /home/glusterfs-data
- root@slave-server:~# mkdir /home/glusterfs-data
- root@master-serveur:~# mount -t glusterfs master-serveur:gv-master0 /home/glusterfs-data
- root@slave-server:~# mount -t glusterfs master-serveur:gv-slave0 /home/glusterfs-data
- root@master-serveur:~# groupadd --system geogroup
- root@master-serveur:~# useradd --system --no-create-home --gid geogroup geouser
- root@master-serveur:~# mkdir /home/mountbroker-root
- root@master-serveur:~# chown root.root /home/mountbroker-root
- root@master-serveur:~# chmod 0711 /home/mountbroker-root
- root@slave-server:~# groupadd --system geogroup
- root@slave-server:~# useradd --system --no-create-home --gid geogroup geouser
- root@slave-server:~# mkdir /home/mountbroker-root
- root@slave-server:~# chown root.root /home/mountbroker-root
- root@slave-server:~# chmod 0711 /home/mountbroker-root
- root@slave-server:~# gluster system:: execute mountbroker opt mountbroker-root /home/mountbroker-root
- Command executed successfully.
- root@slave-server:~# gluster system:: execute mountbroker opt geo-replication-log-group geogroup
- Command executed successfully.
- root@slave-server:~# gluster system:: execute mountbroker opt rpc-auth-allow-insecure on
- Command executed successfully.
- root@slave-server:~# gluster system:: execute mountbroker user geouser slavevol
- Command executed successfully.
- root@master-serveur:~# systemctl restart glusterfs-server
- root@slave-server:~# systemctl restart glusterfs-server
- root@master-serveur:~# gluster --version
- glusterfs 3.8.8 built on Jan 11 2017 14:07:11
- Repository revision: git://git.gluster.com/glusterfs.git
- Copyright (c) 2006-2011 Gluster Inc. <http://www.gluster.com>
- GlusterFS comes with ABSOLUTELY NO WARRANTY.
- You may redistribute copies of GlusterFS under the terms of the GNU General Public License.
- root@slave-server:~# gluster --version
- glusterfs 3.8.8 built on Jan 11 2017 14:07:11
- Repository revision: git://git.gluster.com/glusterfs.git
- Copyright (c) 2006-2011 Gluster Inc. <http://www.gluster.com>
- GlusterFS comes with ABSOLUTELY NO WARRANTY.
- You may redistribute copies of GlusterFS under the terms of the GNU General Public License.
- root@master-serveur:~# gluster --version | head -1 | cut -f2 -d ' '
- 3.8.8
- root@slave-server:~# gluster --version | head -1 | cut -f2 -d ' '
- 3.8.8
- root@master-serveur:~# tail -n0 -f /var/log/glusterfs/etc-glusterfs-glusterd.vol.log &
- root@master-serveur:~# gluster volume geo-replication gv-master0 root@slave-server:gv-slave0 create push-pem
- [2017-12-10 22:03:59.194805] E [MSGID: 106316] [glusterd-geo-rep.c:2745:glusterd_verify_slave] 0-management: Not a valid slave
- [2017-12-10 22:03:59.195012] E [MSGID: 106316] [glusterd-geo-rep.c:3133:glusterd_op_stage_gsync_create] 0-management: slave-server:gv-slave0 is not a valid slave volume. Error: Gluster version mismatch between master and slave.
- [2017-12-10 22:03:59.195074] E [MSGID: 106301] [glusterd-syncop.c:1297:gd_stage_op_phase] 0-management: Staging of operation 'Volume Geo-replication Create' failed on localhost : Gluster version mismatch between master and slave.
- Gluster version mismatch between master and slave.
- geo-replication command failed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement