linux-unionfs mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>,
	Amir Goldstein <amir73il@gmail.com>,
	Christian Brauner <brauner@kernel.org>,
	Vivek Goyal <vgoyal@redhat.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-unionfs@vger.kernel.org,
	Luiz Angelo Daros de Luca <luizluca@gmail.com>
Subject: Can overlayfs follow mounts in lowerdir?
Date: Thu, 22 Feb 2024 07:19:00 +0100	[thread overview]
Message-ID: <67bb0571-a6e0-44ea-9ab6-91c267d0642f@gmail.com> (raw)

Hi,

I'm trying to use overlay to create temporary virtual root filesystem.
I need a copy of / with custom files on top of it.

To achieve that I used a simple mount like this:
mount -t overlay overlay -o lowerdir=/,upperdir=/tmp/ov/upper,workdir=/tmp/ov/work /tmp/ov/virtual

In /tmp/ov/virtual/ I can see my main filesystem and I can make temporary
changes to it. Almost perfect!

The problem are mounts. I have some standard ones:
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)

They are not visible in my virtual root:
# ls -l /tmp/ov/proc/
# ls -l /tmp/ov/sys/
# ls -l /tmp/ov/tmp/
(all empty)

Would that be possible to make overlayfs follow such mounts in lowerdir?

-- 
Rafał

             reply	other threads:[~2024-02-22  6:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22  6:19 Rafał Miłecki [this message]
2024-02-22  9:01 ` Can overlayfs follow mounts in lowerdir? Christian Brauner
2024-02-22 10:34   ` Rafał Miłecki
2024-02-22 10:38     ` Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67bb0571-a6e0-44ea-9ab6-91c267d0642f@gmail.com \
    --to=zajec5@gmail.com \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=luizluca@gmail.com \
    --cc=miklos@szeredi.hu \
    --cc=vgoyal@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).