Skip to content

Failure to create directory with GlusterFS 4.1 #21

@djschaap

Description

@djschaap

I tried the current master branch (aeecbb6) on a simple Docker host with GlusterFS 4.1. It appears to be working EXCEPT when a non-existent subdirectory is specified. Did something change between GlusterFS 3.x and 4.1?

Volume persistence WORKS with a bare Gluster volume:

docker run -it --rm --volume-driver gluster1 -v gfs1:/data alpine

df /data
Filesystem           1K-blocks      Used Available Use% Mounted on
srv1:gfs1        14624768   2320512  12304256  16% /data

Using a subdir is SILENTLY BROKEN - all appears well until the container terminates and your "persistent" data is vaporized:

docker run -it --rm --volume-driver gluster1 -v gfs1/dir1:/data alpine

Evidence of a problem can be seen in "df" output: it returns an unexpected device (the filesystem of /var/lib/docker) instead of the GlusterFS device:

df /data
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg1-lv_docker
                     314394636    403180 313991456   0% /data

Specifying a subdir WORKS if it has already been created within the GlusterFS volume:

docker run -it --rm --volume-driver gluster1 -v gfs1/n:/data alpine

df /data
Filesystem           1K-blocks      Used Available Use% Mounted on
srv1:gfs1/n      14624768   2320512  12304256  16% /data

Install/version info

For this testing, the Docker host served as one of the two peers in the GlusterFS cluster.

docker plugin install --alias gluster1   trajano/glusterfs-volume-plugin \
  --grant-all-permissions --disable
docker plugin set gluster1 SERVERS=srv1,srv2
docker plugin enable gluster1

rpm -qa centos-release centos-release-gluster41 docker-ce glusterfs | sort
centos-release-7-6.1810.2.el7.centos.x86_64
centos-release-gluster41-1.0-3.el7.centos.noarch
docker-ce-18.09.6-3.el7.x86_64
glusterfs-4.1.8-1.el7.x86_64

sudo gluster volume list
gfs1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions