title: How to use multiple lower layers in overlayfs
body: <p>According <a href="https://www.kernel.org/doc/Documentation/filesystems/overlayfs.txt" rel="nofollow">this</a> document it should be possible to use multiple lower layers with overlayfs, but I can't get it to work on kernel 3.18.13. Am I using it wrong, or do I need a later kernel, and if so which one?</p>
  
  <p>this works:</p>
  
  <pre><code>&gt;&gt;&gt;mkdir lower1 lower2 upper workdir merged
  &gt;&gt;&gt;echo hello &gt; lower1/myfile
  &gt;&gt;&gt;sudo mount -t overlay overlay -olowerdir=lower1,upperdir=upper,workdir=workdir/ merged
  &gt;&gt;&gt;cat merged/myfile
  hello
  </code></pre>
  
  <p>example very similar to document:</p>
  
  <pre><code>&gt;&gt;&gt;sudo mount -t overlay overlay -olowerdir=lower1:lower2 merged
  mount: wrong fs type, bad option, bad superblock on overlay,
         missing codepage or helper program, or other error
  
         In some cases useful info is found in syslog - try
         dmesg | tail or so.
  &gt;&gt;&gt;dmesg | tail -n1
  [42131.327203] overlayfs: missing upperdir or lowerdir or workdir
  </code></pre>
  
  <p>ok, lets add them:</p>
  
  <pre><code>&gt;&gt;&gt;sudo mount -t overlay overlay -olowerdir=lower1:lower2,upperdir=upper,workdir=workdir/ merged
  mount: wrong fs type, bad option, bad superblock on overlay,
         missing codepage or helper program, or other error
  
         In some cases useful info is found in syslog - try
         dmesg | tail or so.
  &gt;&gt;&gt;dmesg | tail -n1
  [42155.052961] overlayfs: failed to resolve 'lower1:lower2': -2
  </code></pre>