A deeply annoying discovery I made today: if you have an #rclone mount that needs to be restarted, any running #docker writing to that mount is now writing to your filesystem without warning. I get that if the mount is gone, of course it has to write to the local filesystem. But when the mount comes back, it continues writing to the local filesystem, but if you change into the mounted directory, ls will show the contents of the mount, not the contents of the local filesystem that docker is busy writing to, and you will have no idea what black hole your files are falling into, because /mnt/offsite shows it's mounted, your docker agrees that it's writing to /mnt/offsite, and yet the files are nowhere to be found when you go to /mnt/offsite! They only suddenly appear when you umount the directory.
in reply to 🇨🇦Samuel Proulx🇨🇦

I’m not sure this is a docker issue. /mnt isn’t that special, it’s just a directory where you, by convention, make other directories to mount stuff. Your OS handles that, not docker.

When you unmount something, /mnt/whatever doesn’t cease to exist, it’s just acting like a regular directory. You can write to it just fine. You can even then mount something else to the same directory, hiding its local contents.

Think of it like a door into your back yard that you can attach a tube slide to, connected to a storage unit. You throw stuff through the door, it goes to the storage unit. You disconnect the tube, it goes into your back yard. You connect the tube again, you can’t get to your back yard.

in reply to MostlyBlindGamer

@MostlyBlindGamer Yeah, I know. However, there are multiple failures here. First, rclone should not have let me mount to /mnt/offsite when docker had written files there. The standard mount command only allows mounting to an empty directory. Second, once the file system was mounted, Docker shouldn’t continue writing to the now invisible local file system. I do understand that if a mount fails, during the period the mount is unavailable, files will be written to the local filesystem. It’s what happens when the directory is remounted that’s the problem. Either the mount must fail, and/or docker needs to write to the newly mounted directory, not keep writing locally even though the mount now exists.
⇧