An simplified load balance cluster scene: 2 CentOS7 with GlusterFS to share some configuration files(Replicate type),and mount the Gluster filesystem to each node(eg. /mnt/gluster/); then I used mount --bind command to link the *.conf file from glusterfs mount point to my application dir(eg. /my/app/).
I modify the conf file in /my/app/ dir, it could spread the modification correctly to each node in the cluster. But once I modified files in such as /mnt/gluster/example.conf
, the mount point of this file(like /my/app/example.conf
) would turn to unreachable status. Looks like:
[root@gluster1 mount]#ll
ls: cannot access 1: No such file or directory
total 0
-????????? ? ? ? ? ? example.conf
[root@gluster1 mount]#mv example.conf example.bak
mv: cannot move ‘example.conf’ to ‘example.bak’: Device or resource busy
My question:
If the original file can be modified when we using 'mount --bind' to it?
Why the file turn to a ghost file? (No such file or directory or Device or resource busy).