From nobody Wed Jun 28 02:13:16 2023 X-Original-To: dev-commits-src-main@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 4QrQ990ZSxz4kT36; Wed, 28 Jun 2023 02:13:17 +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 4QrQ990122z3pqd; Wed, 28 Jun 2023 02:13:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687918397; 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=EyZooF1TO8tT5oYUK18kFSNgKmurHnVBVvfkzPCY5LY=; b=kRbC89eTCxOBDjje2FnldcCHD2Mk4XDCTEmGZoIUpjY4xaHEF/qElDkH+Xq3UIS3UiBi4S c4oAgLMLajmXOhnfikM1//1Rmq3jtUhvPCEqoh/yrx+XeEroq0DYrDq2jUho993ekSGa0m x4pQsup/dHoBMxFXZtCw6FAQ13hsuYl6C3BWUFKIIbjU2k685mXkbfqpt0gV8BqsCrDdfb 5wL0bIV/dDnw7uOLGwLNRDCyvQMvG5hvpacBBrQ8VcZkMEukNzxmNNeTF7109Wz+d2w93k CKspigXO0+Sybu055B0C6nBoJch8lGfCgcdirkzq7vt1aGJkVBhVEKZOJJlZ7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687918397; 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=EyZooF1TO8tT5oYUK18kFSNgKmurHnVBVvfkzPCY5LY=; b=DzAR8alWctst4Ab9tE0jEJg8WH6GGqvGp85AfTq7shgYM7AzvzLZxmUja5LR44AiRdX+cq RCCa7hBQcN45o4XDOzCRVel11/SPG7UcWsDq4mmCodez2IVIjnO7f58AMb3W39miUjwCtZ f9hu2dkkz7n1e0iTOeW9qrXJtv3j8iuLyRvSwmyfhbWfUxGxNemKaNMFwqQIGBRwuL1jFx C4Cf6jVmIaEieInDqJD5MgYEuKm+2ZvDS7qY4MKn0FWtB/2PCKKCCXgf8X4HMKKFJWmZnk fpTCXxEDa2c2wJk1kT7edYNnOfycpH5QllJqLKgYYnCEBUeNHH8HhMRLX5132A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687918397; a=rsa-sha256; cv=none; b=kZD98fhEbgQVAJc1PwK+GGoK6wvNzA/tTWu9Tpn28oe9ICFr9DeWaGWNM5fS2mtD8DxUkI /TWCzRReLA7jP8I6lGGvjJMyBAe9G7XrfR+Q3Kai+S6G0x8M+CBWe8jYPM6aoqFpjMtKzh kRETD+VJmLjxdAEV7AEI7OF7/eaCaoVWq2mlBb/3F+xztkqDvOjUrHZ+dJeRqxZ2tpqetC bSZG/ROP2AZMgScwcnLGIsDa/kXn8vtt7WmZkatWyQLHRszoClt5Yo0SfZoiyDPhF2hjtk jN6ZGdWjlsqcFGSvEBaH+47oLpihEeEYg2sNEyw/mu1yEZNziSf8tsd4YaeTeg== 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 4QrQ986DTRzGTk; Wed, 28 Jun 2023 02:13:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35S2DGa1011715; Wed, 28 Jun 2023 02:13:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35S2DGr6011714; Wed, 28 Jun 2023 02:13:16 GMT (envelope-from git) Date: Wed, 28 Jun 2023 02:13:16 GMT Message-Id: <202306280213.35S2DGr6011714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 6927176113ee - main - bectl(8): clarifications, expansion List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6927176113ee775983952edb3c201fed6be318d3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=6927176113ee775983952edb3c201fed6be318d3 commit 6927176113ee775983952edb3c201fed6be318d3 Author: Graham Perrin AuthorDate: 2023-06-28 02:05:26 +0000 Commit: Graham Perrin CommitDate: 2023-06-28 02:05:26 +0000 bectl(8): clarifications, expansion Reviewed-by: imp Pull-request: https://github.com/freebsd/freebsd-src/pull/728 --- 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 61efabb98df4..20ab6e541d38 100644 --- a/sbin/bectl/bectl.8 +++ b/sbin/bectl/bectl.8 @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 24, 2023 +.Dd June 28, 2023 .Dt BECTL 8 .Os .Sh NAME @@ -25,6 +25,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 @@ -89,18 +91,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 @@ -119,10 +117,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 @@ -194,7 +195,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 @@ -321,18 +322,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 @@ -347,10 +350,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 @@ -374,14 +395,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 @@ -455,7 +472,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 @@ -474,6 +491,7 @@ flags. \" .El .Sh SEE ALSO .Xr libbe 3 , +.Xr zfsprops 7 , .Xr beinstall.sh 8 , .Xr jail 8 , .Xr zfs 8 ,