LWN: Comments on "Debating overlayfs" https://lwn.net/Articles/447650/ This is a special feed containing comments posted to the individual LWN article titled "Debating overlayfs". en-us Sat, 04 Oct 2025 09:32:25 +0000 Sat, 04 Oct 2025 09:32:25 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Debating overlayfs https://lwn.net/Articles/509329/ https://lwn.net/Articles/509329/ bluss <div class="FormattedComment"> (this is happening with btrfs now, it's called "seed device")<br> </div> Thu, 02 Aug 2012 11:26:52 +0000 Shared inodes https://lwn.net/Articles/483799/ https://lwn.net/Articles/483799/ scientes <div class="FormattedComment"> What about vhashify <a href="http://linux-vserver.org/util-vserver:Vhashify">http://linux-vserver.org/util-vserver:Vhashify</a> ?<br> IOW hard-links on steroids.<br> Now, making this work in full-virtualization environments is not exactly the same problem....and certainly can't be as elegant.<br> </div> Sat, 25 Feb 2012 03:18:36 +0000 Debating overlayfs https://lwn.net/Articles/448806/ https://lwn.net/Articles/448806/ rilder <div class="FormattedComment"> How does this compare to aufs{1,2} which have been in actual use by distros over the past few years. <br> <p> Looks like the developer made an effort here to get it into tree -- <a href="http://thread.gmane.org/gmane.linux.file-systems/29813">http://thread.gmane.org/gmane.linux.file-systems/29813</a> , not sure where the discussion proceeded.<br> <p> </div> Wed, 22 Jun 2011 18:24:44 +0000 Debating overlayfs https://lwn.net/Articles/448545/ https://lwn.net/Articles/448545/ nikanth <div class="FormattedComment"> Anyway, the writable filesystem on top is not usable by itself. The data on writable disk is meaningful only on top of read-only disk(fs).<br> <p> Wouldn't it be better, if COW file-systems like btrfs can provide a feature to write new blocks only to writable disk, instead of going for generalized solutions. Btrfs would need a way to check for the root of the tree(superblock) in the new disk, before using the one from read-only disk.<br> <p> </div> Tue, 21 Jun 2011 09:51:53 +0000 Shared inodes https://lwn.net/Articles/448382/ https://lwn.net/Articles/448382/ neilbrown <div class="FormattedComment"> Shared subtrees are certainly part of the solution - and an important part.<br> <p> If the Linux/Unix file hierarchy had been design with sufficient foresight (which would have been total impractical in reality) then you probably could do it all with shared subtrees. Those files that might need to be configure per-machine or per-instance would be in one subtree (a bit like /var maybe) and all the other files would be elsewhere. The one subtree would be copied for each instance, the rest would be shared.<br> <p> But we don't have such a forward looking design .. and it is entirely possible that differing needs are such that such a design would be impossible. So configuration files are often mixed in with non-configuration files. A solution is needed which makes copies of the first type, but shares the second type.<br> <p> One could imagine a forest-of-symlinks which could map all 'configuration' files into one subtree, but symlinks don't always (ever?) provide perfect semantics. If you update a config file by writing a new copy then renaming it, you break the symlink.<br> <p> You could do the symlinks in the other direction: with symlinks for all the files that you want to share, but that would have it's own problems I suspect.<br> <p> So overlayfs complements shared subtrees and allows you to selectively have some files shared and some files private within the same directory. And it achieved this almost transparently.<br> <p> <p> </div> Sun, 19 Jun 2011 23:43:54 +0000 Shared inodes https://lwn.net/Articles/448380/ https://lwn.net/Articles/448380/ Sho Don't <a href="http://lwn.net/Articles/159077/">shared subtrees</a> get you a long part of the way, too? Sun, 19 Jun 2011 22:58:02 +0000 Shared inodes https://lwn.net/Articles/448133/ https://lwn.net/Articles/448133/ martinfick <div class="FormattedComment"> <font class="QuotedText">&gt; Assuming I am understanding you correctly.</font><br> <p> So with overlayfs, if I have 1000 containers each with their own upper layer mounted separately on top of the same lower layer, and each one of them runs the same copy of apache, will the linux MM system share most of the memory for those apache executables, as much as if they all ran off of the same file in the lower layer directly?<br> <p> If so, this will be a major boon for "virtualisation" on linux, extremely memory efficient and lightweight containers. This would allow linux containers in the mainline to share some of the ideas and similar benefits to the linux vserver project's "unification".<br> <p> </div> Fri, 17 Jun 2011 16:14:45 +0000 Shared inodes https://lwn.net/Articles/448071/ https://lwn.net/Articles/448071/ neilbrown <div class="FormattedComment"> You are in luck - overlayfs provides exactly what you want. Assuming I am understanding you correctly.<br> <p> When you access (e.g. open) a file (not a directory) in a read-only mode which doesn't exist in the upper layer, you get exactly the file from the lower layer. If you fstat the file descriptor it will look exactly like the lower-layer file - st_dev, st_ino and all. It really is the lower-level file.<br> <p> So much so that if someone else opens the file for 'write', it will get copied into the upper layer and they will get a handle on the file in the upper layer which they can then change, but you will still have a handle on the lower level file which, of course, will not see those changes.<br> </div> Fri, 17 Jun 2011 06:38:47 +0000 Shared inodes https://lwn.net/Articles/448037/ https://lwn.net/Articles/448037/ ndye <blockquote> <i> Of course, I am not sure how that could actually be done... :( </i> </blockquote> <p> Neither do I, and you paint the benefits well . . . </p> <p> . . . but now your headache has gone viral. <br/> ;-) </p> Thu, 16 Jun 2011 21:46:55 +0000 Shared inodes https://lwn.net/Articles/448017/ https://lwn.net/Articles/448017/ martinfick <div class="FormattedComment"> What we really need from a union type filesystem is for identical inodes in the bottom layer, to somehow show up as the same inode with respect to the memory management subsystem, no matter where they appear in upper layers. This needs to happen even if these show up in different top layer mount points to be truly beneficial. This would be a huge boon for sharing memory amongst processes in separate containers which run the same underlying executable. The containers could share a readonly bottom layer and yet have individual writable top layers in their individual namespaces, preventing them from clobbering the other container's files while still sharing memory efficiently on common executables. Of course, I am not sure how that could actually be done... :(<br> <p> </div> Thu, 16 Jun 2011 19:44:10 +0000