Cannot resize partitions on NVME devices due to bad device name parsing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
partman-partitioning |
Fix Released
|
Unknown
|
|||
partman-partitioning (Ubuntu) |
Fix Released
|
Undecided
|
Dimitri John Ledkov | ||
Trusty |
Fix Released
|
Medium
|
Eric Desrochers | ||
Xenial |
Fix Released
|
Medium
|
Eric Desrochers | ||
Zesty |
Won't Fix
|
Undecided
|
Unassigned | ||
Artful |
Fix Released
|
Medium
|
Eric Desrochers | ||
Bionic |
Fix Released
|
Undecided
|
Dimitri John Ledkov |
Bug Description
[Impact]
It is not possible to resize NVME partitions in the Ubiquity installer.
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
** See attachment (screenshot) took in action, illustrating the problem:
- resize.png
- resize_
- console_log.png
[Test Case]
To test component(s) in -proposed
-------
https:/
[Section: Installation testing using -proposed]
In order to install successfully from these images, you will normally need to tell the installer to fetch its own components from -proposed as well, which is not the default. To do this, add the following boot parameter:
apt-setup/
-------
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.
SCSI:
qemu-system-x86_64 -drive file=nvme.
** See attachment (screenshot) took in action, illustrating how the installer should react with the fix :
xenial_
xenial_
xenial_
xenial_
[Regression Potential]
* Low risk of regression, with this patch, partman, will be more robust and align with what disk_name() in the kernel does (linux.
whether the last character is a digit.
* The patch may also fixes (or at least prevent for the future) other potential similar devices issue and not only explicitly fixing and/or benefit NVMe device types.
[Other Info]
* Debian upstream bug :
https:/
* Debian upstream fix :
https:/
* Commit [01087125]
Make get_real_device() both simpler and more generic (See: #820818).
Looking at the implementation of the disk_name() function in the kernel
(linux.
whether the last character is a digit.
* $ git describe --contains 01087125e07a7b2
116~2
* $ rmadison partman-
partman-
partman-
partman-
partman-
partman-
partman-
[Original 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.
SCSI:
qemu-system-x86_64 -drive file=nvme.
tags: | added: sts |
Changed in partman-partitioning: | |
status: | Unknown → Fix Released |
Changed in partman-partitioning (Ubuntu Bionic): | |
assignee: | nobody → Dimitri John Ledkov (xnox) |
milestone: | none → ubuntu-17.11 |
description: | updated |
description: | updated |
description: | updated |
Changed in partman-partitioning (Ubuntu Artful): | |
assignee: | nobody → Eric Desrochers (slashd) |
Changed in partman-partitioning (Ubuntu Zesty): | |
status: | New → Won't Fix |
Changed in partman-partitioning (Ubuntu Xenial): | |
assignee: | nobody → Eric Desrochers (slashd) |
Changed in partman-partitioning (Ubuntu Trusty): | |
assignee: | nobody → Eric Desrochers (slashd) |
Changed in partman-partitioning (Ubuntu Artful): | |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in partman-partitioning (Ubuntu Xenial): | |
importance: | Undecided → Medium |
status: | New → Fix Released |
Changed in partman-partitioning (Ubuntu Trusty): | |
importance: | Undecided → Medium |
status: | New → In Progress |
description: | updated |
Changed in partman-partitioning (Ubuntu Xenial): | |
status: | Fix Released → In Progress |
description: | updated |
description: | updated |
Status changed to 'Confirmed' because the bug affects multiple users.