public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [nfs-utils] "blkmapd open pipe file /run/rpc_pipefs/nfs/blocklayout failed" and handling of nfs-blkmap.service service
@ 2026-01-11 14:17 Salvatore Bonaccorso
  2026-01-14  6:36 ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Salvatore Bonaccorso @ 2026-01-11 14:17 UTC (permalink / raw)
  To: linux-nfs, Scott Mayhew, Steve Dickson

Hi all,

This is triggered by an older bugreport in Debian found at
https://bugs.debian.org/1009106 . 

In Debian we ship packages with nfs-blkmap.service installed and
enabled via the nfs-common package to be used on NFS clients. The
manpage of nfs.systemd(7) states:

       nfs-blkmap.service
              The blkmapd daemon is only required on NFS clients which are  us‐
              ing  pNFS  (parallel NFS), and particularly using the blocklayout
              layout protocol.  If you might use this particular  extension  to
              NFS, the nfs-blkmap.service unit should be enabled.

In Debian we ship this enabled by default as the following holds: The
systemd service even one does not use pNFS, without the blocklayout
module layouut protocol still starts without problem:

root@sid:~# systemctl status nfs-blkmap.service 
● nfs-blkmap.service - pNFS block layout mapping daemon
     Loaded: loaded (/usr/lib/systemd/system/nfs-blkmap.service; enabled; preset: enabled)
     Active: active (running) since Sun 2026-01-11 14:56:12 CET; 29s ago
 Invocation: 6bb055c1850a40d8bd2cc5841e92c3b9
       Docs: man:blkmapd(8)
    Process: 880 ExecStart=/usr/sbin/blkmapd (code=exited, status=0/SUCCESS)
   Main PID: 898 (blkmapd)
      Tasks: 1 (limit: 4668)
     Memory: 388K (peak: 2M)
        CPU: 4ms
     CGroup: /system.slice/nfs-blkmap.service
             └─898 /usr/sbin/blkmapd

Jan 11 14:56:12 sid systemd[1]: Starting nfs-blkmap.service - pNFS block layout mapping daemon...
Jan 11 14:56:12 sid blkmapd[898]: open pipe file /run/rpc_pipefs/nfs/blocklayout failed: No such file or directory
Jan 11 14:56:12 sid systemd[1]: Started nfs-blkmap.service - pNFS block layout mapping daemon.
root@sid:~#

The service an the blkmapd deamon is started.

What though seems irritating people is the error level message:

blkmapd[806]: open pipe file /run/rpc_pipefs/nfs/blocklayout failed: No such file or directory

As far I understand though this is mostly "harmless", because
42a065968d0f ("blkmapd: allow blocklayoutdriver module to
load/unload") did allow to blocklayoutdriver module to load/unload,
and if that is done the the pipe file is created or deleted
accordinly:

root@sid:~# modprobe blocklayoutdriver 
root@sid:~# ls -l /run/rpc_pipefs/nfs/blocklayout 
prw------- 1 root root 0 Jan 11 14:57 /run/rpc_pipefs/nfs/blocklayout
root@sid:~# systemctl status nfs-blkmap.service 
● nfs-blkmap.service - pNFS block layout mapping daemon
     Loaded: loaded (/usr/lib/systemd/system/nfs-blkmap.service; enabled; preset: enabled)
     Active: active (running) since Sun 2026-01-11 14:56:12 CET; 1min 27s ago
 Invocation: 6bb055c1850a40d8bd2cc5841e92c3b9
       Docs: man:blkmapd(8)
    Process: 880 ExecStart=/usr/sbin/blkmapd (code=exited, status=0/SUCCESS)
   Main PID: 898 (blkmapd)
      Tasks: 1 (limit: 4668)
     Memory: 640K (peak: 2M)
        CPU: 4ms
     CGroup: /system.slice/nfs-blkmap.service
             └─898 /usr/sbin/blkmapd

Jan 11 14:56:12 sid systemd[1]: Starting nfs-blkmap.service - pNFS block layout mapping daemon...
Jan 11 14:56:12 sid blkmapd[898]: open pipe file /run/rpc_pipefs/nfs/blocklayout failed: No such file or directory
Jan 11 14:56:12 sid systemd[1]: Started nfs-blkmap.service - pNFS block layout mapping daemon.
Jan 11 14:57:21 sid blkmapd[898]: blocklayout pipe file created
root@sid:~#

(if the module is unloaded, then accordingly the pipe file will be
deleted and the service keeps running, and loading the
blocklayoutdriver will create the pipe if I understand the upstream
Linux change fe0a9b740881 ("pnfsblock: add device operations")
correctly, which is in since 3.1-rc1).

In utils/blkmapd/device-discovery.c 

555     /* open pipe file */
556     bl_watch_dir(rpcpipe_dir, &rpc_pipedir_wfd);
557     bl_watch_dir(nfspipe_dir, &nfs_pipedir_wfd);
558
559     bl_pipe_fd = open(bl_pipe_file, O_RDWR);
560     if (bl_pipe_fd < 0)
561         BL_LOG_ERR("open pipe file %s failed: %s\n", bl_pipe_file, strerror(errno));

As the pipe is created and deleted when the blocklayoutdriver is
loaded or unloaded, should the above really be ad error log level? Is
it needed at all?

For Debian purposes at least I would like to make things bit less
irritating for users, keep ideally the service enabled by default, so
that administraors whant to make use of pNFS setup with the
blocklayout layout protocol, they just need to make the module load.

Does that sound sensible? It looks at least Ubuntu is handling it
similarly (but the package is mostly synced from Debian here, with
some Ubuntu specific modification, but not in the handling of the 
nfs-blkmap.service  service). As far I understand Fedora ships the
service in the nfsv4-client-utils specific package.

Regards,
Salvatore

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [nfs-utils] "blkmapd open pipe file /run/rpc_pipefs/nfs/blocklayout failed" and handling of nfs-blkmap.service service
  2026-01-11 14:17 [nfs-utils] "blkmapd open pipe file /run/rpc_pipefs/nfs/blocklayout failed" and handling of nfs-blkmap.service service Salvatore Bonaccorso
@ 2026-01-14  6:36 ` Christoph Hellwig
  2026-01-14 12:21   ` Scott Mayhew
  2026-01-14 14:54   ` [nfs-utils PATCH] Rename CONFIG_NFSV41 to CONFIG_BLKMAPD and disable by default Scott Mayhew
  0 siblings, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2026-01-14  6:36 UTC (permalink / raw)
  To: Salvatore Bonaccorso; +Cc: linux-nfs, Scott Mayhew, Steve Dickson

On Sun, Jan 11, 2026 at 03:17:24PM +0100, Salvatore Bonaccorso wrote:
> For Debian purposes at least I would like to make things bit less
> irritating for users, keep ideally the service enabled by default, so
> that administraors whant to make use of pNFS setup with the
> blocklayout layout protocol, they just need to make the module load.

The original blocklayout is deprecated because there is almost no
way to use it safely.   So I'd argue for not enabling blkmapd by
default, and maybe even splitting it into a separate binary package.

Note that none of this affects the revised scsi/nvme layouts that are
safe to use, and don't require blkmapd.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [nfs-utils] "blkmapd open pipe file /run/rpc_pipefs/nfs/blocklayout failed" and handling of nfs-blkmap.service service
  2026-01-14  6:36 ` Christoph Hellwig
@ 2026-01-14 12:21   ` Scott Mayhew
  2026-01-14 14:54   ` [nfs-utils PATCH] Rename CONFIG_NFSV41 to CONFIG_BLKMAPD and disable by default Scott Mayhew
  1 sibling, 0 replies; 7+ messages in thread
From: Scott Mayhew @ 2026-01-14 12:21 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Salvatore Bonaccorso, linux-nfs, Steve Dickson

On Tue, 13 Jan 2026, Christoph Hellwig wrote:

> On Sun, Jan 11, 2026 at 03:17:24PM +0100, Salvatore Bonaccorso wrote:
> > For Debian purposes at least I would like to make things bit less
> > irritating for users, keep ideally the service enabled by default, so
> > that administraors whant to make use of pNFS setup with the
> > blocklayout layout protocol, they just need to make the module load.
> 
> The original blocklayout is deprecated because there is almost no
> way to use it safely.   So I'd argue for not enabling blkmapd by
> default, and maybe even splitting it into a separate binary package.
> 
> Note that none of this affects the revised scsi/nvme layouts that are
> safe to use, and don't require blkmapd.
> 
Right, on both Fedora and RHEL nfs-blkmap.service is disabled by default
(via /usr/lib/systemd/system-preset/99-default-disable.preset) because
we support SCSI layout but not block layout.  I could have sworn I've
floated the idea of dropping blkmapd from the Red Hat packages
altogether, but I can't find anything in Bugzilla or Jira.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [nfs-utils PATCH] Rename CONFIG_NFSV41 to CONFIG_BLKMAPD and disable by default
  2026-01-14  6:36 ` Christoph Hellwig
  2026-01-14 12:21   ` Scott Mayhew
@ 2026-01-14 14:54   ` Scott Mayhew
  2026-01-15 16:09     ` Christoph Hellwig
                       ` (2 more replies)
  1 sibling, 3 replies; 7+ messages in thread
From: Scott Mayhew @ 2026-01-14 14:54 UTC (permalink / raw)
  To: steved; +Cc: hch, carnil, linux-nfs

pNFS block layout is deprecated in favor of pNFS SCSI layout, which
doesn't require the use of blkmapd.

Since CONFIG_NFSV41 (enabled by default, but can be disabled via
--disable-nfsv41) is only used to enable blkmapd, let's rename it to
CONFIG_BLKMAPD and change the default to disabled.

Distributions that wish to continue to include blkmapd can do so by
adding --enable-blkmapd to their configure script invocation.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
 configure.ac        | 22 +++++++++++-----------
 systemd/Makefile.am |  2 +-
 utils/Makefile.am   |  2 +-
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6da23915..bcbf0d69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,22 +85,22 @@ AC_ARG_ENABLE(nfsv4,
 	AC_SUBST(enable_nfsv4)
 	AM_CONDITIONAL(CONFIG_NFSV4, [test "$enable_nfsv4" = "yes"])
 
-AC_ARG_ENABLE(nfsv41,
-	[AS_HELP_STRING([--disable-nfsv41],[disable support for NFSv41 @<:@default=no@:>@])],
-	enable_nfsv41=$enableval,
-	enable_nfsv41=yes)
-	if test "$enable_nfsv41" = yes; then
+AC_ARG_ENABLE(blkmapd,
+	[AS_HELP_STRING([--enable-blkmapd],[enable support for blkmapd @<:@default=no@:>@])],
+	enable_blkmapd=$enableval,
+	enable_blkmapd=no)
+	if test "$enable_blkmapd" = yes; then
 		if test "$enable_nfsv4" != yes; then
-			AC_MSG_WARN([NFS v4 is not enabled. Disabling NFS v4.1])
-			enable_nfsv41=no
+			AC_MSG_WARN([NFS v4 is not enabled. Disabling blkmapd.])
+			enable_blkmapd=no
 		fi
 		BLKMAPD=blkmapd
 	else
-		enable_nfsv41=
+		enable_blkmapd=
 		BLKMAPD=
 	fi
-	AC_SUBST(enable_nfsv41)
-	AM_CONDITIONAL(CONFIG_NFSV41, [test "$enable_nfsv41" = "yes"])
+	AC_SUBST(enable_blkmapd)
+	AM_CONDITIONAL(CONFIG_BLKMAPD, [test "$enable_blkmapd" = "yes"])
 
 AC_ARG_ENABLE(gss,
 	[AS_HELP_STRING([--disable-gss],[disable client support for rpcsec_gss @<:@default=no@:>@])],
@@ -398,7 +398,7 @@ else
   enable_nfsdcltrack="no"
 fi
 
-if test "$enable_nfsv41" = yes; then
+if test "$enable_blkmapd" = yes; then
   AC_CHECK_LIB([devmapper], [dm_task_create], [LIBDEVMAPPER="-ldevmapper"], AC_MSG_ERROR([libdevmapper needed]))
   AC_CHECK_HEADER(libdevmapper.h, , AC_MSG_ERROR([Cannot find devmapper header file libdevmapper.h]))
   AC_CHECK_HEADER(sys/inotify.h, , AC_MSG_ERROR([Cannot find header file sys/inotify.h]))
diff --git a/systemd/Makefile.am b/systemd/Makefile.am
index 5e481421..9cc940dc 100644
--- a/systemd/Makefile.am
+++ b/systemd/Makefile.am
@@ -32,7 +32,7 @@ unit_files += \
     nfsv4-server.service
 endif
 
-if CONFIG_NFSV41
+if CONFIG_BLKMAPD
 unit_files += \
     nfs-blkmap.service
 endif
diff --git a/utils/Makefile.am b/utils/Makefile.am
index e5cb81e7..bfa12081 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -11,7 +11,7 @@ if CONFIG_NFSV4SERVER
 OPTDIRS += exportd
 endif
 
-if CONFIG_NFSV41
+if CONFIG_BLKMAPD
 OPTDIRS += blkmapd
 endif
 
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [nfs-utils PATCH] Rename CONFIG_NFSV41 to CONFIG_BLKMAPD and disable by default
  2026-01-14 14:54   ` [nfs-utils PATCH] Rename CONFIG_NFSV41 to CONFIG_BLKMAPD and disable by default Scott Mayhew
@ 2026-01-15 16:09     ` Christoph Hellwig
  2026-01-15 16:16     ` Salvatore Bonaccorso
  2026-01-26 13:37     ` Steve Dickson
  2 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2026-01-15 16:09 UTC (permalink / raw)
  To: Scott Mayhew; +Cc: steved, hch, carnil, linux-nfs

On Wed, Jan 14, 2026 at 09:54:35AM -0500, Scott Mayhew wrote:
> pNFS block layout is deprecated in favor of pNFS SCSI layout, which
> doesn't require the use of blkmapd.
> 
> Since CONFIG_NFSV41 (enabled by default, but can be disabled via
> --disable-nfsv41) is only used to enable blkmapd, let's rename it to
> CONFIG_BLKMAPD and change the default to disabled.
> 
> Distributions that wish to continue to include blkmapd can do so by
> adding --enable-blkmapd to their configure script invocation.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [nfs-utils PATCH] Rename CONFIG_NFSV41 to CONFIG_BLKMAPD and disable by default
  2026-01-14 14:54   ` [nfs-utils PATCH] Rename CONFIG_NFSV41 to CONFIG_BLKMAPD and disable by default Scott Mayhew
  2026-01-15 16:09     ` Christoph Hellwig
@ 2026-01-15 16:16     ` Salvatore Bonaccorso
  2026-01-26 13:37     ` Steve Dickson
  2 siblings, 0 replies; 7+ messages in thread
From: Salvatore Bonaccorso @ 2026-01-15 16:16 UTC (permalink / raw)
  To: Scott Mayhew; +Cc: steved, hch, linux-nfs

Hi,

On Wed, Jan 14, 2026 at 09:54:35AM -0500, Scott Mayhew wrote:
> pNFS block layout is deprecated in favor of pNFS SCSI layout, which
> doesn't require the use of blkmapd.
> 
> Since CONFIG_NFSV41 (enabled by default, but can be disabled via
> --disable-nfsv41) is only used to enable blkmapd, let's rename it to
> CONFIG_BLKMAPD and change the default to disabled.
> 
> Distributions that wish to continue to include blkmapd can do so by
> adding --enable-blkmapd to their configure script invocation.

Tested it on top of 2.8.4.

Tested-by: Salvatore Bonaccorso <carnil@debian.org>

Regards,
Salvatore

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [nfs-utils PATCH] Rename CONFIG_NFSV41 to CONFIG_BLKMAPD and disable by default
  2026-01-14 14:54   ` [nfs-utils PATCH] Rename CONFIG_NFSV41 to CONFIG_BLKMAPD and disable by default Scott Mayhew
  2026-01-15 16:09     ` Christoph Hellwig
  2026-01-15 16:16     ` Salvatore Bonaccorso
@ 2026-01-26 13:37     ` Steve Dickson
  2 siblings, 0 replies; 7+ messages in thread
From: Steve Dickson @ 2026-01-26 13:37 UTC (permalink / raw)
  To: Scott Mayhew; +Cc: hch, carnil, linux-nfs



On 1/14/26 9:54 AM, Scott Mayhew wrote:
> pNFS block layout is deprecated in favor of pNFS SCSI layout, which
> doesn't require the use of blkmapd.
> 
> Since CONFIG_NFSV41 (enabled by default, but can be disabled via
> --disable-nfsv41) is only used to enable blkmapd, let's rename it to
> CONFIG_BLKMAPD and change the default to disabled.
> 
> Distributions that wish to continue to include blkmapd can do so by
> adding --enable-blkmapd to their configure script invocation.
> 
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Committed... (tag: nfs-utils-2-8-5-rc2)

steved.

> ---
>   configure.ac        | 22 +++++++++++-----------
>   systemd/Makefile.am |  2 +-
>   utils/Makefile.am   |  2 +-
>   3 files changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 6da23915..bcbf0d69 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -85,22 +85,22 @@ AC_ARG_ENABLE(nfsv4,
>   	AC_SUBST(enable_nfsv4)
>   	AM_CONDITIONAL(CONFIG_NFSV4, [test "$enable_nfsv4" = "yes"])
>   
> -AC_ARG_ENABLE(nfsv41,
> -	[AS_HELP_STRING([--disable-nfsv41],[disable support for NFSv41 @<:@default=no@:>@])],
> -	enable_nfsv41=$enableval,
> -	enable_nfsv41=yes)
> -	if test "$enable_nfsv41" = yes; then
> +AC_ARG_ENABLE(blkmapd,
> +	[AS_HELP_STRING([--enable-blkmapd],[enable support for blkmapd @<:@default=no@:>@])],
> +	enable_blkmapd=$enableval,
> +	enable_blkmapd=no)
> +	if test "$enable_blkmapd" = yes; then
>   		if test "$enable_nfsv4" != yes; then
> -			AC_MSG_WARN([NFS v4 is not enabled. Disabling NFS v4.1])
> -			enable_nfsv41=no
> +			AC_MSG_WARN([NFS v4 is not enabled. Disabling blkmapd.])
> +			enable_blkmapd=no
>   		fi
>   		BLKMAPD=blkmapd
>   	else
> -		enable_nfsv41=
> +		enable_blkmapd=
>   		BLKMAPD=
>   	fi
> -	AC_SUBST(enable_nfsv41)
> -	AM_CONDITIONAL(CONFIG_NFSV41, [test "$enable_nfsv41" = "yes"])
> +	AC_SUBST(enable_blkmapd)
> +	AM_CONDITIONAL(CONFIG_BLKMAPD, [test "$enable_blkmapd" = "yes"])
>   
>   AC_ARG_ENABLE(gss,
>   	[AS_HELP_STRING([--disable-gss],[disable client support for rpcsec_gss @<:@default=no@:>@])],
> @@ -398,7 +398,7 @@ else
>     enable_nfsdcltrack="no"
>   fi
>   
> -if test "$enable_nfsv41" = yes; then
> +if test "$enable_blkmapd" = yes; then
>     AC_CHECK_LIB([devmapper], [dm_task_create], [LIBDEVMAPPER="-ldevmapper"], AC_MSG_ERROR([libdevmapper needed]))
>     AC_CHECK_HEADER(libdevmapper.h, , AC_MSG_ERROR([Cannot find devmapper header file libdevmapper.h]))
>     AC_CHECK_HEADER(sys/inotify.h, , AC_MSG_ERROR([Cannot find header file sys/inotify.h]))
> diff --git a/systemd/Makefile.am b/systemd/Makefile.am
> index 5e481421..9cc940dc 100644
> --- a/systemd/Makefile.am
> +++ b/systemd/Makefile.am
> @@ -32,7 +32,7 @@ unit_files += \
>       nfsv4-server.service
>   endif
>   
> -if CONFIG_NFSV41
> +if CONFIG_BLKMAPD
>   unit_files += \
>       nfs-blkmap.service
>   endif
> diff --git a/utils/Makefile.am b/utils/Makefile.am
> index e5cb81e7..bfa12081 100644
> --- a/utils/Makefile.am
> +++ b/utils/Makefile.am
> @@ -11,7 +11,7 @@ if CONFIG_NFSV4SERVER
>   OPTDIRS += exportd
>   endif
>   
> -if CONFIG_NFSV41
> +if CONFIG_BLKMAPD
>   OPTDIRS += blkmapd
>   endif
>   


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-26 13:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-11 14:17 [nfs-utils] "blkmapd open pipe file /run/rpc_pipefs/nfs/blocklayout failed" and handling of nfs-blkmap.service service Salvatore Bonaccorso
2026-01-14  6:36 ` Christoph Hellwig
2026-01-14 12:21   ` Scott Mayhew
2026-01-14 14:54   ` [nfs-utils PATCH] Rename CONFIG_NFSV41 to CONFIG_BLKMAPD and disable by default Scott Mayhew
2026-01-15 16:09     ` Christoph Hellwig
2026-01-15 16:16     ` Salvatore Bonaccorso
2026-01-26 13:37     ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox