From owner-freebsd-questions@freebsd.org Thu Feb 11 14:20:58 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E33E95293FF for ; Thu, 11 Feb 2021 14:20:58 +0000 (UTC) (envelope-from jmc-freebsd2@milibyte.co.uk) Received: from cp160176.hpdns.net (cp160176.hpdns.net [91.238.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DbzLx57CFz3pb3 for ; Thu, 11 Feb 2021 14:20:57 +0000 (UTC) (envelope-from jmc-freebsd2@milibyte.co.uk) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=milibyte.co.uk; s=default; h=Content-Type:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mpCF4i1ULukU1EO7VorkwSD6FGKzOP4lrZiqowIvMxY=; b=ZXbaiKQHoCC/X/KQupTo6mNPmA jIkusQTmk5avzVAbkPmWHP4XUdYuUKtloU6xjStM5fn0+e/c/kf0LNmYQcHnl4J+sdxysH1Yixl60 NbZxkvxZvqpXg3hjgVb6u845zwwg8hTPEjVXF2xvWqybzvUhfJmrFUz/1nf4KdCVAkkVoob9mNVuM 7y7UBkEZzsoLGVC8F+xzibNugi/oPhLKpHnQj5huaqicv8G9idgkgP57tfGvN/icSTNIrlLaTL9WZ TGZw6WH4EDTU1HvXcc3Xoaazz9lzey1/fcAtnq+pVKYmc16kfHt1EyKKB7E2DZIjxjf+sCTk6jZdG zDPSA4iQ==; Received: from 82-71-56-121.dsl.in-addr.zen.co.uk ([82.71.56.121]:31781 helo=curlew.milibyte.co.uk) by cp160176.hpdns.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lACpu-001mvP-Dh for freebsd-questions@freebsd.org; Thu, 11 Feb 2021 14:20:50 +0000 Received: from [127.0.0.1] (helo=curlew.localnet) by curlew.milibyte.co.uk with esmtp (Exim 4.94) (envelope-from ) id 1lACpu-00013p-Pl for freebsd-questions@freebsd.org; Thu, 11 Feb 2021 14:20:50 +0000 From: Mike Clarke To: freebsd-questions@freebsd.org Subject: Re: Bootenv containing several filesystems Date: Thu, 11 Feb 2021 14:20:49 +0000 Message-ID: <5361642.mMMZhaHaU6@curlew> In-Reply-To: References: <2068084.5gTYqTD1LS@curlew> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: jmc-freebsd2@milibyte.co.uk X-SA-Exim-Scanned: No (on curlew.milibyte.co.uk); SAEximRunCond expanded to false X-YourOrg-MailScanner-Information: Please contact the ISP for more information X-YourOrg-MailScanner-ID: 1lACpu-001mvP-Dh X-YourOrg-MailScanner: Found to be clean X-YourOrg-MailScanner-SpamCheck: X-YourOrg-MailScanner-From: jmc-freebsd2@milibyte.co.uk X-Spam-Status: No X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cp160176.hpdns.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - milibyte.co.uk X-Get-Message-Sender-Via: cp160176.hpdns.net: authenticated_id: mailpool@milibyte.co.uk X-Authenticated-Sender: cp160176.hpdns.net: mailpool@milibyte.co.uk X-Source: X-Source-Args: X-Source-Dir: X-Rspamd-Queue-Id: 4DbzLx57CFz3pb3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=milibyte.co.uk header.s=default header.b=ZXbaiKQH; dmarc=none; spf=pass (mx1.freebsd.org: domain of jmc-freebsd2@milibyte.co.uk designates 91.238.160.176 as permitted sender) smtp.mailfrom=jmc-freebsd2@milibyte.co.uk X-Spamd-Result: default: False [-2.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; HAS_X_SOURCE(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[milibyte.co.uk:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; HAS_X_ANTIABUSE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[91.238.160.176:from]; CTE_CASE(0.50)[]; ASN(0.00)[asn:12703, ipnet:91.238.160.0/22, country:GB]; HAS_X_AS(0.00)[mailpool@milibyte.co.uk]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[milibyte.co.uk:s=default]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[milibyte.co.uk]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[91.238.160.176:from:127.0.2.255]; HAS_X_GMSV(0.00)[mailpool@milibyte.co.uk]; MID_RHS_NOT_FQDN(0.50)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2021 14:20:58 -0000 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