imsm: After reboot spare devices are not placed in to different container.

Bug #1948435 reported by Błażej Kucman
10
This bug affects 1 person
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-updates,now 4.1-5ubuntu1.

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=RAID_DOMAIN_1 path=* metadata=imsm action=spare-same-slot" > /etc/mdadm.conf
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://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=69068584f9ed68b8b2736287a1c9863e11b741d5

Tags: vroc
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.