Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set bootfs on pool with indirect vdevs #11762

Closed
mmatuska opened this issue Mar 16, 2021 · 5 comments · Fixed by #11763
Closed

Unable to set bootfs on pool with indirect vdevs #11762

mmatuska opened this issue Mar 16, 2021 · 5 comments · Fixed by #11763
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@mmatuska
Copy link
Contributor

System information

All ZFS versions since device removal feature on both FreeBSD and Linux

Describe the problem you're observing

When a vdev is removed and becomes indirect, the bootfs property cannot be set on a pool.
I do not see the point why setting this property should not be allowed.
FreeBSD boot loader is capable of booting from indirect vdevs so this kills the management of bootability of the pool on FreeBSD.

This limitation was introduced in a1d477c by @ahrens

Describe how to reproduce the problem

dd if=/dev/zero of=/tmp/file1 bs=1M count=512
dd if=/dev/zero of=/tmp/file2 bs=1M count=512
zpool create testpool /tmp/file1 /tmp/file2
zpool remove testpool /tmp/file2
zpool set bootfs=testpool testpool

Include any warning/errors/backtraces from the system logs

cannot set property for 'testpool': operation not supported on this type of pool

References

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254349

Original reporter

Eric van Gyzen @vangyzen

@mmatuska mmatuska added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Mar 16, 2021
@mmatuska
Copy link
Contributor Author

@tsoome could you please tell if our loader officially supports booting on pools with removed vdevs? It looks like you have been handling VDEV_TYPE_INDIRECT code in there: freebsd/freebsd-src@b1b9326

If not, this can become dangerous for people removing vdevs from their boot pools.

@tsoome
Copy link
Contributor

tsoome commented Mar 16, 2021

@tsoome could you please tell if our loader officially supports booting on pools with removed vdevs? It looks like you have been handling VDEV_TYPE_INDIRECT code in there: freebsd/freebsd-src@b1b9326

If not, this can become dangerous for people removing vdevs from their boot pools.

pools with removed vdevs should be fine. at least last time when I did test, it was ok:)

@vangyzen
Copy link

My workstation, running FreeBSD main from 2020-12-25, boots from such a pool. That's how I found the issue. My old SSD was failing, so I migrated to a new one. For historical reasons, my pool was split across two partitions on the old disk. I wanted to use only one on the new disk, so I didn't use mirroring for the migration. I simply added and removed vdevs.

mmatuska added a commit to mmatuska/zfs that referenced this issue Mar 16, 2021
The FreeBSD boot loader relies on the bootfs property and is capable
of booting from removed (indirect) vdevs.

Signed-off-by: Martin Matuska <mm@FreeBSD.org>
Closes openzfs#11762
@nabijaczleweli
Copy link
Contributor

Closable? Seems to've landed in #11763

@ghost ghost linked a pull request May 27, 2021 that will close this issue
13 tasks
@ghost
Copy link

ghost commented May 27, 2021

Fixed by #11763

@ghost ghost closed this as completed May 27, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants