Bug 2120690

Summary: DDF RAID array is not automatically assembled
Product: Red Hat Enterprise Linux 9 Reporter: Jan Stodola <jstodola>
Component: mdadmAssignee: XiaoNi <xni>
Status: CLOSED ERRATA QA Contact: Fine Fan <ffan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: cwei, ncroxon, pvlasin, rmetrich, xni
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mdadm-4.2-6.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2123356 (view as bug list) Environment:
Last Closed: 2022-11-15 11:19:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2071990, 2123356    

Description Jan Stodola 2022-08-23 14:36:16 UTC
Description of problem:
A DDF RAID array is not automatically assembled during boot. This is not a problem on RHEL-8.7 with the same setup, where the array is assembled automatically.


In the following example, vdb and vdc are the array members, which were created by the following commands (commands from bug 2063791#c0):

# mdadm --create /dev/md/ddf --name=ddf --level container --raid-disks=2 --metadata=ddf /dev/vdb /dev/vdc
# mdadm --create /dev/md/vol0 --name=vol0 --level raid1 --raid-disks=2 /dev/md/ddf

After reboot:

[root@localhost ~]# lsblk 
NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sr0            11:0    1 1024M  0 rom  
vda           252:0    0   20G  0 disk 
├─vda1        252:1    0    1G  0 part /boot
└─vda2        252:2    0   19G  0 part 
  ├─rhel-root 253:0    0   17G  0 lvm  /
  └─rhel-swap 253:1    0    2G  0 lvm  [SWAP]
vdb           252:16   0   10G  0 disk 
vdc           252:32   0   10G  0 disk 
[root@localhost ~]# blkid
/dev/mapper/rhel-swap: UUID="0decee34-0f1d-45b0-9d3f-8009b231bc55" TYPE="swap"
/dev/vdb: UUID="Linux-MDM-^M--M->M-o" TYPE="ddf_raid_member"
/dev/mapper/rhel-root: UUID="9a9fe13e-ce4e-4652-b721-19be708ef989" BLOCK_SIZE="512" TYPE="xfs"
/dev/vdc: UUID="Linux-MDM-^M--M->M-o" TYPE="ddf_raid_member"
/dev/vda2: UUID="7Tuwmx-f3J1-Kz3i-aHyN-hpPP-2ND9-8re8aY" TYPE="LVM2_member" PARTUUID="038a6f7d-02"
/dev/vda1: UUID="01a0d35f-9154-4225-abec-f166f84593d9" BLOCK_SIZE="512" TYPE="xfs" PARTUUID="038a6f7d-01"
[root@localhost ~]# cat /proc/mdstat 
Personalities : 
unused devices: <none>
[root@localhost ~]#


By comparing RHEL-8.7 and RHEL-9.1 systems, the following lines were found missing in /usr/lib/udev/rules.d/65-md-incremental.rules:


@@ -42,8 +42,6 @@
 ENV{nodmraid}=="?*", GOTO="md_imsm_inc_end"
 SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="isw_raid_member", \
        RUN+="/sbin/mdadm -I $env{DEVNAME}"
-SUBSYSTEM=="block", ACTION=="add", ENV{ID_FS_TYPE}=="ddf_raid_member", \
-       RUN+="/sbin/mdadm -I $env{DEVNAME}"
 SUBSYSTEM=="block", ACTION=="remove", ENV{ID_PATH}=="?*", \
        ENV{ID_FS_TYPE}=="isw_raid_member", \
        RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"

After adding the two missing lines and restarting the system, the array was successfully assembled.


This problem also affects the system installation, where the array is not assembled and visible in the installer.


Version-Release number of selected component (if applicable):
RHEL-9.1
mdadm-4.2-4.el9

How reproducible:
Always

Steps to Reproduce:
1. See above

Actual results:
DDF RAID array not assembled automatically.

Expected results:
DDF RAID array assembled automatically.

Additional info:
The problem was found during verification of bug 2109030.

Comment 1 XiaoNi 2022-08-29 02:35:03 UTC
Hi Jan

Thanks for reporting this. It looks like the problem exists at the beginning
of RHEL9. As far as I know, there are few customers that use ddf raid. Now
we have entered the period that it needs blocker/exception for 9.1 bug. So
I plan to fix it in rhel9.2 

Is it ok for you?

Thanks
Xiao

Comment 12 errata-xmlrpc 2022-11-15 11:19:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (mdadm bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8338