Public bug reported:

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

** Affects: mdadm (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: vroc

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1948435

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/1948435/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to