From nobody Mon Aug 15 20:46:18 2022 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 4M65sk6WJWz4Yt76; Mon, 15 Aug 2022 20:46:18 +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 4M65sk5ckTz3WfT; Mon, 15 Aug 2022 20:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660596378; 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=PWziT8P14CsKNIdGSHAWiSEbEusSq3sFG+Xi2wtgQAA=; b=IN9GQyJBuMGlY14CrnPDOdaMqd2ooq4lpO1UiGJEMHFa8QOfFaPSbaOmYW16UFjKnZjDog 3IPfUNOoXms/3OwnZ0vko9KTdYyK5b9vwdQiVzN41RcSedzQ+mdmV2o95MCzw8urexFzbM P4L3o4ze5paAmoADjUhxdzP71cJ/d5NrCpEwPSPLjDx58SrCexVG/AwRG4Fx8Cvj/Q0vRl BspZc8I9nsOuXJyAPQFijDTASyD7HLqTmsFkdFPQTKweRadDoe37+EmpIvMQ8Wo5GlR12D y07i935g6MQuXW0YtlVOv2acfA6ON/rj1Oy12I+L2/VUNO+1eaNA6mdx/BDgSA== 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 4M65sk4KhDzkDX; Mon, 15 Aug 2022 20:46:18 +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 27FKkIUn096823; Mon, 15 Aug 2022 20:46:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27FKkIP8096822; Mon, 15 Aug 2022 20:46:18 GMT (envelope-from git) Date: Mon, 15 Aug 2022 20:46:18 GMT Message-Id: <202208152046.27FKkIP8096822@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 82493ff7007a - main - Add a description of soft updates journaling to tunefs(8). 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: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82493ff7007abb5a2d059c74748d2907dafc5395 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660596378; 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=PWziT8P14CsKNIdGSHAWiSEbEusSq3sFG+Xi2wtgQAA=; b=chsCU+B9D9e5tss2y8w1QL4qfRPj1OZXJ6UfuwsDcp/kemdpPv+QyG9DbGniuVaQX0W9b6 sjnGfNvt/r8MimNQbyRFiQuYRHiT6nn5Fy3Vkj+aqu2afQLPNNS88Bzek722C0VRLS0lTH Uy+qmK9pgmikNJKzfstFasR+ByNCEAtTV354TnIuADYIblwLRGtX2akQTRAjpxPuZG2BRf 9fJGEKqfoTKh313l8QC6q4AXOwzX6+nXbqxOot/b5dyQlfooiDeaTU9jTr+peNbyatm0sQ Hc749imPf2XON4T/OMd9zwJHNUvS9W6VlX6uGGA/F9qTXjYbsFbJ/4vbDoaMRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660596378; a=rsa-sha256; cv=none; b=D9tt1lf98IwhRADeK7geidp6JDwV1Mph5UPLowyifwOMo2CQQVUmSyVY81J6lrXD25QOBC 07p/z1OmTbtSu8Yl8Jwm66NBXaLHzDqav5DyRkUQt/1+jedCPaugpPJ3mOoYTUeOjYU10R tVyz/HneVmeRLlIlRSAB2DrnBsOQrAyvf9YpH4EzPAGAnz8cAgAjTPkyjD1iLY7Sd0MK8j I3/M7HrF/LwWGtbIrPBUH2GJCQ2I0ma2bzdJGmk1/ciE8JRTVbmXGM7OG50WC36JUsP3RF oVnULGHhnhSJnEnzw0ezLKffR/TKOMxZ6uOJwWUGre3VRCuqBNvEaDPeQxJH8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=82493ff7007abb5a2d059c74748d2907dafc5395 commit 82493ff7007abb5a2d059c74748d2907dafc5395 Author: Kirk McKusick AuthorDate: 2022-08-15 20:44:49 +0000 Commit: Kirk McKusick CommitDate: 2022-08-15 20:45:48 +0000 Add a description of soft updates journaling to tunefs(8). Add a descrition to the tunefs(8) -j (journal enablement) flag that explains what soft updates journaling does, the tradeoffs to using it, and the limitations that it imposes. Requested by: Graham Perrin PR: 261944 Sponsored by: The FreeBSD Foundation --- 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