Begin importing ZFS root pool rpoo. Failure 1

Bug #2049761 reported by geole0
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
subiquity
Invalid
Undecided
Unassigned

Bug Description

Hello.
This message only appears at the first start of Ubuntu Noble installed in a ZFS version.
I suspect the installer forgot to export the pools when it ends.

A part of the message:
Begin importing ZFS root pool rpool.
Failure 1
Command /sbin/zpool import -c /etc/zfs/zpool .cache -N 'rpool'
Message cannot import 'rpool' pool was previously in use from another system. Last access.....
The pool can be imported, use zpool import -f to import the pool.

It is therefore necessary to strike
zpool import -f rpool
zpool import -f bpool
exit

then the startup continues.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: subiquity (unknown)
ProcVersionSignature: Ubuntu 6.6.0-14.14-generic 6.6.3
Uname: Linux 6.6.0-14-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.27.0-0ubuntu6
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Thu Jan 18 14:21:11 2024
InstallationDate: Installed on 2024-01-18 (0 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Daily amd64 (20240116)
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: subiquity
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
geole0 (geole0) wrote :
Revision history for this message
Richard Hesketh (richh-bbc) wrote :

I also have this issue, currently testing deployment of 24.04 on our infrastructure. Having the installer export the zpool before reboot seems like it should fix the problem.

In the meantime I have worked around it - as it's not possible to preseed the zpool export as a late-command and have the installer exit cleanly (it explodes at the final step of copying the installer logs to the target system, which happens after late-commands have run) I have instead added late-commands to manipulate the installer /etc/hostid to match the target and then bounce the zpool, as zfs uses this hostid to determine which system a pool belongs to.

    - cp /target/etc/hostid /etc/hostid
    - umount -l /target
    - zpool export rpool
    - zpool import rpool -f
    - mount -t zfs -o zfsutil rpool/ROOT/zfsroot /target

Our disk configuration doesn't use a bpool but I assume adding the relevant export/import would work for that case.

Revision history for this message
Dan Bungert (dbungert) wrote :

Subiquity doesn't export the pools immediately, to allow inteacting with the target system prior to reboot. Once the install is done done - and the reboot button is clicked in the installer, then the very last steps of the install including zpool export happens.

In the case of the listed bug logs, I see unattended-upgrades is still running, so I would expect this result.

I don't believe there is particular action required in the installer, as zpool export already happens during clean exit and reboot of the install. Though perhaps there is room for UX improvements to make this clearer.

Changed in subiquity:
status: New → Invalid
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.