From nobody Fri Mar 22 09:15:03 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V1Gr73SF6z5G9Cv; Fri, 22 Mar 2024 09:15:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V1Gr72x1hz4Xvq; Fri, 22 Mar 2024 09:15:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711098903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f5g/3F4m+kyriV31egIqwxFoo+B78Cs9FrInJLNKaTo=; b=x+muIrASmcZU4a18+x6lz+bV14jboQskYoGMYuQivtjJSQZBVjoGjSIPFUyaR8aUYmAfvO AyTFFqACJsQ7t5byhknywmJkmVabqgH/mk0y/kDZWskrweqN82Ed44HK6uPO1XdYovbVP6 6/SZo/HQu4EYuBURJZo40ZkbnkLlUOFdMWLyMPCmrDGOz0RwlHLYf9fvh3bqMhCCHsuKfA Nqj/O6dlCu5uAYcZsj7lxyms+hcbgSYPgWt/Jw2xT1UWL7fS0Ws2wwgUcs1zhZjUIlEJdO 1uJJqzhkQz+LQpmf+VZbaXL8bhp4qXYoleMKoee65pxsTYBtWkZUWfc0I+ghvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711098903; a=rsa-sha256; cv=none; b=CooTTImHQd19dmQemvUd6j3GkxVrNGa1KwUlhHgkpucIWOAg5HVJ2fxoIblQVqybVehw8T FBGnwSkWV6ch2OCKbRukq11piFv+K2m4HaQtCP4Ltwn5Oji8HmESjnx2B+5dtpGbky71jI wtI0tAXHkoyAPI7OjeFWIf/pa/l0Cy6Q8ofkItofdx957cNNQnP0WB7ZeOLmd5yrlxXujD rHFZeOarX5STCEyx8QsragYG3abWuRh8JeaMULSKgH73HmTpCGh5qUlC7Zuz0elDeC2fWA 24ctPNOtiaFtJ0a7lI0oeHEkcbLD8GCoM7e6oKLppwXTcw1XuzjGWDlK1GyF5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711098903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f5g/3F4m+kyriV31egIqwxFoo+B78Cs9FrInJLNKaTo=; b=c4B4nRSTxURWYhCX5GMbTyoxFoy66IXx78EgOO6E2InHu8Kf2NWDd19vlTRGgWtoUbOdjt 7DZ9kugfSfOKI81ZiksMPxXsSHuZWRWFrxJZ/lAD14P18enXO9CO5P9VYo9fAHxIe4WXfe oe+po0k89W/a4DfXQ/NP4ZPVYd+V8947eJsT7H3I+DPDHL+3P7ubXNX5rVoFTvBUNr2i4E clGW1sXcSpWdYdJNAwl4qQqSIM60rLL29kL01otldTA6aWmnVXXwJ1pzow3k5UqzUsQtiP nA1cibsM3YgebREDYKz2YbC9xhxpnUoiVX5j4hzF/P3yPC2qUlmo3kCy1kytHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V1Gr72XZzz1CrS; Fri, 22 Mar 2024 09:15:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42M9F3lK061869; Fri, 22 Mar 2024 09:15:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42M9F3Hs061866; Fri, 22 Mar 2024 09:15:03 GMT (envelope-from git) Date: Fri, 22 Mar 2024 09:15:03 GMT Message-Id: <202403220915.42M9F3Hs061866@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 20d97b6cbd74 - stable/13 - bectl(8): clarifications, expansion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 20d97b6cbd7487eb930190e7a8d2d09f0f38a20e Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=20d97b6cbd7487eb930190e7a8d2d09f0f38a20e commit 20d97b6cbd7487eb930190e7a8d2d09f0f38a20e Author: Graham Perrin AuthorDate: 2023-06-28 02:05:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-03-22 08:07:34 +0000 bectl(8): clarifications, expansion Reviewed-by: imp Pull-request: https://github.com/freebsd/freebsd-src/pull/728 (cherry picked from commit 6927176113ee775983952edb3c201fed6be318d3) --- sbin/bectl/bectl.8 | 68 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 25 deletions(-) diff --git a/sbin/bectl/bectl.8 b/sbin/bectl/bectl.8 index 2b2dd02bc8ef..45c676a7876c 100644 --- a/sbin/bectl/bectl.8 +++ b/sbin/bectl/bectl.8 @@ -15,7 +15,7 @@ .\" .\" @(#)be.1 .\" -.Dd April 26, 2023 +.Dd June 28, 2023 .Dt BECTL 8 .Os .Sh NAME @@ -23,6 +23,8 @@ .Nd Utility to manage boot environments on ZFS .Sh SYNOPSIS .Nm +.Op Fl h\&? +.Nm .Op Fl r Ar beroot .Cm activate .Op Fl t | Fl T @@ -87,18 +89,14 @@ .Brq Cm umount | unmount .Op Fl f .Ar beName -.Pp -.Nm -.Op Fl h\&? .Sh DESCRIPTION The .Nm command is used to setup and interact with ZFS boot environments, which are bootable clones of datasets. .Pp -Boot environments -allow the system to be upgraded, while preserving the old system environment in -a separate ZFS dataset. +A boot environment allows the system to be upgraded, while preserving the +pre-upgrade system environment. .Pp .Nm itself accepts an @@ -117,10 +115,13 @@ one of the system's resident disks will require the .Fl r flag to work. .Pp -The following commands are supported by -.Nm : +.Ss Supported Subcommands and Flags .Bl -tag -width activate .It Xo +.Fl h | +.Fl \&? +Print usage information. +.It Xo .Cm activate .Op Fl t | Fl T .Ar beName @@ -192,7 +193,7 @@ See .Sx Boot Environment Structures for a discussion on different layouts. .Pp -No new boot environment is created with this command. +No new boot environment is created with this subcommand. .It Xo .Cm destroy .Op Fl \&Fo @@ -319,18 +320,20 @@ arbitrary white space. .It Fl s Display all snapshots as well. .It Fl c Ar property -Sort boot environments by given property name. +Sort boot environments by the given ZFS dataset property. The following properties are supported: .Pp .Bl -tag -width 4n -offset indent -compact -.It name (default output) +.It name (the default) .It creation .It origin .It used -.It usedds -.It usedsnap -.It usedrefreserv +.It usedbydataset +.It usedbyrefreservation +.It usedbysnapshots .El +.Pp +Short forms usedds, usedrefreserv and usedsnap are also supported. .It Fl C Ar property Same as the .Fl c @@ -345,10 +348,28 @@ or .Fl a option is used. .It Cm mount Ar beName Op Ar mountpoint -Temporarily mount the boot environment. -Mount at the specified +Mount the given boot environment. +.Pp +If a nonexistent .Ar mountpoint -if provided. +is given: +.Nm +will make the directory, including intermediate directories as required. +.Pp +If no +.Ar mountpoint +is given: +.Nm +will make a directory such as +.Pa be_mount.c6Sf +in +.Pa /tmp . +Randomness in the last four characters of the directory name will prevent +mount point conflicts. +Unmount of an environment, followed by mount of the same environment +without giving a +.Ar mountpoint , +will result in a different randomly-named mountpoint. .It Cm rename Ar origBeName newBeName Rename the given .Ar origBeName @@ -372,14 +393,10 @@ Unmount the given boot environment, if it is mounted. Specifying .Fl f will force the unmount if busy. +.Pp +Unmount will not remove the mount point. .El .Pp -.Nm -prints usage information if -.Fl h -or -.Fl \&? -is specified. .Ss Boot Environment Structures The traditional .Fx @@ -452,7 +469,7 @@ In this example, is excluded from the boot environment. .Pp .Nm -commands that have their own +subcommands that have their own .Fl r operate on this second, .Dq deep @@ -471,6 +488,7 @@ flags. \" .El .Sh SEE ALSO .Xr libbe 3 , +.Xr zfsprops 7 , .Xr beinstall.sh 8 , .Xr jail 8 , .Xr zfs 8 ,