Partitions on dmriad managed array are not mounted, system cannot boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dmraid (Debian) |
New
|
Undecided
|
Unassigned | ||
dmraid (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Starting from jammy (22.04LTS) system failed to add any partitions from dmraid-managed array (Intel Software RAID). The array itself is mounted correctly (both as /dev/dm-0 and /dev/mapper/
It was reported many times on various sites, for example:
https:/
https:/
https:/
https:/
If kpartx or partprobe are used on mounted raid device then partitions are added, however the next reboot requires manual actions again.
I was able to trace the problem down to the root cause.
The dmraid package provides udev 97-dmraid.rules file.
This file has lines
ENV{DM_
RUN+="/sbin/kpartx -a /dev/$kernel"
The used environment variable DM_STATE was set by /usr/lib/
However, Debian removed dmsetup_env starting from version 0.8.8-1 (dated Jan 2022) of multipath-tools with wrong comment that additional variables are not used anywhere.
See https:/
As the result DM_STATE is not set anywhere and kpartx from 97-dmraid.rules is not executed anymore.
The possible fixes are:
* restore dmsetup_env (the file could be reduced to set only DM_STATE variable)
* replace second rule in 97-dmraid.rules with
ENV{DM_
RUN+="/sbin/kpartx -a /dev/$kernel"
The fix should be used for jammy (22.04LTS), lunar (23.04), mantic (23.10) and noble.
Sidenote: mdadm cannot correctly detect the Intel Software RAID used on my computer.
The problem can be easily reproduced in VM.
Just add two disk devices and create ISW raid on them with dmraid.
I used the next command to create test array:
dmraid -f isw -C HDD_SWRAID --type 0 --disk /dev/sda,/dev/sdb
Then create any partition on the array and reboot. The block devices will be "visible" for the system, but partitions are not.