On Wed, Jan 3, 2024 at 1:57 AM Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > On Tue, Jan 2, 2024 at 12:16 PM shanthosh krishna moorthy > <santy.accet@xxxxxxxxx> wrote: > > > > Hi, > > > > Is the Linux support for mounting overlay file system over another > > overlayfs lowerdir still supported? > > In kernel 4.1, this seems supported but not in 4.19 and above. > > > > //Create lower directoy on an overlayfs mount > > root@device2:/# mkdir /lower /upper /work /merged > > > > So /upper and /work are also on overlayfs? > Even if it did work, I think that some operations may have > unexpected results (creating opaque directory). > > > //User the 'lower' directory as lowerdir in overlayfs mount > > root@device2:/# mount -t overlay overlay -o > > lowerdir=/lower,upperdir=/upper,workdir=/work /merged > > mount: /merged: wrong fs type, bad option, bad superblock on overlay, > > missing codepage or helper program, or other error. > > > > root@device2:/# mount > > ... > > /dev/mmcblk0p9 on /overlay type ext4 (rw,noatime,nodelalloc,data=journal) > > overlayfs:/overlay on / type overlay > > (rw,noatime,lowerdir=/,upperdir=/overlay/bank_1,workdir=/overlay/work) > > ... > > root@device2:/# > > > > Could someone please shed some light on this error. > > The specific reason is to be found in the kernel log. > It may indicate that some configs or mount options could help. > > Please check the difference in CONFIG_OVERLAY_FS* values in > the two kernels you are comparing. > > Thanks, > Amir. Please find the dmesg log when the mount fails: overlayfs: filesystem on '/upper' not supported as upperdir //Linux 4.19 kernel config CONFIG_OVERLAY_FS=y # CONFIG_OVERLAY_FS_REDIRECT_DIR is not set CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y # CONFIG_OVERLAY_FS_INDEX is not set # CONFIG_OVERLAY_FS_XINO_AUTO is not set # CONFIG_OVERLAY_FS_METACOPY is not set //Linux 4.1 kernel config CONFIG_OVERLAY_FS=y This seems related to the updates done as part of https://github.com/torvalds/linux/commit/7c03b5d45b8eebf0111125053d8fe887cc262ba6 So, overlay over overlay is not a valid usecase that could be supported anymore? - Thanks, Shanthosh