Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Disallow overlay/overlay2 on top of NFS #35483
- Description for the changelog
* Disallow running overlay and overlay2 on top of NFS, as it is not supported by overlayfs [moby/moby#35483](https://github.com/moby/moby/pull/35483)
- A picture of a cute animal (not mandatory but encouraged)
Nov 13, 2017
Another option (possibly as a follow-up) would be to reverse the list; and only allow running on backing-filesystems that we know to work; other filesystems will error-out, but we can add a
SSHFS and HDFS are fuse based, we can't really detect those specifically. We would have to switch to a whitelist approach and imo that is too opinionated. NFS is a common setup so users can easily walk into it and expect it to work, not sure anyone expects the same over FUSE or SMB.
Ah, thanks for that information; I'd not be against doing that check. If possible through feature detection (instead of just comparing kernel versions); perhaps it should be in a follow up.
ping @amir73il any suggestions on how to detect if overlay is supported on NFS?
There is a lot of confusion and inaccurate statements in this thread. Quite understandable with the current state of overlayfs documentation. I'll try to add clarity.
@kazh000 the mentioned article has nothing to do with supporting an NFS mount as upper layer for overlayfs. It is WIP, not anywhere near mainline, to support exporting an overlayfs mount by NFS server.
@mistyhacks the reason that network backed file systems and FUSE are not supported as upper layer is because those file systems can invalidate VFS cache entries (when files are changed remotely) and overlayfs doesn't like things to change under its feet. Incidently, overlayfs doesn't like it when remote file systems change files remotely even when those are used as lower layer, but lower layer files are not supposed to be change at all, while overlay is moutned.
@thaJeztah the text you quoted in the bug from overlayfs.txt has mislead you. Overlayfs will throw a warning to dmesg complaining if d_type is not supported ("overlayfs: upper fs needs to support d_type.").