From nobody Tue Nov 1 00:14:27 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 4N1VrN06ZXz4gtWR; Tue, 1 Nov 2022 00:14:28 +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 4N1VrM6VBmz3MP9; Tue, 1 Nov 2022 00:14:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667261667; 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=WxMSpw1CEx8Uhgm+jSc42xU009xdSAe/cEC/ERqolas=; b=esD8HKw9vv3SJ9nD0fJmbq419fjv4klIEBVu0KNiGuOLO6zTgRwqYpsDu/rcpzvCAlAQKN 8DeOZi0CRIZvyb92gkd9avGrBwxqW4/glFxuVFqAHxeCse7icii4WuDNVbYAbG+mo+9ic+ r3ZFTzJxA+9CqMDPc8iuk5x4qWmLONSh/EybhZnm95LRmI4JAZYxObMpJAMjFUukhtJQHm +vQmXcqaZVYgRhZVegOxhbVe9bLYIVOWmkYeoXD3X6laYBXwSWF6KoyIzyOYkToUHEjpUt iOqK1RwUPcCE9XhNrYONCUekejA8L30heezzveBIxnvD3h1MjEa68OH106pyJw== 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 4N1VrM5MVLzw2q; Tue, 1 Nov 2022 00:14:27 +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 2A10ERJt099085; Tue, 1 Nov 2022 00:14:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A10ERwv099084; Tue, 1 Nov 2022 00:14:27 GMT (envelope-from git) Date: Tue, 1 Nov 2022 00:14:27 GMT Message-Id: <202211010014.2A10ERwv099084@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: a1017358b35e - releng/12.4 - 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/releng/12.4 X-Git-Reftype: branch X-Git-Commit: a1017358b35e81ce2057ebf06d00b83cdb7f9ac9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667261667; 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=WxMSpw1CEx8Uhgm+jSc42xU009xdSAe/cEC/ERqolas=; b=EzAsmQmSa1h3aA3Ujh93ung8iwp3zNHunq/9fKnemcckE1yLPOqfNQqBimOAgkCRJA8BVC HGEgWVMXtFwY537Yh2fhv63qBqaH3MX8SeXlVmIaf71cZlfxgXRpdtpYfP1BhqKpPqEFl9 9l24Sh5BkJCvbMyW16ueVJ5X+xi0MIW/7ywsQD27yDlWs1Weq+D1qSqO6wJuhyvJC3VnWn 7ZSCC+4bcceXiul7wFk3Pm1HkZrApbQ2EzhJQiaAC/LPfEPsb4GAx8gq8n73nJS/3YCkUm yfRhr+E8ima1jnTUo5LvYXuOeBkxR4QTNnHPGDsO1kBpB0Ny45a7lzkhi5Xoig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667261667; a=rsa-sha256; cv=none; b=qxO9Ra/Hr04xW5PJjfRTpCDuFQG0KnZs1j+9YueJCX5LK8TYsWoY/XAWQYn93Fed17L0w6 9p/uqeHJp1nKA84Tg59mu+QBmFroe2m4WxBkuRbR7KvgbtlpKOohK9rglKCObCPMexWFTg tf4mvyGEZo4BdZKQD2eNMufItYtq6vwY6heUhbnXT1LE1qqGUipcoMMC+RE/HR8cTY10zY DuR0HWcBpCBd7fC+1x9Ky9a29d/IH2xQCC94qUmo/ajChUOzzPYtVRzyo6Ar8xY1/LC6Ms h2fPDazDKZ3eQxCZOfHGH+8/kf/auBgmcUtGlyusM6V4El7JfrO9Y1+k/PA04w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/12.4 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=a1017358b35e81ce2057ebf06d00b83cdb7f9ac9 commit a1017358b35e81ce2057ebf06d00b83cdb7f9ac9 Author: Kirk McKusick AuthorDate: 2022-08-15 20:44:49 +0000 Commit: Kirk McKusick CommitDate: 2022-11-01 00:01:40 +0000 Add a description of soft updates journaling to tunefs(8). Requested by: Graham Perrin PR: 261944 Approved by: re (gjb) Sponsored by: The FreeBSD Foundation (cherry picked from commit 82493ff7007abb5a2d059c74748d2907dafc5395) (cherry picked from commit de1f80e4c1386614a8b6c7b31d861d20930995cc) --- 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