[Bug 1868708] Re: mdmon: device descriptor is not closed

Yuan-Chen Cheng 1868708 at bugs.launchpad.net
Fri Jun 3 03:53:33 UTC 2022


** Changed in: oem-priority
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
https://bugs.launchpad.net/bugs/1868708

Title:
  mdmon: device descriptor is not closed

Status in mdadm:
  Invalid
Status in OEM Priority Project:
  Fix Released
Status in mdadm package in Ubuntu:
  Fix Released
Status in mdadm source package in Impish:
  Fix Released

Bug description:
  When device disappears from the system "mdadm -If" is triggered by
  udev and drive is removed from the corresponding array and container.
  The missing close() in metadata manager (mdmon) causes that userspace
  handler to the device is still opened (can be tracked by lsof -p
  <mdmon_pid>).

  For nvme drives it causes weird namespace number after hot-plug (e.g. will appear nvme1n2). The issue affects only IMSM metadata format.
  Reproducible on Focal with latest mdadm 4.1-5ubuntu1.

  Steps:
  1. Create IMSM container:
  #mdadm -CR imsm -e imsm -n2 /dev/nvme[01]n1
  2. Create IMSM array:
  #mdadm -CR vol1 -l1 -n2 /dev/nvme[01]n1
  3. remove via sysfs drive:
  #echo 1 > /sys/block/nvme0n1/device/device/remove
  4. restore the same drive:
  #echo 1 > /sys/bus/pci/rescan
  5. see mdstat and lsblk:
  # cat /proc/mdstat

  Result:
  /dev/nvme0n2 appears in system.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mdadm/+bug/1868708/+subscriptions




More information about the foundations-bugs mailing list