Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've come across one of those aufs to overlayfs migration headaches. With aufs you could specify multiple RO-layers and updating some files in them was refreshed with remount.

fstab with aufs:

aufs    /etc                       aufs    noauto,br:/rw-root/etc=rw:/ro-root/etc=ro:/etc=rr  0 0

Same functionality with overlayfs:

none    /.tmp-root/etc              overlayfs  noauto,upperdir=/ro-root/etc,lowerdir=/etc      0 0 
none    /etc                       overlayfs  noauto,upperdir=/rw-root/etc,lowerdir=/.tmp-root/etc  0 0 

Mounting the system in order is fine and everything works. The problem arises when I need to update something on the ro-root partition. Running remount on that sees /etc as the already mounted overlayfs and not the original ro-root. (Solved the striked-out problem with mount --bind)

Apparently the problem is with inode numbers of the files. So editing of a file works fine, but if I copy a new file over the old one on the lower level, the change is not propagated. So this could be a real overlayfs problem.

I'd really like this setup to continue working (restructuring everything is quite a lot of work and testing that I'd rather avoid, because this affects +50 virtualmachines). That being said, I will also accept answers that would accomplish moving readonly-root after initrd-stage safely to go around this problem and if that's not possible then suggestion most minimalistic way of changing/modifying/creating initrd to accomplish this move.

There's another related question, but it's the simpler form of just two layers. Simple overlayfs reload question

share|improve this question

have you tried running remount on /.tmp-reoot/etc first and then remount on /etc


 mount -o remount /.tmp-reoot/etc

 mount -o remount /etc
share|improve this answer
Yes, I've tried. Either something is failing in overlayfs (which I doubt in this case) or the problem is caused by circular mount reference. (In one mount /etc is the lowest dir and in the other the mount target => circular) – Manwe May 29 '12 at 11:46
Okay.. the problem is not the circular reference, but changes inode. I'll edit the question. – Manwe May 30 '12 at 7:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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