Hi All.
I currently have gluster in containers.
I run the containers:
docker run --privileged=true --restart=always -v /data:/data:rw /data2:/data2:rw --net=host --name=nodeX -d gluster:3.9.1
I create a 3 node replica.
gluster peer probe node1
gluster peer probe node2
volume create containers replica 2 node1:/data node2:/data force
volume start containers
volume set containers auth.allow 127.0.0.1
Then I mount this volume inside the container:
mount.glusterfs 127.0.0.1:/containers /data2
When I create a file in /data2 I see it inside the container but not on the host.
My docker systemd unit config is:
/usr/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target firewalld.service
[Service]
Type=notify
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
[Install]
WantedBy=multi-user.target
/etc/systemd/system/docker.service.d/docker.conf
[Service]
MountFlags=
MountFlags=shared
ExecStart=
ExecStart=/usr/bin/dockerd
–label name=nodeX
–label env=dev
–storage-driver=devicemapper
–storage-opt dm.thinpooldev=/dev/mapper/rootvg-dockervol
–storage-opt dm.basesize=20G
–storage-opt dm.use_deferred_deletion=true
–storage-opt dm.use_deferred_removal=true
–storage-opt dm.min_free_space=20%%
so I have MountFlags set to shared
Is something more needed so that mounts will propagate from the container to the host?
BR,
Rafal.