rpc.mountd may leave open block device after 'exportfs -u' due to libblkd bug involving leaked file descriptor with partitioned devices

Solution In Progress - Updated -

Issue

  • After starting a RAID based file system, exporting it via NFS, and mounting it from a remote client, the rpc.mountd process holds an open file descriptor on the root block device (e.g. /dev/md123). The rpc.mountd process does not close this device even after the filesystem has been unmounted by the client, and unexported by the host. This prevents stopping the RAID device, as it complains that a process still has it open (e.g. rpc.mountd).
  • This behavior does not occur under RHEL6.
  • This behavior is not limited to RAID devices, but happens for all block devices (e.g. /dev/sda), however, their is no need to "stop" a normal block device (though it may need to be removed in the case of a hot-plug device like a USB disk).

Environment

  • Red Hat Enterprise Linux 7 (nfs-server)
    • seen on libblkid-2.23.2-59.el7.x86_64, nfs-utils-1.3.0-0.61.el7.x86_64
  • Red Hat Enterprise Linux 8 (nfs-server)
    • seen on libblkid-2.32.1-8.el8.x86_64, nfs-utils-2.3.3-14.el8.x86_64
  • does not occur on Red Hat Enterprise Linux 6
    • libblkid-2.17.2-12.28.el6_9.2.x86_64, nfs-utils-1.2.3-75.el6_9.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content