zfsonfreebsd / ZoF

ZFS on FreeBSD - the official out of tree OpenZFS implementation for FreeBSD
https://freebsd.org
Other
100 stars 8 forks source link

bectl rename: cannot umount '/': umount failed #160

Closed evilham closed 4 years ago

evilham commented 4 years ago

\o Further testing OpenZFS on FreeBSD.

I think (because I know I've done this before :-D) that this didn't happen before OpenZFS, maybe someone can confirm.

Say, I want to rename the current boot environment by executing bectl rename 13-current-2020-08-24 13-current, this used to work and now it results in:

# bectl rename 13-current-2020-08-24 13-current
cannot unmount '/': umount failed
unknown error
Failed to rename bootenv 13-current-2020-08-24 to 13-current

The relevant flags from bectl list for the mentoned BE being Active: NR and Mountpoint: /.

ghost commented 4 years ago

The issue is lack of zfs rename -u to rename without unmounting, and the underlying support in libzfs, which is used by libbe and by extension bectl. https://github.com/openzfs/zfs/pull/9319

Linux cannot support this functionality in a kernel module, so the feature was abandoned for the time being. Maybe we can explore providing the feature for FreeBSD only, now that all the major refactoring is done.

evilham commented 4 years ago

Oooh, that makes perfect sense actually, hopefully after The Big Merge these things can be ironed out ^^. Thank you for the explanation!

mattmacy commented 4 years ago

This is tracked by https://github.com/openzfs/zfs/pull/10839