Questions tagged [union-mount]

A union mount creates an overlay of several filesystems on one mount point

A union mount is a way to merge multiple filesystems into a single directory tree. The files from all the filesystems appear under the same mount point; a policy defines what happens in case of a conflict (same path present in different branches of the union mount) and where files are written to.

23 questions
19
votes
4 answers

Merge changes to upper filesystem to lower filesystem in Linux Overlay (OverlayFS) mount

I would like to be able to merge changes from the upper filesystem of an overlay mount to a lower filesystem. I am interested both online (i.e. merge while the overlay is mounted) and offline (unmount the overlay and then merge) solutions. I have…
ejm
  • 521
  • 1
  • 4
  • 6
15
votes
1 answer

Union mount on Linux

A union mount presents a combined view of multiple directories (branches) in a single hierarchy. Ok, but how do I use one in practice, and which one? Many union mount technologies are available on a modern Linux system: OverlayFS, aufs, UnionFS,…
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
9
votes
4 answers

Mount /var/logs as tmpfs, with help of overlayfs to save changes sometimes

Instead of just mounting tmpfs on /var/log I want to use overlayfs. /var/log are writable tmpfs, but containing files were there before tmpfs mount. This old files are not in memory of tmpfs but in lower layer. only changes are stored in tmpfs,…
LeonidMew
  • 250
  • 2
  • 12
7
votes
3 answers

Mount directory onto root

I have a folder containing certain files. Is there a way to mount it onto /, so that the contents of a given directory appear in the corresponding locations in /? In my case, the directories contain the files related to an application -- it does not…
user48923
6
votes
1 answer

Union mount options in Fedora

I've grown up a Debian/Ubuntu guy and I'm learning Fedora by trying to recreate the services my Ubuntu trusty box currently provides. However, I'm trying to recreate a union mount and don't see any obvious way to do it. Each user on my Ubuntu-based…
Rob D.
  • 61
  • 3
6
votes
1 answer

Can I use a read-write root filesystem disk image as an OverlayFS upperdir?

Is it possible to union-mount an existing disk image containing a root filesystem to the upperdir of an overlayfs mount for read-write access? I'm trying to union-mount some old disk images to a /tmp/ directory on an Ubuntu 16.04 machine using…
codewithmichael
  • 426
  • 2
  • 6
5
votes
0 answers

OverlayFS: Is mounting /foo/lower:/foo/upper to /foo safe?

Consider the following union mount: mount -t overlay -o lowerdir=/.pre-foo/lower,upperdir=/.pre-foo/upper,workdir=/.pre-foo/work overlay /foo I would like to obfuscate that /.pre-foo to minimize the chance of some process to modify my underlying…
3
votes
1 answer

overlay-filesystem that can differentiate between metadata and file content?

AFAIK with aufs when a file is touched (ie. only it's metadata changed, not it's contents), then the copy-on-write mechanism of the file system will copy the whole file into the r/w layer, essentially duplicating the file. Say, I only want to change…
Udo G
  • 1,123
  • 3
  • 12
  • 27
3
votes
1 answer

SquashFS+UnionFS as root filesystem?

What's an easy way to to use a union filesystem (read-only SquashFS + R/W overlay) as /? I'm thinking of using a custom boot script as the kernel init= argument. The script would mount the SquashFS + overlay, then chroot into the mounted filesystem…
Anul
  • 175
  • 2
  • 9
2
votes
0 answers

Using unionfs or similar as root file system in Linux?

After building Linux From Scratch several times I realized that package management is really a hard thing to do. After thinking for some time, I came across an idea. My idea is to install all packages into separate directories, then combine them…
2
votes
2 answers

How to use loopback to access the lower files of a unionfs, in FreeBSD?

From man mount_unionfs: If a file exists in the upper layer then there is no way to access a file with the same name in the lower layer. If necessary, a combination of loopback and union mounts can be made which will still allow the lower files to…
Stilez
  • 1,221
  • 14
  • 28
2
votes
1 answer

How can I create an union merging / and another directory, on / itself?

Say, we initially have / with the following contents: /bin/foo /usr/bin/bar /usr/lib/libfoo.so We also have another directory, say /stuff, with the contents: usr/lib/mystuff/mystuff.so etc/foo/qux/buzz bin/stuff Is there a way to create a union…
user48923
2
votes
1 answer

Making aufs union mounts read-write

So I've got two systems, lucyvanpelt and schroeder. lucyvanpelt's /home is exported read-write to schroeder via NFS. Its location on schroeder is /mnt/home/lucyvanpelt I want to union-mount it with schroeder's home, so I do as follows: mount -t aufs…
Steely Dan
  • 121
  • 1
1
vote
0 answers

How to appropriately set spindown (Power Management) when using SnapRaid?

I run openmediavault 4.1 and changed from RAID6 to SnapRaid with 7 hard drives for data plus parity. I remember reading installation advice on RAID setup that said "never set spindown for HDD" while using autoshutdown. So I was running fine for some…
bomben
  • 417
  • 5
  • 18
1
vote
0 answers

Does remounting after changes to overlayfs underlying filesystem (UB) necessarily restore consistency?

The overlayfs documentation states that "if the underlying filesystem is changed, the behavior of the overlay is undefined, though it will not result in a crash or deadlock." And, indeed, I've observed that when I make changes to the lowerdir in an…
RobertR
  • 127
  • 4
1
2