Page MenuHomeFreeBSD

bectl(3)/libbe(3): Allow BE root to be specified
ClosedPublic

Authored by kevans on Nov 18 2018, 2:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 11 2024, 10:52 PM
Unknown Object (File)
Dec 21 2023, 10:23 AM
Unknown Object (File)
Jul 31 2023, 6:00 PM
Unknown Object (File)
Jul 31 2023, 5:58 PM
Unknown Object (File)
Jul 31 2023, 5:57 PM
Unknown Object (File)
Jul 31 2023, 5:13 PM
Unknown Object (File)
Jun 3 2023, 7:47 AM
Unknown Object (File)
May 28 2023, 10:22 PM
Subscribers

Details

Summary

(I think now is the time to change the API slightly, if I'm going to)

Add an undocumented -r option preceding the bectl subcommand to specify a BE root to operate out of. This will remain undocumented for now, as some caveats apply:

  • BEs cannot be activated in the pool that doesn't contain the rootfs
  • bectl create cannot work out of the box without the -e option right now, since it defaults to the rootfs and cross-pool cloning doesn't work like that (IIRC)

Plumb the BE root through to libbe(3) so that some things -can- be done to it, e.g. bectl -r tank/ROOT create -e default upgrade && bectl -r tank/ROOT mount upgrade /mnt -- this aides in some upgrade setups where rootfs is not necessarily ZFS, and also makes it easier/possible to regression-test bectl when combined with a file-backed zpool.

Test Plan
  • Poke @philip into removing one set of mounts from his upgrade procedure using bectl -r

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

create also needs to learn about zpool altroot, or else it screws things up.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 19 2018, 2:12 AM
This revision was automatically updated to reflect the committed changes.

Thank you! I'll give this patch a try on my crazy rerooted setup later today.