Questions tagged [overlayfs]

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

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

Can overlayFS support more than two layers?

As far as i read documentation the overlayFS supports two layers - upper and lower. But is there possibility to increase it to three layers?
0
votes
1answer
2k views

mounting /var as overlayfs

I'm running a read only filesystem on a raspberry pi so far everything works fine until i tried to mount /var as overlayfs for nginx and other services to work using this: VAROVRL="-o lowerdir=/var,...
6
votes
1answer
2k views

OverlayFS Seamlessly Edit File in Lower Directory

I'm trying to set up a PXEboot environment in which the base system (served over NFS to the PXE clients) is read only, and the root filesystem is an overlayfs filesystem with the read-only NFS base ...
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 ...
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 ...
2
votes
1answer
2k views

Docker and OverlayFS

I'm trying to learn about docker and the overlayFS, as suggest by the official website, I installed the last kernel: 4.8.11-1.el7.elrepo.x86_64 and as suggest by them to ensure that overlay is good ...
46
votes
2answers
15k views

Linux Filesystem Overlay - what is workdir used for? (OverlayFS)

OverlayFS has a workdir option, beside two other directories lowerdir and upperdir, which needs to be an empty directory. Unfortunately the kernel documentation of overlayfs does not talk much about ...
9
votes
2answers
17k views

How to use OverlayFS to protect the root filesystem?

How do I correctly use OverlayFS to protect my root filesystem? I have an embedded system that boots and runs from an SD card. Since it will experience sudden power loss, I want to protect the root ...
2
votes
1answer
650 views

linux - OOM / swap not being used

I am getting Out of Memory errors while my swap isn't touched. I have 4GB of ram and 4GB of swap space. I enabled the swap via swapon and when doing free, I see the swap listed there. I'm thinking ...
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
1answer
220 views

Mount unionfs (or aufs) branches fed from stdin?

Is it possible to feed the branch paths from stdin to the mount (or mount_unionfs) command, instead of supplying them as arguments or from a file? cat ~/dirs_with_photos.txt | mount -t unionfs I don'...
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/...
2
votes
1answer
4k views

How can I delete changes from an overlay fs?

I have an embedded device running BusyBox, there are a number of directories mounted with overlayfs with work and data directories mounted on separate UBI partitions using the following style of ...
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 ...
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....
2
votes
2answers
2k views

what occupy space at overlayfs

I have a linux with a read only root filesystem and a read-write overlayfs mounted over it: # mount overlayfs on / type overlayfs (rw,relatime,lowerdir=/root_ro/,upperdir=/root_rw/) ... The ...
2
votes
1answer
319 views

Mount a large squashfs in a way that allows random writes (to a separate filesystem)?

I just received a few-dozen-gigabyte squashfs that contains a PostgreSQL database. In order to be able to conveniently query it, I need to have a write access, which makes it complicated. Is there a ...
4
votes
1answer
3k views

Merge two NFS shares with OverlayFS

I have two directories (a and b), which are NFS shares with files foo.txt and bar.txt: I want merge this two directories to directory merge (does not have to be writable) this is possible by command:...
5
votes
2answers
11k views

overlayfs: missing 'workdir' on CloneZilla start

I would clone my partition /dev/sda1 on Ubuntu 14.04. I've downloaded Clonezilla in order to clone this partition and be able to reinstall it later. As recommended on the CloneZilla's website, I used ...
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 ...
9
votes
1answer
3k views

How to modify a lower file through an OverlayFS directory?

I want Linux's OverlayFS to behave like AUFS when writing to a lower file. I want it to write through to the lower directory. For example, I have two files named L/lower and U/upper. mount -t ...
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 ...
3
votes
2answers
5k views

OverlayFS doesn't work with unprivileged user namespace

OverlayFS mount works weird when accessed from within the unprivileged user namespace. Best to be explained in example: ~# uname -a Linux host 4.1.0-1-amd64 #1 SMP Debian 4.1.3-1 (2015-08-03) x86_64 ...
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 ...
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 ...
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 ...
3
votes
1answer
931 views

overlayfs with a lot of directories

Say I have an arbitrary number of directories, labeled by numbers. I also have the directory merge. I can do mount -t overlay -olowerdir=1:2:50 overlay merge to get the contents of 1, 2, and 50 in ...
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/...
5
votes
1answer
167 views

tail -f produces no output in Ubuntu live CD

For some test I start Ubuntu Live from USB. I'm trying to use tail command to show debug log, but it doesn't work. I also test opening two terminals (t1, t2) with this code: t1: touch a t2: ...
4
votes
1answer
585 views

How to backup (make a copy of) LiveCD changes?

Many LiveCD distributions (for example Lubuntu 12.10 I use) allow making changes, for example updating timezone, logging in to Google Chrome, updating and installing additional packages such as ...
8
votes
2answers
4k views

Querying an overlayfs

I'm looking for a way to query a mounted overlay filesystem (overlayfs) in order to check it's upper and lower directory, but until now I haven't found any suitable command for that. Is there is a way ...

1
2