Questions tagged [overlayfs]

For questions concerning the Overlay Filesystem, which was included in Linux kernel 3.18.

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
1k views

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/...
5
votes
1answer
698 views

Mounting Overlayfs in a user namespace

Is it possible to mount an Overlayfs filesystem as an unprivileged user in a user namespace in Linux kernels >4.3.3; it seems that the fix to this vulnerability has blocked this functionality entirely....
5
votes
0answers
364 views

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 ...
4
votes
0answers
2k views

OverlayFS - How to make changes to upper filesystem persistent without unmounting?

I am using an USB drive to start a linux system which needs changes from time to time and also writes some logs. Flash drives tend to fail early if there are many write operations. That brought me to ...
4
votes
1answer
115 views

Stackable file system that works like a cache

I am looking for a stackable file system (Like UnionFS, aufs, and OverlayFS) that works similar to bcache or lvmcache but on file level - not on block level: Reads will be done from top-layer. If the ...
4
votes
1answer
3k views

using overlay2 on CentOS 7.4

How do I install and enable the overlay2 storage driver on CentOS 7? I have done many google searches on this and I see that version 7.4 is required. So I typed the following commands to confirm ...
3
votes
1answer
152 views

How to mount overlayfs where lower has child mounts?

I'm trying to setup an overlayfs for a chroot environment. The environment is made up from multiple read-only squashfs file systems (lower) and a single writable directory (upper). The tricky part ...
3
votes
0answers
113 views

Why does cache work better in overlay2 than aufs?

A follow-up from this question. After reading Docker Storage drivers from official doc I understood that overlay was faster than aufs because it had only one hard linked image layer. But for ...
3
votes
0answers
173 views

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 ...
2
votes
0answers
280 views

How to copy an overlay partition to a file, and how to mount such file?

I have a disk, with two partitions: # fdisk -l Disk /dev/mmcblk0: 7381 MB, 7381975040 bytes 4 heads, 16 sectors/track, 225280 cylinders Units = cylinders of 64 * 512 = 32768 bytes Device ...
2
votes
0answers
71 views

Is it possible to mount an overlay over / right after boot?

Background: I have an embedded system with both flash and SD storage. Currently I use flash just for booting (uBoot, kernel, initramfs). Root filesystem (/) is on SD (ext3 on /dev/mmcblk0p2). I (...
2
votes
0answers
147 views

Proper way to create “persistent” RAM fs

I'm going to reduce SSD writes, so I'd like to keep changes to some directories (like /var/log or browser cache) in memory and syncing to permanent storage periodically. I should reduce memory size as ...
2
votes
0answers
384 views

Fedora 25 Live Persistent Overlay Not Working

I have just created a fresh Fedora 25 Xfce 32-bit Live USB using the following command: livecd-iso-to-disk --noverify --reset-mbr --format --msdos \ --overlay-size-mb 1024 --home-size-mb 512 --...
2
votes
0answers
1k views

creating an overlay directly over a mount (systemd-fstab-generator causes error)

I would like to create an overlay over my /var directory. I am using debian/stretch with a recent kernel and install. systemd 232. I am using something along the lines of (all lines with an implied ...
2
votes
0answers
1k views

Is there anyway to modify one file and sync to the lower directory in OverlayFs?

I know about the overlayfs that it treats lower directory as a read-only and copy_up when we want to modify the lower file so is there any way to modify the lower file and it can copy the modified ...
1
vote
0answers
124 views

Mounting overlayfs with root patition stop working (for me)

I am trying to use rootfs as a lower point of new overlay mount point. Then I chroot to a new mount point and use it for test some packages and selflearning without harming real system. This was ...
1
vote
1answer
94 views

Proper way to backup an overlayfs

I'm using an overlayfs for different folders. Now I'm thinking about a backup and restore process. I didn't found anything via google, which answered my question. An overlayfs has an upper, lower, ...
1
vote
0answers
20 views

Mount order problem with systemd

Running Raspbian Buster. I have a loopback mount defined in fstab (bind option) where directory A is looped in as B. I have another service started later (with systemd After=local-fs.target) that ...
1
vote
0answers
315 views

Difficulty mounting NFS as a layer in Overlayfs - bash: Operation not supported

Synopsis I'm serving a NFS share from my local machine and, while mounting and accessing the share works as expected, when I attempt to reference the NFS as a lower directory in overlayfs, operations ...
1
vote
0answers
40 views

Is there any way around the length limitation in mount options?

Say I create a series of directories in the form "elem_###", where ### are the integers from 001 to 454, like so: $ dirs=$(seq -felem_%03.0f 454 | tr '\n' ' ') $ mkdir ${dirs} I then use these ...
1
vote
0answers
86 views

Mount overlay directory containing NFS shared mount

I have a directory /tmp/usr/usr. In this path I mount NFS share from an other machine: mount -t nfs IP:/export_path/usr /tmp/usr/usr The contents of the remote /usr is there. But when I try to ...
1
vote
0answers
471 views

“Structure needs cleaning” error with Overlay FS

When I run this command: mount -t overlay overlay -olowerdir=/some_lower_dir_0,upperdir=/some_upper_dir,workdir=/some_work_dir /some/overlay_dir Everything works fine. When I add more and more ...
1
vote
0answers
69 views

Why does rootless podman does not support overlfayfs mounts in non-ubuntu distributions?

In the rootless podman doc, it is stated that: Can not use overlayfs driver, but does support fuse-overlayfs Ubuntu supports non root overlay, but no other Linux distros do. So ...
1
vote
0answers
482 views

What are the consequences of specifying same directory overlay upper/workdir and merged?

I wanted to have a simple RO overlay of my root for use in my container, but for whatever reason it didn't work: $ sudo mount -t overlay overlay -o lowerdir=/ /var/lib/machines/test/ mount: /var/lib/...
1
vote
0answers
288 views

Why overlayfs increases boot time?

Recently, I started using overlay filesystem. I'm using initram script (init=/sbin/myint) as described in Raspberry blog - raspberry overlay, yet, I noticed that it increases boot time significantly (...
1
vote
1answer
820 views

Why mounting overlayfs with root as lowerdir produce an empty /proc in mergedir?

Here's the test case: #!/bin/bash more="$@" saved="$EUID" if [ "$EUID" = "0" ]; then echo "don't run as root" exit fi m="/tmp/mount-point" exec sudo unshare -m /bin/bash <<UNSHARED ...
1
vote
1answer
1k views

Why is my overlayfs command not working?

The commands below should be creating a root overlay, such that any modifications to root will appear in /tmp/upper However as you can see it does not appear to be working. Can anyone suggest what I ...
1
vote
0answers
361 views

How to reflect changes made to original LXC container on overlayFS snapshots?

In order to make updates easier and limit there size, I created a base LXC container, let's say c1, where i installed and configure a few default packages (using apt) which are common to all my ...
1
vote
0answers
94 views

Light file copy with diff

Is there a way to copy a file by creating another instance of it, that is not created as a hard copy, but by a link with the difference that any edit to that file will be saved in an diff file? I ...
1
vote
0answers
706 views

Using tar to backup and restore a path mounted with overlayfs

I have a system running OpenWRT with Linux 2.6.39.2. In my filesystem, I have symlinks contained in /etc/rc.d on ROM and more symlinks contained in /overlay/etc/rc.d in flash. overlayfs does a union ...
1
vote
0answers
335 views

overlayfs root filesystem, cannot read /etc/mtab

I'm doing the following: mkdir /tmp/upper /tmp/work mount -t overlay overlay -o lowerdir=/,upperdir=/tmp/upper,workdir=/tmp/work / ls -l /etc/mtab > lrwxrwxrwx 1 root root 19 27. Feb 09:16 /etc/...
0
votes
0answers
20 views

Why so many duplicated files of files in lowerdir occured in upperdir when using overlayfs without manual modification to them?

I installed new Fedora OS on SSD last year, my old HOME directory on HDD were leaved there until now. Recently, I want to combine the new HOME directory and old HOME directory into a merged HOME ...
0
votes
0answers
19 views

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'...
0
votes
0answers
32 views

OverlayFS - Is it possible to make overlay layer writable by anyone/specific user (different than original owner)?

Usecase: I have a lot of production data and copying it for dev purposes would be unreal. I was thinking that OverlayFS could be a solution until a problem with permissions arised. Let's assume i have ...
0
votes
0answers
41 views

Building a chroot with multiple upper dirs with overlayFS

I've got a simple chroot system, built using bind mounts. It resides in /opt/chroot.skel and it's built on Alpine. Whenever I create a new user, I copy the files from /opt/chroot.skel, to a /opt/...
0
votes
0answers
51 views

How do I merge directories (read-only) using overlayfs?

I'm using overlayfs to merge three directories together as follows: mount -t overlay overlay -o lowerdir=/dir1:/dir2:/dir3 /targetdir This works partially according to my expectations. Some files ...
0
votes
0answers
7 views

Union mount filesystem with directed sources

I want to mount two filesystems, one a shared network filesystem and one a local filesystem. I want the network filesystem to be the home for most of the files. I want to have a list of files and ...
0
votes
0answers
9 views

Backing a directory using overlayFS

Is there a way to use overlayFS as backing operation? I want to minimise data copy hence looking for different approaches. rsync is good option for backing data. I was also going through LVM ...
0
votes
0answers
23 views

Switch lowerdir mount on overlayfs and remove NFS during ramdisk?

I'm using an NFS as the lowerdir of my overlayfs which is mounted at / and I'm attempting to sync it to the local disk /dev/sda1 but after the boot up is complete the NFS is still mounted and I'm not ...
0
votes
0answers
69 views

How to make a bwrap + overlayfs + big rootfs scalable in terms of number of users?

Currently we have a setup on a build server where we have a rootfs image readable by all users (this image is generated by debootstrap and contains a minimal debian install with additional packages ...
0
votes
0answers
43 views

overlay-fs and editing upper directory with vim

For developing purposes, I am using the overlay-fs to merge custom changes to the base file structure. The merged-folder is used by a java application. Now I experienced a strange behavior when using ...
0
votes
1answer
116 views

mount overlay upperdir under lowerdir?

I'm new to mounts and overlayfs. Is it possible to put upperdir under lowerdir? e.g. volumes: app: driver: local driver_opts: type: overlay o: lowerdir=${PWD},upperdir=${PWD}/...
0
votes
0answers
60 views

Overlay File System

Does the overlay file system always copy data when metadata of a file within the lower layer is changed? Is it possible to stack multiple lower layers?
0
votes
0answers
33 views

How do I mount an overlay with dmsetup?

Simple question but I couldn’t find the answer : I’ve an ext4 filesystem stored inside a squashfs volume (so read‑only) and an existing dm_snapshot_cow file for providing write access. What’s the ...
0
votes
0answers
1k views

Overlay : filesystem not supported on lowerdir

I tried to mount an external storage device (a usb flash drive) with overlay (as the lowerdir the usb and as upper a temporary ramdisk) mkdir /data mkdir /data/lower mkdir /data/rw mkdir /data/root ...
0
votes
2answers
640 views

Which file should I modify to mount a user overlay at boot time

I'm working on an embedded device with an arm cortex A9. The kernel version is 4.16.0 and is generated by buildroot 2018.05. The storage memory is an mmc with several partition. U-boot reads the ...