OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Joseph Tingiris - 03.01.2019

FS#2043 - mdadm files/mdadm.config should ship with an empty config array

Supply the following if possible:
- Device problem occurs on

specifically tested & confirmed on x86-64 and ipq806x

- Software versions of OpenWrt/LEDE release, packages, etc.

18.06.1 and snapshot

- Steps to reproduce

opkg install mdadm


Joseph Tingiris commented on 03.01.2019 17:21

As seen, here:

If a new /dev/md0 is created then the first boot fails with the package as-is. Little documentation exists to point a user in the right direction to correct the issue.

The mdadm.config that's shipped in 18.06.01 (and current snapshot) gets installed as /etc/config/mdadm with a defunct /dev/md0 uuid. Newly created devices named /dev/md0 will not have that uuid and extra steps are required to achieve a functional boot. One could either update via uci set or remove it and add the correct uuid of the linux_raid_members.

Jo-Philipp Wich commented on 03.01.2019 17:26

Did you test whether simply commenting out the uuid works?

Joseph Tingiris commented on 03.01.2019 17:26

Additionally, an /etc/mdadm/config as follows fails to start the 'correct' uuid if both arrays use the same device. In my case, the second uuid is valid but the first is not.

config mdadm
        option email 'root'

config array
        option device '/dev/md0'
        option uuid '991d8863-9158-46ab-aa4f-755e8c2d3219'

config array
        option device '/dev/md0'
        option uuid 'e0b635e1-3a4f-d2db-e9ff-1ae2052cd032'

I've written a workaround init script, that runs prior to the existing /etc/init.d/mdadm, that works for me. It corrects the config prior to mdadm starting. Attached for your consideration to include in future packages, or integrate similar logic in /etc/init.d/mdadm.

Joseph Tingiris commented on 03.01.2019 17:29

@Jo-Philipp Wich; yes and no. Replacing the uuid with the correct one works as expected. However, commenting out the uuid triggers another warning and the device still fails to mount. The correct uuid must be known.

Jo-Philipp Wich commented on 03.01.2019 17:31

Uhm, so the config needs editing either way. I can simply comment out the array settings by default but that wouldn't really solve the issue you raised here, /etc/config/mdadm would still need editing and not work ootb.

Joseph Tingiris commented on 03.01.2019 17:42

I've created a PR on github that addresses both issues (for me).

1) config comments
2) automatic detection & updating /etc/config/mdadm prior to starting mdadm

Jo-Philipp Wich commented on 04.01.2019 07:55

I will comment out the config by default but auto-setup is out of the scope of the package.


Available keyboard shortcuts


Task Details

Task Editing