Hello,
dmraid has an issue where kpartx is not run on boot.
This is due to the udev rule being triggered by DM_STATE, which is no
longer set. It used to be set by multipath-tools, but no longer does
since multipath-tools version 0.8.8-1[0].
What this means is that dmraid will work so you can see the block
device itself, but upon boot no partitions will be shown, and users
will have to manually run kpartx. This is the good case when the
partition is not the boot drive, if a user is using the latest
multipath-tools and dmraid for a boot drive, the partitions will not
be seen and fail to boot.
We can either reinstate the env file, or change the trigger. I'm
thinking about changing the trigger which looks like:
diff --git a/debian/dmraid.udev b/debian/dmraid.udev
index a4a1ab7..407d57b 100644
--- a/debian/dmraid.udev
+++ b/debian/dmraid.udev
@@ -4,5 +4,5 @@
SUBSYSTEM=="block", ACTION=="add", ENV{ID_TYPE}=="disk",
ENV{ID_FS_USAGE}=="raid", KERNEL=="hd[a-z]|sd[a-z]", \
RUN+="/sbin/dmraid-activate %k"
-ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="DMRAID-*", \
- RUN+="/sbin/kpartx -a /dev/$kernel"
\ No newline at end of file
+ENV{DM_ACTIVATION}=="1", ENV{DM_UUID}=="DMRAID-*", \
+ RUN+="/sbin/kpartx -a /dev/$kernel"
Relevant Ubuntu bug [1].
[0] - https://salsa.debian.org/linux-blocks-team/multipath-tools/-/commit/4ab9ce259ffa75ed3e2d145b3f2effc22af7b4c6
[1] - https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/2047303
As the original reporter, I can add more information about this bug.
The dmraid package provides udev 97-dmraid.rules file.
This file has lines
ENV{DM_STATE}=="ACTIVE", ENV{DM_UUID}=="DMRAID-*", \
RUN+="/sbin/kpartx -a /dev/$kernel"
The used environment variable DM_STATE was set by
/usr/lib/udev/dmsetup_env (from multipath-tools package) and DM_UUID is
set by both dmsetup_env and 55-dm.rules (from dmsetup package).
However, Debian removed dmsetup_env starting from multipath-tools
version 0.8.8-1 [0] (dated Jan 2022) with the wrong comment that
additional variables are not used anywhere. [1]
As the result DM_STATE is not set anywhere and kpartx from
97-dmraid.rules is not executed any more.
The possible fixes are:
* restore dmsetup_env (the file could be reduced to set only DM_STATE
variable)
* replace the second rule in 97-dmraid.rules (see my patch in the
message above)
[0] -
https://metadata.ftp-master.debian.org/changelogs//main/m/multipath-tools/multipath-tools_0.9.4-3+deb12u1_changelog
[1] -
https://salsa.debian.org/linux-blocks-team/multipath-tools/-/commit/4ab9ce259ffa75ed3e2d145b3f2effc22af7b4c6
Hi Mitchell, [..] dmraid is dead upstream and was removed from trixie. IIRC in the bookworm release notes it was announced that bookworm will be the last release supporting it. It's not entirely gone from unstable yet, but I'll expect it to go away completely sometime soon. Best, Chris
Sorry, was confused. It's already gone from unstable too. Chris
Thanks Chris. I haven't tested it yet, but I would imagine that bookworm is still suffering from this issue, since multipath-tools is at 0.9.4-3+deb12u1. I totally understand removing this project, but feel free to consider making a patch such as this for users who are interested in the stable release. No worries if not - I'll look at patching this on the Ubuntu side since there's some clear desire for it even if the upstream project is dead.
Hi all, bookworm (the current stable) still has dmraid package. Combined with multipath-tools 0.9.4-3+deb12u1, it is broken: partitions are not mounted. A one-line patch for the rules file may easily fix the this. SID still has dmraid for riscv64. I am not sure whether it is some leftover or intentional.