Questions tagged [overlayfs]

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

Filter by
Sorted by
Tagged with
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 ...
1
vote
1answer
16 views

How to use overlay mount to combine multiple directories with different sub directories?

I have downloaded several git repositories arranged in different source trees: repoDirs1 (with child dirs including vendor) repoDirs2 (with child dirs including vendor) specialRepos1 specialRepos2 ...
0
votes
0answers
43 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
8 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 ...
1
vote
0answers
127 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
95 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, ...
0
votes
0answers
70 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
46 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 ...
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 ...
1
vote
0answers
21 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
333 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 ...
0
votes
1answer
123 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}/...
1
vote
0answers
43 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
1answer
139 views

change UID and GID file attributes on read only file system with mount [duplicate]

I have some file image of filesystem, and I want mount it with parameter changing files and directories UID and GID. I cannot change its parameters, because it is read-only filesystem. I found some ...
1
vote
1answer
188 views

LXC Container with Overlayfs/Squashfs

We are using a Centos LXC container with the rootfs contained in a squashfs filesystem. I really like the fact that a user cannot edit the rootfs from the host. During the development, developers ...
0
votes
2answers
660 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 ...
1
vote
1answer
146 views

Which (if any) union filesystems allow you to mount them without an underlying filesystem?

I am considering using a union filesystem, such as aufs, UnionFS or OverlayFS. I have a 138GB of Android source, to which I want to make minor changes and keep them under version control. My plan is ...
0
votes
0answers
61 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?
2
votes
1answer
116 views

How to escape comma on mount options for overlay

To mount overlay it is given lowerdir, upperdir and workdir as options on mount(8) or data on mount(2), what logic is applied in order to escape commas? I have tried double commas and even quoting ...
3
votes
1answer
154 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
118 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 ...
1
vote
0answers
87 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 ...
2
votes
0answers
285 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 ...
1
vote
0answers
483 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 ...
2
votes
0answers
73 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
1answer
368 views

How can I use OverlayFS to “combine” multiple storage into one? Is this possible?

I've been looking into using OverlayFS. I'd like to be able to combine a bunch of already formatted, already containing data, hard drives. All hard drives are formatted with ext4. The goal is to ...
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 ...
1
vote
1answer
400 views

Overlayfs over archivemount

I am trying to apply an overlay using overlayfs over a filesystem mounted with archivemount: mkdir -p {upper,work,mount} tar zcf somefile upper/ work/ mount/ mkdir tmp archivemount -o allow_root -o ...
0
votes
2answers
232 views

Overlayfs inside archivemount

I am trying to mount an overlayfs inside an archivemount (as a follow-up to Layered or Virtual filesystem on Linux). I am doing this: mkdir -p {upper,work,mount} tar zcf somefile upper/ work/ mount/ ...
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 (...
0
votes
1answer
225 views

(user error) OverlayFS - files deleted in current merged dir (mountpoint) reappear when merged dir remounted as lower

On Debian Stretch (running as root) this the current behaviour: # Create base directory mkdir base touch base/example # Create merge, upper and work directories for 2 layers mkdir layer1 layer1....
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 ...
1
vote
1answer
112 views

Apache does not see files under overlay mount

have mounted overlay fs: overlay on /srv/www/site type overlay (rw,relatime,lowerdir=/srv/www/site_orig,upperdir=/srv/www/site_custom,workdir=/srv/www/overlay_workdir) I can see and edit files under ...
3
votes
2answers
3k views

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 ...
3
votes
1answer
3k views

Mount root as overlayfs

I've been trying mount root (/) as overlayfs. OS is booting over NFS to RAM. I've added a premount script in initrd, which creates the 'work', 'upper' and 'lower' directories. During the boot ...
2
votes
1answer
1k views

Can not mount overlayfs inside initrd

I am trying to use read-only overlayfs(no workdir and upperdir) inside custom initrd. This works fine in completely booted OS: mkdir /tmp/ovl1 /tmp/ovl2 /tmp/merged mount -t overlay none -o lowerdir=...
0
votes
1answer
759 views

OverlayFS over read only rootfs fail

I need to keep one system as much intact as possible. Only soldering of HW stuff is allowed :-). I need to install a test software package and this package must not stay there in the future. I have a ...
9
votes
4answers
6k views

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 (...
1
vote
2answers
155 views

Does overlayfs redirect opened files automatically on the fly?

or I should close file - then mount overlay - and then re-open file again? i.e. #!/bin/bash my_background_process >log.txt & ... pkill my_background_process mount overlay my_background_process ...
20
votes
2answers
8k views

Unionfs vs Aufs vs Overlayfs vs mhddfs, which one do I use

I have randomly been reading about union file system which enables a user to mount multiple filesystems on top of one another simultaneously. However, am finding trouble deciding on which one to use(...
3
votes
2answers
1k views

Why can't /proc be a layer of a overlay file system (overlayfs) on linux?

Run the following commands on linux (4.4.59 and 4.9.8 are tested) and it will fail: mkdir -p /tmp/proc mount -t overlay overlay -o lowerdir=/proc:/tmp/proc /tmp/proc and there is a error message in ...
2
votes
0answers
148 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 ...
1
vote
1answer
561 views

Limit the size of tmpfs with overlayroot

Recently I found out that it's possible to use overlayroot with tmpfs to create stateless readonly root. However I couldn't find any info about limiting the size of tmpfs. Is it possible?