O Gluster não replica conteúdo espelhado :
xfce4-terminal -T LocalTerm
sair
Em LocalTerm:
PS1='[\u@\h]-[\D{%T}]-[\W] => '
lxc profile copy default default-bkp
lxc profile set default raw.lxc lxc.apparmor.profile=unconfined
clear
lxc stop ubt1804X64C001
lxc stop ubt1804X64C002
lxc delete ubt1804X64C001
lxc delete ubt1804X64C002
lxc launch ubuntu:18.04 ubt1804X64C001
lxc launch ubuntu:18.04 ubt1804X64C002
clear
sleep 10
lxc list --format csv
lxc config get ubt1804X64C001 security.privileged
lxc config set ubt1804X64C001 security.privileged true
lxc config get ubt1804X64C002 security.privileged
lxc config set ubt1804X64C002 security.privileged true
lxc restart ubt1804X64C001
lxc restart ubt1804X64C002
xfce4-terminal -T ubt1804X64C001Term -e "bash -c 'lxc exec ubt1804X64C001 -- /bin/bash; exec bash; exit 0;'"
xfce4-terminal -T ubt1804X64C002Term -e "bash -c 'lxc exec ubt1804X64C002 -- /bin/bash; exec bash; exit 0;'"
Em ubt1804X64C001Term e ubt1804X64C002Term:
PS1='[\u@\h]-[\D{%T}]-[\W] => '
echo '' >> /etc/hosts
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get autoremove
apt-get install netcat net-tools
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
uname -a
Linux ubt1804X64C001 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/fstab
LABEL=cloudimg-rootfs / ext4 defaults 0 0
apt-get install attr fuse libaio1 liburcu-dev libxml2 python2.7 python-pip rpcbind
echo '' > ~/testAttr
setfattr -n user.name -v "UserNameValue" ~/testAttr
setfattr -n trusted.glusterfs.test -v "working" ~/testAttr
getfattr -d -m - ~/testAttr
trusted.glusterfs.test="working"
user.name="UserNameValue"
add-apt-repository ppa:gluster/glusterfs-4.1
apt-get update
OK
apt-get install glusterfs-server glusterfs-client open-iscsi watchdog
glusterfs --version | grep 'glusterfs '
glusterfs 4.1.5
mkdir -p /root/tomirrorwith/glusterfs
cd /root/tomirrorwith/glusterfs
ls
Em ubt1804X64C002Term:
ifconfig eth0 | grep 'inet '
20.30.40.50
echo '10.20.30.40 ubt1804X64C001' >> /etc/hosts
cat /etc/hostname
ping ubt1804X64C001
iptables -I INPUT -p all -s ubt1804X64C001 -j ACCEPT
Em ubt1804X64C001Term:
ifconfig eth0 | grep 'inet '
10.20.30.40
echo '20.30.40.50 ubt1804X64C002' >> /etc/hosts
cat /etc/hostname
ping ubt1804X64C002
iptables -I INPUT -p all -s ubt1804X64C002 -j ACCEPT
gluster peer probe ubt1804X64C002
peer probe: success
gluster peer status
Number of Peers: 1
Hostname: ubt1804X64C002
Port: 24007
State: Peer in Cluster (Connected)
gluster volume create gv0 replica 2 ubt1804X64C001:/root/tomirrorwith/glusterfs ubt1804X64C002:/root/tomirrorwith/glusterfs force
volume create: gv0: success: please start the volume to access data
gluster volume start gv0
volume start: gv0: success
echo 'TestValue' > TestFile
Em ubt1804X64C002Term:
cd /root/tomirrorwith/glusterfs
ls
# There is no TestFile created here on mirrored machine
O mesmo problema aqui: link