2

I'm trying to mount rpc_pipefs with a nodev option. Initially, I tried doing this by editing the /etc/fstab file and adding an entry for it.

Tried:

sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,nodev,relatime 0 0

Also:

rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,nodev,relatime 0 0

Both failed to work. (no errors reported but the changes would not take after running mount -a or rebooting)

This is when I did more reading/research and discovered that the file was being mounted using systemd.

I can add the desired mount option by editing the /usr/lib/systemd/system/var-lib-nfs-rpc_pipefs.mount file and adding the following:

Options=nodev

When I run the following, the partition/fs is mounted with the nodev option. However, It does not survive a reboot.

[~] systemctl daemon-reload
[~] systemctl restart var-lib-nfs-rpc_pipefs.mount
[~] systemctl enable var-lib-nfs-rpc_pipefs.mount

Also tried appending the following to the mount file but it made no difference:

[Install]
WantedBy=local-fs.target

Environment:

[user@ip-10-0-0-0 ~]$ cat /etc/redhat-release
 CentOS Linux release 7.5.1804 (Core)
[user@ip-10-0-0-0 ~]$ uname -r
 3.10.0-862.14.4.el7.x86_64
[user@ip-10-0-0-0 ~]$

1 Answer 1

0

I can't comment yet so posting here. Can you post the output of systemctl status var-lib-nfs-rpc_pipefs.mount?

I just added the Option=nodev as advised here. I rebooted and can see the nodev option too.

[root@centoserv ~]# systemctl status var-lib-nfs-rpc_pipefs.mount
● var-lib-nfs-rpc_pipefs.mount - RPC Pipe File System
   Loaded: loaded (/usr/lib/systemd/system/var-lib-nfs-rpc_pipefs.mount; static; vendor preset: disabled)
   Active: active (mounted) since Sun 2018-11-04 23:29:31 IST; 2min 34s ago
    Where: /var/lib/nfs/rpc_pipefs
     What: sunrpc
  Process: 597 ExecMount=/bin/mount sunrpc /var/lib/nfs/rpc_pipefs -t rpc_pipefs -o nodev (code=exited, status=0/SUCCESS)

Nov 04 23:29:31 centoserv systemd[1]: Mounting RPC Pipe File System...
Nov 04 23:29:31 centoserv systemd[1]: Mounted RPC Pipe File System.
[root@centoserv ~]#
[root@centoserv ~]# mount|grep rpc
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,nodev,relatime)
[root@centoserv ~]#
[root@centoserv ~]# grep rpc /proc/mounts
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,nodev,relatime 0 0
1
  • 2
    The 'as advised here' link is behind a paywall. Any details on what actually need to be done?
    – Charlie
    Jan 18, 2022 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .