mdadm --export --detail format incorrect

Bug #1906881 reported by Chad Yates
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mdadm (Ubuntu)
New
Undecided
Unassigned

Bug Description

The mdadm --export --detail command creates environment variable name/value pairs suitable to import into a scripts environment. The format of these has changed, and the change looks to be a bug.

Previously (prior to mdadm V4.1) the command would output in the following format:
MD_LEVEL=raid1
MD_DEVICES=2
MD_METADATA=1.2
MD_UUID=<redacted>
MD_NAME=<redacted>
MD_DEVICE_sdb_ROLE=0
MD_DEVICE_sdb_DEV=/dev/sdb

Now (mdadm V4.1) the command outputs in the following format:
MD_LEVEL=raid1
MD_DEVICES=2
MD_METADATA=1.2
MD_UUID=<redacted>
MD_NAME=<redacted>
MD_DEVICE_ev_sdb_ROLE=0
MD_DEVICE_ev_sdb_DEV=/dev/sdb

Note the differences in the the MD_DEVICE_<dev>_ROLE and MD_DEVICE_<dev>_DEV variables where an extra "ev" string has been included.

The "ev" string is added for all ROLE/DEV variables when multiple disks are included in the RAID.

As this form of the --detail command is made as a consistent API mechanism for scripts to use, it is important that it maintain correct and consistent behavior.

I am using Ubuntu (20.04.1 LTS) along with mdadm (4.1-5ubuntu1.2).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.