Use persistent device name for vdevs

Bug #1880869 reported by Jean-Baptiste Lallement
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubiquity
Unknown
Unknown
ubiquity (Ubuntu)
Fix Released
High
Jean-Baptiste Lallement
Focal
Fix Released
High
Unassigned

Bug Description

[Impact]

 * ZFS pools were created with device names such as /dev/sdX, /dev/vdX,... However, these names are not stable and may change on each reboot, leading to an unbootable system.

 * "zpool create" now uses persistent device names with PARTUUID instead.

[Test Case]

 * After a fresh installation run the following command:
$ zpool status -P
Verify that the device is something like /dev/disk/by-partuuid/<some id>

$ zpool status -PL
Verify that the device is something like /dev/[s,v,h]dX and corresponds to the device selected during installation.

[Regression Potential]

 * Likely low risk of regression. Worst case system doesn't boot after a fresh installation which is better than today because the system may boot but subsequent boots may not.

[Other Info]

 * Already shipped in Groovy

[Original Bug report]

ZFS pools are currently created with device names such as /dev/sdX, /dev/vdX,... However, this name is not stable and may change on each reboot.
"zpool create" must use persistent device names like UUID or PARTUUID instead.

ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 5.4.0-18.22-generic 5.4.24
Uname: Linux 5.4.0-18-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu36
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Wed May 27 13:52:13 2020
InstallCmdLine: file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash -- keyboard-configuration/layoutcode=fr keyboard-configuration/variantcode=oss
InstallationDate: Installed on 2014-07-15 (2143 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20140520)
SourcePackage: ubiquity
UpgradeStatus: Upgraded to groovy on 2018-03-24 (794 days ago)

Related branches

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Changed in ubiquity (Ubuntu):
assignee: nobody → Jean-Baptiste Lallement (jibel)
importance: Undecided → High
status: New → In Progress
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

Would this be worth SRU'ing into 20.04?

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Yes this is the plan together with several fixes and enhancements of zsys. The SRU work is in progress.

Revision history for this message
Nicolay Doytchev (lightrush) wrote :

Re: SRUing

I just got hit by this. I'm using a laptop that I added a second disk to. That changed the root disk from /dev/sda to /dev/sdb. The rpool got imported fine so boot succeeded. However silently bpool did not get imported. A couple of kernel updates were done over /boot inside rpool and were not reflected in grub. Effectively kernel became frozen at the time when bpool failed to import. I dug through the zsys-setup file and figured I'd add a couple of lines to convert partrpool and partbpool from /dev/sdx to /dev/disk/by-partuuid. After I did that, I opportunistically decided to check how the current source looks like and I saw almost identical lines were added in https://git.launchpad.net/ubiquity/commit/?id=36ea45160d00c9fd940b6d1b760e7a7b9b652625 by @jibel. :D

So yeah, even though this is an EXPERIMENTAL feature, it would be really nice to avoid this gotcha.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 20.10.2

---------------
ubiquity (20.10.2) groovy; urgency=medium

  [ Jean-Baptiste Lallement ]
  * zsys-setup: Use persistent device name for vdevs (LP: #1880869)
  * Only export pools created during installation and containing dataset
    mounted under /target (LP: #1875045)

  [ Dimitri John Ledkov ]
  * Automatic update of included source packages: partman-partitioning
    120ubuntu3. LP: #1796260

 -- Dimitri John Ledkov <email address hidden> Thu, 28 May 2020 22:41:16 +0100

Changed in ubiquity (Ubuntu):
status: In Progress → Fix Released
description: updated
Changed in ubiquity (Ubuntu Focal):
status: New → Triaged
importance: Undecided → High
description: updated
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Jean-Baptiste, or anyone else affected,

Accepted ubiquity into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubiquity/20.04.15.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 on 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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubiquity (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Focal:
I have reproduced the problem with ubiquity 20.04.15 in focal and have verified that the version of ubiquity 20.04.15.1 in -proposed fixes the issue.

Marking as verification-done

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 20.04.15.1

---------------
ubiquity (20.04.15.1) focal; urgency=medium

  [ Sebastien Bacher ]
  * debian/real-po: updated translations from launchpad, including strings
    from the new subpage for RST (LP: #1874103)

  [ Michael Hudson-Doyle ]
  * make grub_default consider the boot argument in the non-removable case
    (LP: #1847898)

  [ Jean-Baptiste Lallement ]
  * Enable ZFS autotrim (LP: #1883686)
  * Use persistent path for pool's vdevs (LP: #1880869)
  * Do not export all pools (LP: #1875045)

  [ Dimitri John Ledkov ]
  * ubiquity-dm: start gsd-keyboard for keyboard indicator (LP: #1847307)

 -- Dimitri John Ledkov <email address hidden> Tue, 16 Jun 2020 11:17:42 +0100

Changed in ubiquity (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubiquity has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.