[systemd-devel] Is there a way to override the "Where" option in mount units?
NeilBrown
neilb at suse.com
Wed Nov 1 11:15:52 UTC 2017
On Wed, Nov 01 2017, Lennart Poettering wrote:
> On Di, 31.10.17 11:19, Dennis Jacobfeuerborn (dennisml at conversis.de) wrote:
>
>> Hi,
>> I'm trying to set up a redundant nfs server but the problem I'm
>> currently running into is that I need to move the
>> /var/lib/nfs/rpc_pipefs mountpoint outside of /var/lib/nfs.
>
> Hmm, rpc_pipefs is a virtual API fs, right? If so, it really shouldn't
> be mounted below /var in the first place. Any chance you can work with
> the NFS folks to maybe move it below /run (or /sys or so) where API
> file systems really belong? Otherwise everybody who wants to run /var
> on FNS will run into the same problems sooner or later.
>
> Neil, maybe you could comment on this? Thanks!
What good timing.. nfs-utils-2.2.1 was just released yesterday.
It contains
http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=3892174834ea1a4729348f0ecd3078cc1d5458e4
If you have a file /etc/nfs.conf which contains
[general]
pipefs-directory = /run/nfs/rpc-pipefs
then a generator will create the required .mount unit, and all
tools and daemons will know where to look for the filesystem.
NeilBrown
>
>> The original mountpoint is handled by
>> /usr/lib/systemd/system/var-lib-nfs-rpc_pipefs.mount which comes as part
>> of the nfs-utils RPM.
>> So my initial naive idea was to create a drop-in in /etc/systemd/system
>> and override the "Where" option but that's when I learned that this
>> option cannot differ from the mount unit filename.
>
> Yeah, something like that isn't really supported. However, you could
> make it a bind mount, and first mount rpc_pipefs to /run somewhere,
> and the just bind mount it over to /var/lib later?
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171101/cbf25ffc/attachment.sig>
More information about the systemd-devel
mailing list