[Bug 1615650] Re: Guided Partitioning does not list Software RAID devices on NVMe
Andy Whitcroft
apw at canonical.com
Wed Sep 7 09:22:36 UTC 2016
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
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to partman-auto in Ubuntu.
https://bugs.launchpad.net/bugs/1615650
Title:
Guided Partitioning does not list Software RAID devices on NVMe
Status in partman-auto package in Ubuntu:
Fix Released
Status in partman-auto source package in Xenial:
Fix Committed
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 <mauricfo at br.ibm.com> - 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 <mauricfo at br.ibm.com
---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)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/partman-auto/+bug/1615650/+subscriptions
More information about the foundations-bugs
mailing list