this question comes from a place pretty remote from particular knowledge about docker, filesystems or data corruption. So in case it is silly or naive I might blame it on that aforementioned remoteness.
there are 2 different basic concepts for data storage (maybe even more but these 2 I am curious about here)
- docker volumes or data containers
- mounting a folder from the host into a container
Let’s say I store 100 files. From my host’s point if view these are 100 actual files (host folder mounted in container) or just 1 file (a data container/docker volume [containing 100 files seen from the containers perspective though]).
now I assume data corruption happens on filesystem level, so can you see it that the likeliness of a data container being corrupted (and practically causing the 100 files stored inside of it being lost) is as big as 1 single file being corrupted if stored in a hosts folder being mounted to a container?
Is that a too simplistic way to look at this or practically TRUE?
IF the above was TRUE … then I guess mounting a host’s folder into a container would be safer in this regards, wouldn’t it?