** Description changed:

+ [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 protected]> - 
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() 
+ 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>
+   ?????????????????????????? [!!] 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>
+   ?????????????????????????? [!!] 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 protected]
  
- 
-  
- Contact Information = Mauricio Faria de Oliveira <[email protected] 
-  
  ---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 
-  
+ 
+ Machine Type = N/A
+ 
  ---boot type---
  CDROM / ISO image
-  
+ 
  ---Install repository type---
  CDROM
-  
+ 
  ---Point of failure---
  Other failure during installation (stage 1)

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

Title:
  Guided Partitioning does not list Software RAID devices on NVMe

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/partman-auto/+bug/1615650/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to