[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Remounting tmpfs
Re: Remounting tmpfs
Wed, 17 Apr 2019 04:11:51 +0900
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3
On 4/10/19 12:24 AM, address@hidden wrote:
> On 4/9/19 11:58 PM, Ludovic Courtès wrote:
>> address@hidden skribis:
>>> On a system I'm porting to guix I have 2GB tmpfs with subdirectories
>>> like /tmpfs/etc that I remount to /etc with an overlay filesystem.
>>> The current way I do this in systemd is making a service dependency
>>> between the /tmpfs and /etc mounts that mkdirs /tmpfs/etc and
>>> /tmpfs/etc_work, but AFAICT filesystem definitions in guix can only have
>>> filesystem dependencies.
>>> Are there any other ways I can do this without copying/pasting/modifying
>>> gobs of core guix code into my system definition? Like somehow
>>> appending (mkdir /tmpfs/etc) onto the tmpfs filesystem service start
>>> procedure or something.
>> In Guix /etc is mostly populated by “activation programs”, which are
>> generated from your config. So I’m not sure what you describe would
>> make much sense.
> So if /etc can be read-only and boot I'm probably fine... my experience
> with other distros was that some other processes needed to write to it.
> Ex: modifying resolv.conf.
>> Now, you could try to add a file system declaration that mounts /etc,
>> with (needed-for-boot? #t).
> My goal is to have a read-only / mount with the ability for programs to
> make temporary modifications for operational purposes when necessary, in
> limited scopes (like /etc). Can you elaborate on what you're suggesting
> here? Mounting something other than the overlayfs on /etc would hide
> the system config files. I might be able to use another mount to create
> a pseudo- /tmpfs/etc_work subdirectory but it sounds kind of wormy and
> overlayfs requires the upper dir and workdir to be the same filesystem
> which I think precludes doing any mounting for those subdirectories.
> Thanks for the suggestions!
So I think the short answer I was looking for is that
1. guix already does something like this - it mounts root read only and
overlays a tempfs on top (it's still writable though somehow)
2. guix has a complicated mounting process that isn't amenable to
changes like this
Since my question about disk-image gets into the root filesystem tree
I'll move this discussion there entirely.