From nobody Mon Oct 31 03:51:31 2022 X-Original-To: dev-commits-src-branches@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 4N0zjJ0lNLz4gVS7; Mon, 31 Oct 2022 03:51:32 +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 4N0zjJ0JZhz3cnD; Mon, 31 Oct 2022 03:51:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667188292; 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=51lXd2Ox+k1/PpsBQochjU2prsRMCWdChXQdy1Kg2xg=; b=Lf8Z8/NaHB4/+sWNvkFKd3ZHROsu1ObRUXiQkj+BjWVm5+eYk0LKcKxCjnqY6DmX18toLa Dm0jG+mTLsqDl+ScRI9hKE8tugljEEK5ikiVnxcFEXeH3sx5yZE4UBbHB1MWDLQ6zdga9u iVYciCdjV4yDk9T896Cj9Lj3GlOhGM7PsFK9AuO0Y4kCo8kthrI9HX8KN5n0LPgfFBNuNk u4hR6GRpj3dsVLDJYCbTrjFE8wX3z1T5sV68Pfe5BHxUdsCxVJ7GzlBTQFzV24QOS/7W/w HTBv64vN076yWk4qDAldUDJersxz0zlpOaiwddm87K9TonQP1zlR48jDvigbGw== 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 4N0zjH6SfpzMj1; Mon, 31 Oct 2022 03:51:31 +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 29V3pVEX072024; Mon, 31 Oct 2022 03:51:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29V3pVFJ072023; Mon, 31 Oct 2022 03:51:31 GMT (envelope-from git) Date: Mon, 31 Oct 2022 03:51:31 GMT Message-Id: <202210310351.29V3pVFJ072023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: de1f80e4c138 - stable/12 - Add a description of soft updates journaling to tunefs(8). List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: de1f80e4c1386614a8b6c7b31d861d20930995cc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667188292; 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=51lXd2Ox+k1/PpsBQochjU2prsRMCWdChXQdy1Kg2xg=; b=YoXGkJXNpCZWDvWLzI4Cf7ZdrOKAXSl7e5zyorgm5xGdOl964vmK8ankNPtu9XrJ+/qZfF DPbq3FXSZDxZthRgxYd257tj1wmZCA5fruZoy4zNcdADfye1fRsDL65dYUWgA8pnQBRgbT XazdEx7yv4MxBGSChJ40GXqpXrthR0/FQP9AtIJmqe5h6PSiMTPy9iJj7wh/Hcg2X4iuCZ VFXgJ2RFxxqmYbdpAD/jEBdZGfs5f4RTM81Zbk1bLrD+CX2tUuXFB4DuiREpnwA56K9lUJ hN6gyoPZPdyN9Mpha97fOa/cLbQZ7ZKC3H/C2/5fgt3QrrzASf96gfIGNUCecw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667188292; a=rsa-sha256; cv=none; b=LlSK4Z8gNTh4laC8yRGPu7sn8IZlysOVewzSWJZExgxhYbKOLMQ+LJ7VdPbi70o5GkfR7F wA/fUvqN4pCv25BVUdeniVY4jprPKUpvw9pCX7LLuoGB/1eyFKg4dm75Hcgjc0Fjcf7aVG dulvM4GrHxHig+WPz7mEaXS4fSfUpouawvjKuQEt8eRffA5JFSFZbdbRlYwZMDIhYjFD6O tcPSUC6170AORFw0MXfEKIGcep2rKcw6LpotQGtkCYfc8twSdMkdckikQNSoGILXypH6J9 NabX/JVkqwxkiB7ZVEkZxRtjXOMqKtrD0QMh2B0IivtclPvj60kwxl83E+NFZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=de1f80e4c1386614a8b6c7b31d861d20930995cc commit de1f80e4c1386614a8b6c7b31d861d20930995cc Author: Kirk McKusick AuthorDate: 2022-08-15 20:44:49 +0000 Commit: Kirk McKusick CommitDate: 2022-10-31 03:49:17 +0000 Add a description of soft updates journaling to tunefs(8). Requested by: Graham Perrin PR: 261944 Sponsored by: The FreeBSD Foundation (cherry picked from commit 82493ff7007abb5a2d059c74748d2907dafc5395) --- sbin/tunefs/tunefs.8 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/sbin/tunefs/tunefs.8 b/sbin/tunefs/tunefs.8 index 065844a831cd..5ad0210694d4 100644 --- a/sbin/tunefs/tunefs.8 +++ b/sbin/tunefs/tunefs.8 @@ -95,6 +95,46 @@ this parameter should be set higher. Specify the expected average file size. .It Fl j Cm enable | disable Turn on/off soft updates journaling. +.Pp +Enabling journaling reduces the time spent by +.Xr fsck_ffs 8 +cleaning up a filesystem after a crash to a few seconds from minutes to hours. +Without journaling, the time to recover after a crash is a function +of the number of files in the filesystem and the size of the filesystem. +With journaling, the time to recover after a crash is a function of the +amount of activity in the filesystem in the minute before the crash. +Journaled recovery time is usually only a few seconds and never +exceeds a minute. +.Pp +The drawback to using journaling is that the writes to its log adds +an extra write load to the media containing the filesystem. +Thus a write-intensive workload will have reduced throughput on a +filesystem running with journaling. +.Pp +Like all journaling filesystems, the journal recovery will only fix +issues known to the journal. +Specifically if a media error occurs, +the journal will not know about it and hence will not fix it. +Thus when using journaling, it is still necessary to run a full fsck +every few months or after a filesystem panic to check for and fix +any errors brought on by media failure. +A full fsck can be done by running a background fsck on a live +filesystem or by running with the +.Fl f +flag on an unmounted filesystem. +When running +.Xr fsck_ffs 8 +in background on a live filesystem the filesystem performance +will be about half of normal during the time that the background +.Xr fsck_ffs 8 +is running. +Running a full fsck on a UFS filesystem is the equivalent of +running a scrub on a ZFS filesystem. +.Pp +Presently it is not possible to take a snapshot on a UFS filesystem +running with journaled soft updates. +Thus it is not possible to reliably dump mounted filesystems or +to run background fsck on filesystems enabled for journaling. .It Fl J Cm enable | disable Turn on/off gjournal flag. .It Fl k Ar held-for-metadata-blocks