How do I add an overlayfs to /etc/fstab?
On Ubuntu v14.04, I have a drive mounted at /mnt/log-overlay
that I would like to mount over the top of /var/log
.
The following mount command successfully creates that overlay, and works fine:
mount -t overlayfs -o lowerdir=/var/log,upperdir=/mnt/log-overlay overlayfs /var/log
What do I need to add to /etc/fstab
to make sure this overlay mounts at boot?
LABEL=cloudimg-rootfs / ext4 defaults,discard 0 0
/dev/xvde /mnt/log-overlay auto defaults,nobootwait,comment=cloudconfig 0 2
[what-goes-here?]
From the figure-it-out-as-you-post-the-question department.
The following /etc/fstab
entry successfully mounts /mnt/log-overlay
on top of /var/log
at boot:
overlayfs /var/log overlayfs defaults,lowerdir=/var/log,upperdir=/mnt/log-overlay,comment=cloudconfig 0 2
Previous fstab
entries:
LABEL=cloudimg-rootfs / ext4 defaults,discard 0 0
/dev/xvde /mnt/log-overlay auto defaults,nobootwait,comment=cloudconfig 0 2