linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* overlayfs - vaild to mount mergedir over lowerdir?
@ 2025-10-30 17:25 Mark Corbin
  2025-10-30 17:54 ` Amir Goldstein
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Corbin @ 2025-10-30 17:25 UTC (permalink / raw)
  To: linux-unionfs

Hello

Is it valid/safe to mount an overlayfs mergedir over the lowerdir?

The Yocto/OE mount-copybind script does exactly that:

overlay on /srv type overlay
(rw,relatime,lowerdir=/srv,upperdir=/var/volatile/srv,workdir=/var/vola
tile/.srv-work)

I wanted to do something similar with a read-only /etc where the
merged /etc is mounted on /etc, e.g.
mount -v -t overlay overlay -o
lowerdir=/etc,upperdir=/data/etc,workdir=/data/etc-work /etc

Any issues or recommendations?

Thanks

Mark
-- 

Mark Corbin
Senior Software Engineer  |  lunarenergy.com  |  LinkedIn  |  Instagram

-- 
C2:Restricted unless otherwise stated.

-- 








Lunar Energy Limited is a company registered in England and Wales, 
authorised and regulated by the Financial Conduct Authority under reference 
number 767876. Company registration number: 05631091. Registered office: 55 
Baker Street, London, England, W1U 7EU

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: overlayfs - vaild to mount mergedir over lowerdir?
  2025-10-30 17:25 overlayfs - vaild to mount mergedir over lowerdir? Mark Corbin
@ 2025-10-30 17:54 ` Amir Goldstein
  2025-10-31 14:29   ` Mark Corbin
  0 siblings, 1 reply; 3+ messages in thread
From: Amir Goldstein @ 2025-10-30 17:54 UTC (permalink / raw)
  To: Mark Corbin; +Cc: linux-unionfs

On Thu, Oct 30, 2025 at 6:26 PM Mark Corbin <mcorbin@lunarenergy.com> wrote:
>
> Hello
>
> Is it valid/safe to mount an overlayfs mergedir over the lowerdir?
>
> The Yocto/OE mount-copybind script does exactly that:
>
> overlay on /srv type overlay
> (rw,relatime,lowerdir=/srv,upperdir=/var/volatile/srv,workdir=/var/vola
> tile/.srv-work)
>
> I wanted to do something similar with a read-only /etc where the
> merged /etc is mounted on /etc, e.g.
> mount -v -t overlay overlay -o
> lowerdir=/etc,upperdir=/data/etc,workdir=/data/etc-work /etc
>
> Any issues or recommendations?

None that I can think of.
Overlayfs has no problem with that.
It gets a reference to the lowerdir object at mount time *before*
attaching itself to the mount point and that's it.

Thanks,
Amir.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: overlayfs - vaild to mount mergedir over lowerdir?
  2025-10-30 17:54 ` Amir Goldstein
@ 2025-10-31 14:29   ` Mark Corbin
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Corbin @ 2025-10-31 14:29 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: linux-unionfs

On Thu, 30 Oct 2025 at 17:54, Amir Goldstein <amir73il@gmail.com> wrote:
>
> On Thu, Oct 30, 2025 at 6:26 PM Mark Corbin <mcorbin@lunarenergy.com> wrote:
> >
> > Hello
> >
> > Is it valid/safe to mount an overlayfs mergedir over the lowerdir?
> >
> > The Yocto/OE mount-copybind script does exactly that:
> >
> > overlay on /srv type overlay
> > (rw,relatime,lowerdir=/srv,upperdir=/var/volatile/srv,workdir=/var/vola
> > tile/.srv-work)
> >
> > I wanted to do something similar with a read-only /etc where the
> > merged /etc is mounted on /etc, e.g.
> > mount -v -t overlay overlay -o
> > lowerdir=/etc,upperdir=/data/etc,workdir=/data/etc-work /etc
> >
> > Any issues or recommendations?
>
> None that I can think of.
> Overlayfs has no problem with that.
> It gets a reference to the lowerdir object at mount time *before*
> attaching itself to the mount point and that's it.
>
> Thanks,
> Amir.

Thanks Amir.

-- 

Mark Corbin
Senior Software Engineer  |  lunarenergy.com  |  LinkedIn  |  Instagram

-- 
C2:Restricted unless otherwise stated.

-- 








Lunar Energy Limited is a company registered in England and Wales, 
authorised and regulated by the Financial Conduct Authority under reference 
number 767876. Company registration number: 05631091. Registered office: 55 
Baker Street, London, England, W1U 7EU

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-31 14:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30 17:25 overlayfs - vaild to mount mergedir over lowerdir? Mark Corbin
2025-10-30 17:54 ` Amir Goldstein
2025-10-31 14:29   ` Mark Corbin

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 NNTP newsgroup(s).