mdadm --export --detail format incorrect
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_
MD_DEVICE_
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_
MD_DEVICE_
Note the differences in the the MD_DEVICE_
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).