[Bug 2047303] Re: Partitions on dmriad managed array are not mounted, system cannot boot
Ubuntu Foundations Team Bug Bot
2047303 at bugs.launchpad.net
Sun Dec 24 12:13:22 UTC 2023
The attachment "Suggested patch" seems to be a patch. If it isn't,
please remove the "patch" flag from the attachment, remove the "patch"
tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the
team.
[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]
** Tags added: patch
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dmraid in Ubuntu.
https://bugs.launchpad.net/bugs/2047303
Title:
Partitions on dmriad managed array are not mounted, system cannot boot
Status in dmraid package in Ubuntu:
New
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/isw_xxxx), but no
partitions are visible (no device like /dev/mapper/isw_xxxx1,
/dev/mapper/isw_xxxx2).
It was reported many times on various sites, for example:
https://askubuntu.com/questions/1443274/boot-fails-after-upgrading-from-20-04-to-22-04-on-dmraid-device-no-partitons
https://askubuntu.com/questions/1405817/system-boots-to-initramfs-after-upgrade-from-21-10-to-22-04
https://askubuntu.com/questions/1448141/installation-problems-ubuntu-22-10-on-acer-aspire-3410-1tb-4gb-ram
https://askubuntu.com/questions/1420457/not-booting-from-raid-after-upgrade-from-21-10-to-22-04
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_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 version 0.8.8-1 (dated Jan 2022) of multipath-tools with wrong comment that additional variables are not used anywhere.
See https://metadata.ftp-master.debian.org/changelogs/main/m/multipath-tools/multipath-tools_0.9.4-7_changelog and https://salsa.debian.org/linux-blocks-team/multipath-tools/-/commit/4ab9ce259ffa75ed3e2d145b3f2effc22af7b4c6
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_ACTIVATION}=="1", ENV{DM_UUID}=="DMRAID-*", \
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/2047303/+subscriptions
More information about the foundations-bugs
mailing list