From nobody Mon Oct 31 03:46:19 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 4N0zbH69nbz4gTw5; Mon, 31 Oct 2022 03:46:19 +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 4N0zbH5dG2z3cTy; Mon, 31 Oct 2022 03:46:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667187979; 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=nGllhbnOglCy4fXNxqDxsOIywDhAQ4zmSRQaV9UIIG0=; b=NbeLXkMUJYeN+FMFgClhWgvVGEoDvKpUPn+DKM/+hrTec07t1IoUny9EULRStbhKpk1D+N Spel0GG0Ouk7rtClASgIqwsShGyEO2fm+cCfpGRjAJGW+do3V9E7F4WwEHjS8n1ahNp/fo uXHsnk7+kKY6A6JFgTa8rxTLmorMpBgynefsCGlNAeqkCAVjZu4rOyMgUu0vQTorzwM46n GdxlAT3uuB0X5euNdhEg7+3Z0l6NQHyuM0By6zDANn5atDFGbzkv54t5bmPk/Vhw2+upQF XOkRn04zZ2PDrz2YXJ6PZWw9pdi7BEntXcBwa3+pMI8JEGcNkf6kaTNc5ueKqw== 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 4N0zbH4gjkzMvl; Mon, 31 Oct 2022 03:46:19 +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 29V3kJnc061296; Mon, 31 Oct 2022 03:46:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29V3kJih061295; Mon, 31 Oct 2022 03:46:19 GMT (envelope-from git) Date: Mon, 31 Oct 2022 03:46:19 GMT Message-Id: <202210310346.29V3kJih061295@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: 759ee8654012 - stable/13 - Add a description of soft updates journaling to newfs(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: 759ee8654012dc35380eed6204bf4f35f6eacaaf Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667187979; 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=nGllhbnOglCy4fXNxqDxsOIywDhAQ4zmSRQaV9UIIG0=; b=YJwwE2kt9bJ0GR78kcaqboYWEtUCRG2fiy0SLmQPSetRqNsVNUIO8AJuCrUJr9Bs+YhF+i awmtMjg9ep/MI3doCWN3C5qnHwXttY90y224qK+Qy+fo3E0LNms5rqXx6a6lauDZTBfhGb qITMf3EJPuFM6m8asD3NlSiwrkoi9TydgHYgQ4MvQazhUY1OwVCq04Zj6vUIfBR2rF8Qcb PU/mksnlizboy8Mhih4funrAGyTTogcs4K28dhZzlEFNLYHTdp3QHD9T+OrNOLZ2/YT46s sCGTeclSWKNGGyiKN3cRVjQSuk9Ue7KJLcp59Uh+tHZ37/+ZpCBvkZQ6ycMVVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667187979; a=rsa-sha256; cv=none; b=ygtnfWGDI/8bCIzZSuniEKWkjzhMEgU/h9Rlr0hmul95nCHYZMWU1qWIJKETn5/uA26ydO wQL6+q4joidTGQ2JYwAdu16X7XWNMGO+AlQU2PzdAMCAcpfXHHLwn+w6D1+ulfiNIxa6Zb LlM3R/wAkUMKZuVjclgW6ZK7wXdxxa72wUGIuC5HlVpKZLz3wR8q/qj0Wt/KaP1gu/HDwo 8y/cPzivc+i8k83vhujhhL4bJx35BPxjxryHVrV+lob/brAHQLMeKndafRfpXcz7JZZK0y YyNbf3CYbWGyQ7IlSiCx80XOiKZCjzQl+Fnz6OCud0ZYA7DTvmOpuW/PgRvSqQ== 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=759ee8654012dc35380eed6204bf4f35f6eacaaf commit 759ee8654012dc35380eed6204bf4f35f6eacaaf Author: Kirk McKusick AuthorDate: 2022-10-21 17:56:20 +0000 Commit: Kirk McKusick CommitDate: 2022-10-31 03:45:10 +0000 Add a description of soft updates journaling to newfs(8). PR: 261944 Sponsored by: The FreeBSD Foundation (cherry picked from commit 0929a153fc5cfe35f7390ab5870a36daed19b0ce) --- sbin/newfs/newfs.8 | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8 index 5213e4109363..43896fe0bdb4 100644 --- a/sbin/newfs/newfs.8 +++ b/sbin/newfs/newfs.8 @@ -28,7 +28,7 @@ .\" @(#)newfs.8 8.6 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd April 17, 2021 +.Dd October 21, 2022 .Dt NEWFS 8 .Os .Sh NAME @@ -169,6 +169,46 @@ This flag is implemented by running the .Xr tunefs 8 utility found in the user's .Dv $PATH . +.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 k Ar held-for-metadata-blocks Set the amount of space to be held for metadata blocks in each cylinder group. When set, the file system preference routines will try to save