I want to create a ansible role that creates some bindfs-mounts and map those to a bunch of users.
Now those users can change. And this is why I cannot check, whether the mount already exists and then use bindfs - I have to do that all the time, as the mount might be existing, but with the wrong user mapping.
So basically, everytime the playbook runs, the bindfs-command is being fired. Additionally, I cannot extract the current mapping from the mount-overview.
So my question is: Given the fact that userA is uploading a laaaaarge file to the mounted directory and in this moment the bindfs-command is fired again, can this cause data corruption?
The command basically is nothing fancy and looks like this:
bindfs -o nonempty --map=userA/userB /var/foo/bar /mnt/foo/bar
One option, which I thought of at the moment, was to create a passwd-file, as bindfs offers to use --map-passwd. If the file changes, I can register a variable and only in this case I would remount.
But still: In this event, would I risk corrupt data?
Thanks for your help.
umountthe previous mount first? Are you stacking mounts there without limit?