#997790 mdadm: Duplicate /dev/md/0 lines into /etc/mdadm/mdadm.conf at mdadm installation

Package:
mdadm
Source:
mdadm
Description:
Tool to administer Linux MD arrays (software RAID)
Submitter:
Julien ROBIN
Date:
2021-10-24 12:36:44 UTC
Severity:
important
#997790#5
Date:
2021-10-24 11:24:28 UTC
From:
To:
Dear Maintainer,

When installing mdadm (apt install mdadm) in presence of 2 already existing
RAID arrays, the creation of /etc/mdadm/mdadm.conf goes wrong. Under the "#
definitions of existing MD arrays" line, there are 2 lines for the 2 different
arrays, but both are assigned to /dev/md/0 - and because of that, only the
first array is automatically assembled at startup (the second one have to be
assembled manually).

# definitions of existing MD arrays
ARRAY /dev/md/0  metadata=1.2 UUID=43c0447b:9c411b87:800d69f9:86dfe0d3
name=Pix-Server-Boutigny:0
ARRAY /dev/md/0  metadata=1.2 UUID=4042f02a:f1d2c565:91a6dacf:bb3ca761
name=VALEFORT:0

Changing to /dev/md0 and /dev/md1 for example, was able to solve the issue
caused by this bug (after update-initramfs -u and reboot, both arrays are now
assembled automatically).

I have been able to check that I have the same issue on a second computer, in
my example, having a 3 disks RAID 5 array, and another 3 disks RAID 0 array.
But others kinds of RAID arrays are probably affected too.

Hope this report will help, and also hope this bug will be easy to solve!

Best regards,
Julien ROBIN