[Bug 1733276] Re: Cannot resize partitions on NVME devices due to bad device name parsing

Dan Streetman dan.streetman at canonical.com
Tue Jan 30 21:12:20 UTC 2018


This has been fixed in Bionic by pulling partman-partitioning-120 from
debian (artful has version -114).  The newer version has a more
comprehensive fix, i.e.:

--- partman-partitioning-114/lib/resize.sh	2014-09-04 01:45:57.000000000 -0400
+++ partman-partitioning-120/lib/resize.sh	2017-06-24 23:04:17.000000000 -0400
@@ -18,15 +18,12 @@
 		num=$(sed 's/^[^0-9]*\([0-9]*\)[^0-9].*/\1/' $backupdev/$oldid/view)
 		bdev=$(cat $backupdev/device)
 		case $bdev in
-		    */disc)
-			bdev=${bdev%/disc}/part$num
+		    /dev/*[0-9])
+			bdev=${bdev}p$num
 			;;
-		    /dev/[hsv]d[a-z]|/dev/xvd[a-z])
+		    /dev/*)
 			bdev=$bdev$num
 			;;
-		    /dev/cciss/c[0-9]d[0-9]|/dev/cciss/c[0-9]d[0-9][0-9]|/dev/ida/c[0-9]d[0-9]|/dev/ida/c[0-9]d[0-9][0-9]|/dev/mmcblk[0-9])
-			bdev=${bdev}p$num
-			;;
 		    *)
 			log "get_real_device: strange device name $bdev"
 			return

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1733276

Title:
  Cannot resize partitions on NVME devices due to bad device name
  parsing

Status in partman-partitioning:
  Fix Released
Status in debian-installer package in Ubuntu:
  Confirmed
Status in partman-partitioning package in Ubuntu:
  New
Status in debian-installer source package in Trusty:
  New
Status in partman-partitioning source package in Trusty:
  New
Status in debian-installer source package in Xenial:
  New
Status in partman-partitioning source package in Xenial:
  New
Status in debian-installer source package in Zesty:
  New
Status in partman-partitioning source package in Zesty:
  New
Status in debian-installer source package in Artful:
  New
Status in partman-partitioning source package in Artful:
  New
Status in debian-installer source package in Bionic:
  Confirmed
Status in partman-partitioning source package in Bionic:
  New

Bug description:
  It is not possible to resize NVME partitions in the Ubiquity
  installer.  This appears to affect multiple filesystem types including
  NTFS and ext4.

  NVME devices have an unusual device format, specifically e.g.
  /dev/nvme0n1p1 that has two 'sections' that potentially look like
  partitions.

  Based on the error message, it seems that this device name is being
  parsed incorrectly and it attempts to use the device path /dev/nvme0n1
  instead of /dev/nvme0n1p1

  You can test this using qemu and a virtual NVME device.  If you toggle
  the same device/partition between a virtual SCSI/IDE and an NVME
  device - the issue appears and disappears.

  Commands you can use to replicate the issue - unpack netboot.tar.gz
  into the local directory and then

  dd if=/dev/zero of=nvme.disk bs=1M count=16384

  NVME:
  qemu-system-x86_64 -drive file=nvme.disk,if=none,id=drv0,format=raw -device nvme,drive=drv0,serial=foo -enable-kvm -smp 2 -m 1024 -kernel xenial/ubuntu-installer/amd64/linux -initrd xenial/ubuntu-installer/amd64/initrd.gz

  SCSI:
  qemu-system-x86_64 -drive file=nvme.disk,if=none,id=drv0,format=raw  -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drv0,id=virtio-disk0,bootindex=1  -enable-kvm -smp 2 -m 1024 -kernel ubuntu-installer/amd64/linux -initrd ubuntu-installer/amd64/initrd.gz

To manage notifications about this bug go to:
https://bugs.launchpad.net/partman-partitioning/+bug/1733276/+subscriptions



More information about the Ubuntu-sponsors mailing list