1

One should be able to combine multiple lower directories in an OverlayFS mount by using a colon to separate them according to this document.

enter image description here

However this fails for me. For example if I setup with:

mkdir /tmp/data 
mkdir -p /tmp/storage/1448918558
mkdir /tmp/storage/1448918559 
mkdir /tmp/storage/1448918560
mkdir /tmp/workdir

And then run

sudo mount -t overlay overlay -o \
lowerdir=/tmp/storage/1448918559:/tmp/storage/1448918558,\
upperdir=/tmp/storage/1448918560,\
workdir=/tmp/workdir \
/tmp/data

I get the error message:

mount: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error (for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program) In some cases useful info is found in syslog - try dmesg | tail or so

However, if I remove either of the lower directories so there is only one in the mount command, it succeeds.

Am I doing something wrong or perhaps this functionality is not yet in the 3.19.0-33-generic kernel in Ubuntu 14.04?

Programster
  • 5,871

1 Answers1

2

From what I've read on-line and tested, overlayFS was renamed to overlay for the "newer" system (with workdir) to avoid conflicts. So one can now have overlayfs and overlay. However Ubuntu appears to only have the newer "overlay" system, but only in kernel 4.0 and later supports having multiple lower directories, and ubuntu 14.04 is only on kernel 3.19.

I've tested that the example given in the question does work in Ubuntu server 15.10 with the 4.2.0-19-generic kernel.

Programster
  • 5,871