I have 2 data sources. One is btrfs (raid) and one is a simple ext4 partition. Those should be transparently displayed as one. This is a simple read only example, but the lower/upper/workdir version produces the same problem, with btrfs as upper and ext4 as lower.

manual mount:

mount -t overlay overlay -o lowerdir=/mnt/raid/folder1/:/mnt/ext4/folder1 -o comment=merge  -o nfs_export=on /data/merged

fstab mount:

overlay /data/merged overlay defaults,lowerdir=/mnt/raid/folder1/:/mnt/ext4/folder1,comment=merge,nfs_export=on 0 0

this is my nfs export:


exportfs -ra produces: exportfs: /data/merged does not support NFS export

My configuration: Ubuntu 18.04 LTS with HWE kernel 4.18.0-13-generic This is my main source for the config: https://www.kernel.org/doc/Documentation/filesystems/overlayfs.txt

Maybe I am missing some NFSv4 stuff (which is needed for nfs exporting an overlayfs) ?

edit: as requested, my mounts for the sourcecs:

UUID=d138b8fa-83e1-4df7-80dc-c1ed7d866f77       /mnt/raid       btrfs   defaults        0       2
UUID=6bb8f391-0872-40cf-8aff-8bdb32632098       /mnt/ext4        ext4    errors=remount-ro 0 2


grep -H . /sys/module/overlay/parameters/*
  • What kernel do you run? The message indicates that NFS exports are not supported with your kernel yet. – Thomas Jan 20 '19 at 8:45
  • @Thomas uname -a = "4.18.0-13-generic #14~18.04.1-Ubuntu SMP Thu Dec 6 14:09:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux" how can I find out if the kernel supports it? The feature is "availble" since 4.16 – wuppi Jan 20 '19 at 11:37
  • That kernel version should support it. You may want to add the kernel version and the output of grep -H . /sys/module/overlay/parameters/* to your question. – Thomas Jan 20 '19 at 12:18
  • result /sys/module/overlay/parameters/nfs_export:N --- so no support? – wuppi Jan 20 '19 at 12:22
  • 1
    @BrianTheLion the comment option is an fstab feature: man7.org/linux/man-pages/man5/fstab.5.html – wuppi Nov 6 '19 at 8:18

From kernel.org and from dmesg while trying to reproduce the error you also have to specify

  • -o index=on
  • -o index=on -o redirect_dir=nofollow when there is no upperdir

Your mount command then should be as follows.

mount -t overlay overlay -o lowerdir=/mnt/raid/folder1/:/mnt/ext4/folder1 -o comment=merge -o nfs_export=on -o index=on -o redirect_dir=nofollow /data/merged

The output of


shows the default of the mountoption and verifies that it is actually available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.