imsm: After reboot spare devices are not placed in to different container.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mdadm (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Description of problem:
Distribution: UBUNTU 20.04, latest mdadm package mdadm/focal-
The expected behavior is that spares are going to different container after reboot. Currently it is possible that spare drive will be added to the container with existing volume.
This a backport request for Focal distribution.
How reproducible:
The wrong behavior is based on the order of the assembled disks. It can be reproduced without reboot, with steps below.
Steps to Reproduce:
1. Create container
# mdadm -C /dev/md/imsm1 -n3 -e imsm /dev/nvme[0-1]n1
2.Create RAID1
# mdadm -C /dev/md/md1 -l1 -n2 /dev/imsm1
3.Add spare device to container
# mdadm --add /dev/imsm1 /dev/nvme2n1
4. Add conf file with policy
# echo "POLICY domain=
5. Stop volume and container
# mdadm -Ss
6. Assemble first device of volume incrementally
# mdadm -I /dev/nvme0n1
7. Assemble spare device incrementally
# mdadm -I /dev/nvme2n1
8. Assemble second device of volume incrementally
# mdadm -I /dev/nvme1n1
Actual results:
Volume is assembled, and spare device is moved to container with volume after assemble second volume device.
Expected results:
All spares goes to separate container
Additional info:
Patch that fixes the issue:
https:/