1

I tried to mount an external storage device (a usb flash drive) with overlay (as the lowerdir the usb and as upper a temporary ramdisk)

mkdir /data mkdir /data/lower mkdir /data/rw mkdir /data/root 

Then creating the ramdisk

mount -t tmpfs none /data/rw mkdir /data/rw/upper mkdir /data/rw/work 

I mounted the usb device

mount -t vfat /dev/sdb1 /data/lower 

To finally use overlay :

mount -t overlay -o lowerdir=/data/lower,upperdir=/data/rw/upper,workdi=/data/rw/work none /data/root 

Which give me the folowwing error

wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error

overlayfs: filesystem on '/data/lower' not supported

But according to the documentation

The lower filesystem can be any filesystem supported by Linux and does not need to be writable

Is there a link with automount and if so how I can fix it ?

1
  • 1
    I suspect that the documentation is lying and doesn't support any filesystem as written. Of course replacing vfat with ext4 works. Couldn't find something to confirm this (looking at sources would probably, but too much effort) Commented Apr 30, 2019 at 13:56

2 Answers 2

4

It took some digging, but the overlay filesystem driver considers certain dentry flags "weird" (via ovl_dentry_weird) and refuses to mount in the associated directories. Common cause is case-folding filesystems -- these will always be flagged as weird.

1
  • any file system as long as its not FAT Commented May 18, 2024 at 20:57
1

It's a pretty long list of wierd filesystems he listed that have case-insensitive (casefold) filenames that are prohibited from working with OverlayFS. Really, some of the most common ones:

adfs affs cifs efivarfs vfat hfs hfsplus hpfs isofs jfs xfs(*) ext4(**) 

In my case, all I was trying to do was overlay a read-only ISO-9660 mount to patch the contents and burn a new ISO, but because this is one of the case-insensitive file systems, I can't do just that!

Really, there should be a behavior (or a flag) that if there is a case-insensitive filesystem in the OverlayFS mount, the resulting mount will be assembled and managed as if all the constituent filesystems and the resulting file system is case-insensitive. Calling all of these weird file systems instead and disallowing the mount is just, well, weird.

1

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.