Guided Partitioning does not list Software RAID devices on NVMe
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
partman-auto (Ubuntu) |
Fix Released
|
High
|
Mathieu Trudel-Lapierre | ||
Xenial |
Fix Released
|
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/
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).
Function path:
---
@ /lib/partman/
1. select_auto_disk()
2. get_auto_disks()
3. is_wholedisk_
Demonstration:
---
Software RAID device:
~ # grep ^md /proc/mdstat
md0 : active raid1 nvme1n1p1[1] nvme0n1p1[0]
~ # ls -1 /sys/block/
nvme0n1p1
nvme1n1p1
1) Notice there's no 'RAID1 device #0' in this list:
?????
?
? 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/
3) Now the array is listed:
?????
?
? 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)
Related branches
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 |
Default Comment by Bridge