Re: Path for rpc_pipefs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> 






[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux