Guided Partitioning does not list Software RAID devices on NVMe

Bug #1615650 reported by bugproxy on 2016-08-22
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
partman-auto (Ubuntu)
High
Mathieu Trudel-Lapierre
Xenial
High
Mathieu Trudel-Lapierre

Bug Description

[Impact]
Administrators wanting to setup software RAID over NVMe devices currently will not see NVMe disks listed as members of an mdadm array.

[Test case]
1) Run d-i to the disk partitioner, on a system with NVMe devices.
2) Partition the devices appropriately to support Software RAID.
3) Add NVMe partitions to the mdadm array.
4) Verify that NVMe partitions are listed in the mdadm array.

[Regression Potential]
Minimal regression potential. This only affects NVMe devices. NVMe is special in that it abuses some of the commonly used nomenclature for naming the various segments of the disks you can create in firmware. partman filters partitioned devices fairly bluntly as anything that contains 'p' followed by numbers as partitioned devices; which breaks the workflow for NVMe only. This change may allow otherwise unacceptable NVMe devices to be used to configure the Software RAID array, which is an error that would be caught later during the partitioning anyway (should trigger an error in mdadm if used incorrectly).

== Comment: #0 - Mauricio Faria De Oliveira <email address hidden> - 2016-08-19 14:56:18 ==
---Problem Description---
Guided Partitioning does not list Software RAID devices on NVMe

This happens because commit [1] in partman-auto only lists mdadm arrays in wholedisk devices.
It filters out any array whose slave devices have a trailing 'p<number>', and that is used by NVMe (e.g., nvme0n1p2).

There should be an exception for NVMe devices, since the installer requires that mdadm arrays are created in partitions
(the 'Configure Software RAID' process automatically creates partitions even if you select wholedisk devices).
Another option is for that restriction to be removed (it seems conflicting/confusing w/ this installer behavior nowadays).

The attached patch adds an exception for NVMe, the conservative approach, since this is wanted in 16.04 LTS. (patch also applies on 16.10 -- identical partman-auto versions).

[1] https://anonscm.debian.org/cgit/d-i/partman-auto.git/commit/lib/auto-shared.sh?id=7dfd6208c3f8e4cf574cab22c81241a80aba6cfb

Function path:
---

@ /lib/partman/lib/auto-shared.sh
1. select_auto_disk()
2. get_auto_disks()
3. is_wholedisk_mdraid()

Demonstration:
---

Software RAID device:

~ # grep ^md /proc/mdstat
md0 : active raid1 nvme1n1p1[1] nvme0n1p1[0]

~ # ls -1 /sys/block/md0/slaves
nvme0n1p1
nvme1n1p1

1) Notice there's no 'RAID1 device #0' in this list:

  ?????????????????????????? [!!] Partition disks
  ?
  ? Note that all data on the disk you select will be erased, but not
  ? before you have confirmed that you really want to make the changes.
  ?
  ? Select disk to partition:
  ?
  ? /dev/nvme0n1 - 1.6 TB Unknown
  ? /dev/nvme1n1 - 1.6 TB Unknown
  ? SCSI1 (0,0,0) (sda) - 137.4 GB QEMU QEMU HARDDISK
  ?
  ? <Go Back>

2) Make this change (Go Back to main menu, then Execute a Shell)
~ # sed -i '243 i */nvme*) ;;' /lib/partman/lib/auto-shared.sh

3) Now the array is listed:

  ?????????????????????????? [!!] Partition disks
  ?
  ? Note that all data on the disk you select will be erased, but not
  ? before you have confirmed that you really want to make the changes.
  ?
  ? Select disk to partition:
  ?
  ? RAID1 device #0 - 1.6 TB Software RAID device
  ? /dev/nvme0n1 - 1.6 TB Unknown
  ? /dev/nvme1n1 - 1.6 TB Unknown
  ? SCSI1 (0,0,0) (sda) - 137.4 GB QEMU QEMU HARDDISK
  ?
  ? <Go Back>

Contact Information = Mauricio Faria de Oliveira <<email address hidden>

---uname output---
Linux ubuntu 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:05:18 UTC 2016 ppc64le GNU/Linux

Machine Type = N/A

---boot type---
CDROM / ISO image

---Install repository type---
CDROM

---Point of failure---
Other failure during installation (stage 1)

Default Comment by Bridge

tags: added: architecture-ppc64le bugnameltc-145309 severity-high targetmilestone-inin16042
Changed in ubuntu:
assignee: nobody → Taco Screen team (taco-screen-team)
affects: ubuntu → partman-auto (Ubuntu)

@taco-screen-team, may @cyphermox check this one? we've worked on this area/kind of bugs in the past.

Steve Langasek (vorlon) on 2016-08-22
Changed in partman-auto (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → Mathieu Trudel-Lapierre (cyphermox)
status: New → Triaged
tags: added: hwe
Changed in partman-auto (Ubuntu):
status: Triaged → In Progress
Changed in partman-auto (Ubuntu Xenial):
status: New → In Progress
importance: Undecided → High
Changed in partman-auto (Ubuntu):
importance: Undecided → High
Changed in partman-auto (Ubuntu Xenial):
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-auto - 134ubuntu3

---------------
partman-auto (134ubuntu3) yakkety; urgency=medium

  * lib/auto-shared.sh: take 2; list Software RAID devices on NVMe disks.
    Really make the changes this time. (LP: #1615650)

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 06 Sep 2016 13:34:50 -0400

Changed in partman-auto (Ubuntu):
status: In Progress → Fix Released

Hello bugproxy, or anyone else affected,

Accepted partman-auto into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/partman-auto/134ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in partman-auto (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed

------- Comment From <email address hidden> 2016-09-08 09:40 EDT-------
Changing tag to verification-done.

The installation w/ the new partman-auto version lists the SW Raid device on the NVMe device correctly.

I used an ISO install, and manually downloaded and installed the partman-auto package from -proposed:
~ # wget https://launchpad.net/ubuntu/+archive/primary/+files/partman-auto_134ubuntu1.1_ppc64el.udeb
~ # udpkg -i partman-auto_134ubuntu1.1_ppc64el.udeb
~ # exit

Thanks!

?????????????????????????? [!!] Partition disks ???????????????????????????
? ?
? Note that all data on the disk you select will be erased, but not ?
? before you have confirmed that you really want to make the changes. ?
? ?
? Select disk to partition: ?
? ?
? RAID0 device #127 - 1.6 TB Software RAID device ?
? /dev/nvme0n1 - 1.6 TB Unknown ?
? SCSI1 (0,0,0) (sda) - 137.4 GB QEMU QEMU HARDDISK ?
? ?
? <Go Back> ?
? ?
???????????????????????????????????????????????????????????????????????????

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-auto - 134ubuntu1.1

---------------
partman-auto (134ubuntu1.1) xenial; urgency=medium

  * lib/auto-shared.sh: list Software RAID devices on NVMe disks. Thanks to
    Mauricio Faria De Oliveira for the patch. (LP: #1615650)

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 06 Sep 2016 13:57:44 -0400

Changed in partman-auto (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for partman-auto has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

Other bug subscribers