Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Feb 2021 14:20:49 +0000
From:      Mike Clarke <jmc-freebsd2@milibyte.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Bootenv containing several filesystems
Message-ID:  <5361642.mMMZhaHaU6@curlew>
In-Reply-To: <CADqw_g+ThFJd8c0s-0=mKL-4VAbE6t+enW31RpuWbLAk1_NrPg@mail.gmail.com>
References:  <CADqw_gKG6ovTuN7bZvYy7PCydfCXH4M2fw68YLmLvZhxi-g2xw@mail.gmail.com> <2068084.5gTYqTD1LS@curlew> <CADqw_g+ThFJd8c0s-0=mKL-4VAbE6t+enW31RpuWbLAk1_NrPg@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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





Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?5361642.mMMZhaHaU6>