From nobody Mon Oct 31 03:41:55 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 4N0zVC4ctGz4gTCV; Mon, 31 Oct 2022 03:41:55 +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 4N0zVC48dHz3bgD; Mon, 31 Oct 2022 03:41:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667187715; 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=b7Hn+oFw4TLqIg7lD968v6pA2kND7eAuPV7PPjctQlw=; b=mOBD32uegNT1QJY17YxJyA/wCK3zsAjcZtYJsyvGH5fWm9sEB6AayuSwT9OMBOKGLeV1hS vweomP8frW95QLfuVCKEvTw6K8hfB+CFfdd8f/+O7LbPG3DbyHnaHJUTJ/bYVH27la0ppt z4N2WVBDGVKrRupQc3R6vOwp1YbxfKfQUbVBBWS/O3BUdr8dFbVW6+lq4lD3AWGuf/rLub OqCD+6hQmpCIJdaBFQzAJxpeXA02awSfuhXpHVY5sqjNinbl53H8J9te5DlKdObc4P2IdN TVOjjgX8YTQ2awO5py8xEUSKXAf4cbSLDgFeyf9q3g45/w4sQYEPPJRdNRn54A== 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 4N0zVC2wdzzLw2; Mon, 31 Oct 2022 03:41:55 +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 29V3ftNr057471; Mon, 31 Oct 2022 03:41:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29V3fteA057469; Mon, 31 Oct 2022 03:41:55 GMT (envelope-from git) Date: Mon, 31 Oct 2022 03:41:55 GMT Message-Id: <202210310341.29V3fteA057469@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: 9f004375ae01 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 9f004375ae01b5536a5bb9ca09bc29a69750cedf Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667187715; 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=b7Hn+oFw4TLqIg7lD968v6pA2kND7eAuPV7PPjctQlw=; b=FftyoWT06Y3iPX08jF/YJC/bQ+2uxwIIXweDvQtu/n6ozBW+jkeeUgZ+1L8aBPuPEh++3D AA9fJW5hRU9RZllH09q//EXNhUIZYz8FBy31fiLFusHm3wIgpc4dN2OM3M8ZIp84VRfBPn SUF8Stfl8s+Y+aGSREeeSAUXljJUwQxi0aaE7z6HrVcTl7CzWAZbkq7MtFIXqbjkNz+NfJ TMaOt8ALp7+9+wQDjVuOK/lFR7UYvOgCLYaYP3hvqLzn5Ai3IfMQFnVn3F/fSDuzXx/7nd 1PvW8Iu4iYoIh/xe/QYBFEj6mHIsoap1wp3egUoB+VLyPW/ZIkj85eipvMbQFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667187715; a=rsa-sha256; cv=none; b=XqLFFvF5xtILvav/p3jACCO2EkYjQR+dTQpwP438mhBI/i8n9WAmoicKJASUq+JA2r9w3c 8K2tVN4d5EJs5mw6+a8qfugT91yX+gKoHCJ4x0aIJvfE4iXpXI6rEwBTjUkUKcudctJ6AH nob5CsXpbmU3Q3ypIL+Pq2GeTKoU8KOXVhVQMp7tNCzyke5DWVPFHgRNV6Eqb8GpHCWL0Q 3nc8jqcD3UsKyfzHUYa/jzh3k9ulW8BZU61Wq55GmwlYpO7uR4TVW780AzF7B2JtcP2Ubr oBUsI0JSa38otXPwSkSLhRRgybwbXzWflNSiYijz7rWhvDqNMG604RWbdtkc+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=9f004375ae01b5536a5bb9ca09bc29a69750cedf commit 9f004375ae01b5536a5bb9ca09bc29a69750cedf Author: Kirk McKusick AuthorDate: 2022-08-15 20:44:49 +0000 Commit: Kirk McKusick CommitDate: 2022-10-31 03:41:30 +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