Bootenv containing several filesystems
Mike Clarke
jmc-freebsd2 at milibyte.co.uk
Thu Feb 11 14:20:58 UTC 2021
On Wednesday, 10 February 2021 21:32:37 GMT Michael Schuster wrote:
> I have:
>
> $ zfs list | egrep 'BE_20210206_175312_CURRENT14|src'
> tank/ROOT/BE_20210206_175312_CURRENT14 30.9G 340G 24.3G /
> tank/usr/src 2.32G 340G 2.26G /usr/src
> $
>
> ... which I guess also explains why for me bectl list and beadm list
> produce similar output.
>
> my working zfs knowledge is a bit rusty; is there a trivial way of getting
> my /usr/{src|ports} under the current BE?
> thx
Something like this should work, assuming BE_20210206_175312_CURRENT14 is the
currently active BE. It's based on memory of what I did in the
past for something similar so I can't be 100% certain that it will work for
you but it should provide a usable guide. Make sure you have a backup and
check that each step does what was expected before going to the next.
# Move /usr/src temporarily out of the way
umount /usr/src
mount -t zfs tank/usr/src /mnt
# Make sure the directory /usr/src exists. Create a new empty directory if it
doesn't. If it exists and isn't empty delete the contents.
# Move existing data /usr/src into the BE
mv /mnt/usr/src/* /usr/src
# Check that all went well and destroy the old /usr/src dataset
umount /mnt
zfs destroy tank/usr/src
The contents of your original /usr/src should now be included in
BE_20210206_175312_CURRENT14 and all new BEs created from it but NOT in any
of your other BEs or their descendants. You will need to reinstall it from
the corresponding svn or git revision in each of the other BEs if you want to
use them.
--
Mike Clarke
More information about the freebsd-questions
mailing list