[Bug 1867007] [NEW] ZFS won't boot if multiple rpools found
Kevin Menard
kevin at nirvdrum.com
Wed Mar 11 13:54:46 UTC 2020
Public bug reported:
I had an Ubuntu old installation that used a ZFS root, using the layout
described in the ZFS on Linux docs. Consequently, the pool name for my
Ubuntu installation was "rpool". I'm currently encountering an issue
with that pool that only allows me to mount it read-only. So, I'd like
to replicate the datasets from there to a new device.
On the new device, I've set up a ZFS system using the Ubuntu 20.04 daily
installer (March 9, 2020). This setup creates a new pool named "rpool".
So, with both devices inserted, I have two distinct pools each named
"rpool", one of which will kernel panic if I try to mount it read-write.
ZFS is fine with having multiple pools with the same name. In these
cases, you use `zfs import` with the pool's GUID and give it a distinct
pool name on import. However, the grub config for booting from ZFS
doesn't appear to handle multiple pools with the same rpool name very
well. Rather than using the pool's GUID, it uses the name, and as such,
it's unable to boot properly when another pool with the name "rpool" is
attached to the system.
I think it'd be better if the config were written in such a way that
`update-grub` generated boot config bound to whatever pool it found at
the time of its invocation, and not start searching through all pools
dynamically upon boot. Just to be clear, I have an Ubuntu 20.04 system
with a ZFS root that boots just fine. But, the moment I attach the old
pool, also named "rpool", I'm no longer able to boot up my system even
though I haven't removed the good pool and I haven't re-run `update-
grub`. Instead of botoing, I'm thrown into the grub command line.
** Affects: grub2 (Ubuntu)
Importance: Undecided
Status: New
** Description changed:
I had an Ubuntu old installation that used a ZFS root, using the layout
described in the ZFS on Linux docs. Consequently, the pool name for my
Ubuntu installation was "rpool". I'm currently encountering an issue
with that pool that only allows me to mount it read-only. So, I'd like
to replicate the datasets from there to a new device.
On the new device, I've set up a ZFS system using the Ubuntu 20.04 daily
installer (March 9, 2020). This setup creates a new pool named "rpool".
So, with both devices inserted, I have two distinct pools each named
"rpool", one of which will kernel panic if I try to mount it read-write.
ZFS is fine with having multiple pools with the same name. In these
cases, you use `zfs import` with the pool's GUID and give it a distinct
pool name on import. However, the grub config for booting from ZFS
doesn't appear to handle multiple pools with the same rpool name very
well. Rather than using the pool's GUID, it uses the name, and as such,
it's unable to boot properly when another pool with the name "rpool" is
attached to the system.
I think it'd be better if the config were written in such a way that
`update-grub` generated boot config bound to whatever pool it found at
the time of its invocation, and not start searching through all pools
dynamically upon boot. Just to be clear, I have an Ubuntu 20.04 system
with a ZFS root that boots just fine. But, the moment I attach the old
pool, also named "rpool", I'm no longer able to boot up my system even
though I haven't removed the good pool and I haven't re-run `update-
- grup`. Instead of botoing, I'm thrown into the grub command line.
+ grub`. Instead of botoing, I'm thrown into the grub command line.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1867007
Title:
ZFS won't boot if multiple rpools found
Status in grub2 package in Ubuntu:
New
Bug description:
I had an Ubuntu old installation that used a ZFS root, using the
layout described in the ZFS on Linux docs. Consequently, the pool name
for my Ubuntu installation was "rpool". I'm currently encountering an
issue with that pool that only allows me to mount it read-only. So,
I'd like to replicate the datasets from there to a new device.
On the new device, I've set up a ZFS system using the Ubuntu 20.04
daily installer (March 9, 2020). This setup creates a new pool named
"rpool". So, with both devices inserted, I have two distinct pools
each named "rpool", one of which will kernel panic if I try to mount
it read-write.
ZFS is fine with having multiple pools with the same name. In these
cases, you use `zfs import` with the pool's GUID and give it a
distinct pool name on import. However, the grub config for booting
from ZFS doesn't appear to handle multiple pools with the same rpool
name very well. Rather than using the pool's GUID, it uses the name,
and as such, it's unable to boot properly when another pool with the
name "rpool" is attached to the system.
I think it'd be better if the config were written in such a way that
`update-grub` generated boot config bound to whatever pool it found at
the time of its invocation, and not start searching through all pools
dynamically upon boot. Just to be clear, I have an Ubuntu 20.04 system
with a ZFS root that boots just fine. But, the moment I attach the old
pool, also named "rpool", I'm no longer able to boot up my system even
though I haven't removed the good pool and I haven't re-run `update-
grub`. Instead of botoing, I'm thrown into the grub command line.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1867007/+subscriptions
More information about the foundations-bugs
mailing list