From: Scott Mayhew <smayhew@redhat.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: Anthony Rossomano <trossoma2@gmail.com>, linux-nfs@vger.kernel.org
Subject: Re: Path for rpc_pipefs
Date: Wed, 4 Jun 2025 18:43:09 -0400 [thread overview]
Message-ID: <aEDL_b0XyH-abQty@aion> (raw)
In-Reply-To: <5e3f1c5595e266bcb91e0e6db0b308feae6497fc.camel@kernel.org>
On Wed, 04 Jun 2025, Jeff Layton wrote:
> On Tue, 2025-06-03 at 15:38 -0700, Anthony Rossomano wrote:
> > I wanted to get some input about changing the path to rpc_pipefs mount point. Can this be done and how to do it. The mount unit provided by nfs-utils pkg is cfg’d with path to /var/lib/nfs/rpc_pipefs but you can change the path for dependent services in /etc/nfs.conf. Can a new mount unit be created to change the mount path? Env is Alma 8. Having trouble because mount point is created early and need to remount /var elsewhere later, and need to deal with the rpc_pipefs mount point. Changes to systemd dependencies are not panning out. Thanks in advance for any input
>
> Most of the daemons that work with rpc_pipefs take a command-line
> parameter to change where the rpc_pipefs mountpoint is. Adding matching
> config options to nfs.conf would probably not be too difficult.
>
> I suggest pulling down the nfs-utils tree [1], and look at how the
> nfs.conf handling is done. Find the places where the rpc_pipefs
> directory path is set and have them check the config file for the
> default and fall back to the compile-time default if it's not set.
>
> FWIW, it looks like blkmapd already has a config file parameter for
> this, so mirroring that for the other daemons is probably what you want
> to aim for.
That shouldn't be necessary. All of the daemons should be looking for
the "pipefs-directory" configuration in the "general" stanza of nfs.conf
(rpc.gssd will also look under the "gssd" stanza but it should bark at
you if you specify it there).
/usr/lib/systemd/system-generators/rpc-pipefs-generator will create
override units for rpc_pipefs.target and *-rpc_pipefs.mount (located in
/run/systemd/generator) whenever you specify a value that differs from
the default. None of the systemd units should be depending directly on
the *-rpc_pipefs.mount unit. Instead, they should be depending on
rpc_pipefs.target.
So it should just be a matter of changing the value in nfs.conf and
rebooting. (If you don't want to reboot, then you can get the generator
to trigger by running 'systemctl daemon-reload', but then you still need
to stop the dependent services, stop the old *-rpc_pipefs.mount,
start the new *-rpc_pipefs.mount, and start the dependent services.)
For example:
root@fedora:~# grep rpc_pipefs /proc/mounts
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
root@fedora:~# nfsconf --get general pipefs-directory
/var/lib/nfs/rpc_pipefs
root@fedora:~# nfsconf --set general pipefs-directory /run/rpc_pipefs
root@fedora:~# nfsconf --get general pipefs-directory
/run/rpc_pipefs
root@fedora:~# reboot
root@fedora:~# Read from remote host fedora: Connection reset by peer
Connection to fedora closed.
client_loop: send disconnect: Broken pipe
scott@aion:~$ ssh root@fedora
root@fedora:~# grep rpc_pipefs /proc/mounts
sunrpc /run/rpc_pipefs rpc_pipefs rw,relatime 0 0
root@fedora:~# systemctl status rpc_pipefs.target
● rpc_pipefs.target
Loaded: loaded (/run/systemd/generator/rpc_pipefs.target; generated)
Active: active since Wed 2025-06-04 18:34:44 EDT; 14s ago
Invocation: 2c43c6c9694f4a0381cfebb38015e46f
Jun 04 18:34:44 fedora.smayhew.test systemd[1]: Reached target rpc_pipefs.target.
root@fedora:~# systemctl list-dependencies --after rpc_pipefs.target
rpc_pipefs.target
● └─run-rpc_pipefs.mount
root@fedora:~# systemctl status run-rpc_pipefs.mount
● run-rpc_pipefs.mount - RPC Pipe File System
Loaded: loaded (/run/systemd/generator/run-rpc_pipefs.mount; generated)
Active: active (mounted) since Wed 2025-06-04 18:34:44 EDT; 51s ago
Invocation: 22d6bdec88c848479e4eb475eb191a53
Where: /run/rpc_pipefs
What: sunrpc
Tasks: 0 (limit: 4641)
Memory: 16K (peak: 1.3M)
CPU: 2ms
CGroup: /system.slice/run-rpc_pipefs.mount
Jun 04 18:34:44 fedora.smayhew.test systemd[1]: Mounting run-rpc_pipefs.mount - RPC Pipe File System...
Jun 04 18:34:44 fedora.smayhew.test systemd[1]: Mounted run-rpc_pipefs.mount - RPC Pipe File System.
>
> [1]: git://git.linux-nfs.org/projects/steved/nfs-utils.git
> --
> Jeff Layton <jlayton@kernel.org>
>
prev parent reply other threads:[~2025-06-04 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-03 22:38 Path for rpc_pipefs Anthony Rossomano
2025-06-04 14:13 ` Jeff Layton
2025-06-04 22:43 ` Scott Mayhew [this message]
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=aEDL_b0XyH-abQty@aion \
--to=smayhew@redhat.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trossoma2@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.