# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2026-08-16 15:11-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: Title = #: documentation/content/en/articles/gjournal-desktop/_index.adoc:1 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:13 #, no-wrap msgid "Implementing UFS Journaling on a Desktop PC" msgstr "" #. type: .abstract-title #: documentation/content/en/articles/gjournal-desktop/_index.adoc:45 msgid "Abstract" msgstr "" #. type: .abstract-title #: documentation/content/en/articles/gjournal-desktop/_index.adoc:51 msgid "" "A journaling file system uses a log to record file system updates and " "preserves consistency in the event of a system crash or power failure. " "Although unsaved changes to files may still be lost, journaling greatly " "reduces the risk of file system corruption caused by an unclean shutdown and " "significantly shortens recovery time. While the UFS file system employed by " "FreeBSD does not implement journaling as an inherent on-disk feature, " "FreeBSD provides journaling support through file system-level mechanisms " "(Soft Updates with journaling) as well as through the GEOM framework " "(`gjournal`). This article describes the available UFS journaling " "mechanisms and explains their appropriate use on modern FreeBSD systems. " "_The content has been reviewed and updated for FreeBSD versions 13 through " "15_." msgstr "" #. type: .abstract-title #: documentation/content/en/articles/gjournal-desktop/_index.adoc:53 msgid "'''" msgstr "" #. type: Title == #: documentation/content/en/articles/gjournal-desktop/_index.adoc:57 #, no-wrap msgid "Introduction" msgstr "" #. type: .abstract-title #: documentation/content/en/articles/gjournal-desktop/_index.adoc:62 msgid "" "While professional servers are usually well protected from unforeseen " "shutdowns, the typical desktop is at the mercy of power failures, accidental " "resets, and other user related incidents that can lead to unclean shutdowns " "and leave a file system in an inconsistent state. Traditionally, this " "required running `fsck`, which on large file systems could take a " "significant amount of time. On rare occasions, file system corruption " "reaches a point where user intervention is required and data may be lost." msgstr "" #. type: .abstract-title #: documentation/content/en/articles/gjournal-desktop/_index.adoc:64 msgid "" "FreeBSD provides two distinct journaling mechanisms for the UFS file system:" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:66 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:154 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:157 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:160 #, no-wrap msgid "Soft Updates with journaling" msgstr "" #. type: .abstract-title #: documentation/content/en/articles/gjournal-desktop/_index.adoc:67 msgid "GEOM journaling (`gjournal`)" msgstr "" #. type: .abstract-title #: documentation/content/en/articles/gjournal-desktop/_index.adoc:69 msgid "" "These mechanisms operate at different layers of the system and have " "different performance and semantic characteristics." msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:73 msgid "" "For most modern FreeBSD systems, including desktops and general-purpose " "servers, *Soft Updates with journaling* is the recommended solution." msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:75 msgid "" "GEOM journaling is a legacy and specialized mechanism and should only be " "used when its specific semantics are required." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:78 msgid "" "This article explains both mechanisms, their differences, and correct modern " "usage." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:80 msgid "Read this chapter to learn:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:82 msgid "" "The journaling mechanisms available for the UFS file system in FreeBSD and " "how they differ." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:83 msgid "" "When to use file system-level Soft Updates journaling and when GEOM " "journaling may be appropriate." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:84 msgid "" "How to enable or disable Soft Updates journaling on existing UFS file " "systems." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:85 msgid "" "How to configure GEOM journaling on new or existing partitions, including " "required kernel support and journal sizing considerations." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:86 msgid "" "What configuration changes are required to mount journaled file systems and " "how journaling affects system behavior." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:87 msgid "How to diagnose and resolve common issues related to UFS journaling." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:89 msgid "Before reading this article:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:91 msgid "Understand basic UNIX(R) and FreeBSD concepts." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:92 msgid "Be familiar with the FreeBSD installation process using bsdinstall." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:93 msgid "" "Have basic knowledge of disk partitioning and file systems, including tools " "such as gpart(8), newfs(8), and mount(8)." msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:98 msgid "" "Some of the procedures described in this article involve modifying file " "system or disk configuration and may require unmounting file systems or " "changing on-disk metadata. Before making such changes on a system in " "production, ensure that reliable _backups_ of all important data are " "available." msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:101 msgid "" "Enabling file system-level Soft Updates journaling is generally safe and " "does not require disk repartitioning. However, configuring GEOM journaling " "involves low-level disk operations and should be attempted only by " "experienced administrators who fully understand the implications." msgstr "" #. type: Title == #: documentation/content/en/articles/gjournal-desktop/_index.adoc:104 #, no-wrap msgid "Understanding Journaling in FreeBSD" msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:106 #, no-wrap msgid "Soft Updates with Journaling (Recommended)" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:108 msgid "" "Soft Updates is the default UFS consistency mechanism in FreeBSD. When " "combined with journaling, it provides *metadata journaling* within the file " "system itself." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:110 msgid "Advantages of Soft Updates with journaling include:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:112 msgid "Very fast crash recovery (typically seconds)" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:113 msgid "Normal `sync(2)` and `fsync(2)` semantics" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:114 msgid "No additional partitions or GEOM layers" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:115 msgid "Simple configuration and maintenance" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:117 msgid "From `tunefs(8)`:" msgstr "" #. type: delimited block _ 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:120 msgid "" "Enabling journaling reduces the time spent by fsck_ffs(8) cleaning up a file " "system after a crash to a few seconds from minutes to hours." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:123 msgid "" "This mechanism is suitable for nearly all UFS-based systems and is the " "default recommendation." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:124 #, no-wrap msgid "GEOM Journaling (`gjournal`)" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:127 msgid "" "GEOM journaling operates at the block level, below the file system. It " "journals all block writes, including *both metadata and file data*." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:129 msgid "Key characteristics of GEOM journaling:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:131 msgid "Implemented as a GEOM class (`geom_journal`)" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:132 msgid "Journals all block I/O, not just metadata" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:133 msgid "Requires explicit cooperation from UFS using the `-J` flag" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:134 msgid "Disables Soft Updates" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:135 msgid "Alters the semantics of `sync(2)` and `fsync(2)`" msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:139 msgid "" "On GEOM-journaled file systems, `sync(2)` and `fsync(2)` do not guarantee " "that data has been committed to stable storage. To ensure persistence, " "`gjournal sync` must be used." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:142 msgid "" "Because of these differences, GEOM journaling is not recommended for general-" "purpose desktop or server use." msgstr "" #. type: Title == #: documentation/content/en/articles/gjournal-desktop/_index.adoc:143 #, no-wrap msgid "Choosing the Appropriate Journaling Method" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:146 msgid "The following table summarizes recommended usage:" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:149 #, no-wrap msgid "Use case" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:151 #, no-wrap msgid "Recommended mechanism" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:152 #, no-wrap msgid "Desktop or laptop system" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:155 #, no-wrap msgid "General-purpose server" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:158 #, no-wrap msgid "Legacy UFS systems" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:161 #, no-wrap msgid "File system-independent journaling requirements" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:163 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:165 #, no-wrap msgid "GEOM journaling" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:164 #, no-wrap msgid "Specialized block-level logging needs" msgstr "" #. type: Title == #: documentation/content/en/articles/gjournal-desktop/_index.adoc:167 #, no-wrap msgid "Using Soft Updates with Journaling" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:172 msgid "" "Soft Updates with journaling provide file system-level journaling for UFS. " "This mechanism preserves file system consistency while retaining the " "allocation and ordering optimizations of Soft Updates. Unlike GEOM " "journaling, no separate journal device or partition is required." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:173 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:253 #, no-wrap msgid "Overview" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:178 msgid "" "Soft Updates with journaling record file system metadata changes in a " "journal stored inside the file system itself, implemented as a hidden file " "named [.filename]#.sujournal# in the root of the file system. In the event " "of a crash or power failure, pending metadata operations are replayed from " "the journal, allowing the file system to be mounted quickly without a full " "consistency check." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:181 msgid "" "This form of journaling applies to file system metadata only. File data " "integrity remains the responsibility of applications." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:182 #, no-wrap msgid "Enabling Journaling on an Existing File System" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:185 msgid "" "The file system must be unmounted or mounted read-only before changing " "journaling settings." msgstr "" #. type: delimited block - 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:191 #, no-wrap msgid "" "# umount /usr\n" "# tunefs -n enable -j enable /dev/ada0p2\n" "# mount /usr\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:194 msgid "" "No additional configuration is required. Standard mount options may be used." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:195 #, no-wrap msgid "Journal Storage and Size" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:199 msgid "" "A default journal size is selected automatically when journaling is " "enabled. In most cases, the default size is sufficient and does not require " "adjustment." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:201 msgid "" "If necessary, the journal size in bytes can be specified explicitly using " "the `-S` option to `tunefs(8)`:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:205 #, no-wrap msgid "# tunefs -S 64000000 /dev/ada0p2\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:208 msgid "" "Journal size tuning is rarely required and should be considered only for " "file systems with unusually high metadata update rates." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:209 #, no-wrap msgid "Checking Soft Updates with Journaling" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:212 msgid "" "The journaling status of a UFS file system using Soft Updates can be " "verified with `tunefs(8)` or `dumpfs(8)`." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:214 msgid "To display the current file system settings, run:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:220 #, no-wrap msgid "" "# tunefs -p /dev/ada0p2 | grep -i journal\n" "tunefs: soft updates journaling: (-j) enabled\n" "tunefs: gjournal: (-J) disabled\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:223 msgid "Look for the following indicators in the output:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:225 msgid "Soft Updates enabled" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:226 msgid "Soft Updates journaling enabled" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:228 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:643 msgid "" "Alternatively, `dumpfs(8)` can be used to inspect the file system superblock:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:233 #, no-wrap msgid "" "# dumpfs /dev/ada0p2 | grep -i journal\n" "flags soft-updates+journal\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:236 msgid "These commands are read-only and do not modify file system state." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:237 #, no-wrap msgid "File System Checks and Maintenance" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:240 msgid "" "Although journaling dramatically reduces recovery time after a crash, it " "does not eliminate the need for periodic full file system checks." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:242 msgid "Journaling guarantees consistency, not correctness" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:243 msgid "Media errors are not repaired by journaling" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:244 msgid "Periodic `fsck` should still be scheduled" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:245 msgid "Background `fsck` can be used on live file systems" msgstr "" #. type: Title == #: documentation/content/en/articles/gjournal-desktop/_index.adoc:246 #, no-wrap msgid "Using GEOM Journaling (Advanced)" msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:251 msgid "" "This section is intended for advanced users who understand the implications " "of block-level journaling and altered sync semantics." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:258 msgid "" "This functionality is provided by loading the [.filename]#geom_journal.ko# " "module into the kernel (or building it into a custom kernel) and using the " "`gjournal` command to configure the file systems. In general, you would " "like to journal large file systems, like [.filename]#/usr#. You will need " "however (see the following section) to reserve some free disk space." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:261 msgid "" "GEOM journaling is implemented by the `geom_journal` kernel module and is " "configured using the `gjournal(8)` utility. It provides block-level " "journaling below the file system layer and requires explicit cooperation " "from UFS." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:264 msgid "" "When GEOM journaling is used, some disk space is needed to keep the journal " "itself. The provider that contains the file system data is referred to as " "the _data provider_, while the provider that stores the journal is referred " "to as the _journal provider_." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:269 msgid "" "When journaling an existing (non-empty) file system, the data and journal " "providers must be separate. When journaling a new, empty file system, a " "single provider may be used to store both data and journal information. In " "both cases, `gjournal(8)` combines the data and journal providers to create " "a new journaled provider, which is then mounted by the file system. For " "example:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:271 msgid "" "The `/usr` file system resides on `/dev/ada0p2` and already contains data." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:272 msgid "" "Free disk space has been allocated in a separate partition, `/dev/ada0p4`, " "to hold the journal." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:274 msgid "" "After configuring GEOM journaling, a new provider `/dev/ada0p2.journal` is " "created. This journaled provider combines `/dev/ada0p2` as the data " "provider and `/dev/ada0p4` as the journal provider and is used for all " "subsequent file system operations." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:277 msgid "" "The amount of disk space required for the journal depends primarily on the " "write workload of the file system rather than on the size of the data " "provider. Systems with sustained or bursty write activity require larger " "journals to avoid excessive journal switching or write throttling." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:279 msgid "From the man page `gjournal(8)`:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:281 msgid "The default journal size is 1 GB." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:282 msgid "" "The recommended minimum journal size is twice the amount of installed " "physical memory." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:283 msgid "" "The journal size should be chosen based on expected write load, not file " "system size." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:285 msgid "" "An undersized journal may result in degraded performance or forced journal " "switches under heavy write load." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:287 msgid "" "For more information about journaling, please read the manual page of " "man:gjournal[8]." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:289 #, no-wrap msgid "Steps During the Installation of FreeBSD" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:293 msgid "" "This section describes optional installation-time preparation for systems " "that are configured to use GEOM journaling. The goal is to reserve disk " "space for journal providers that will later be associated with the `/usr` " "and `/var` file systems." msgstr "" #. type: Title ==== #: documentation/content/en/articles/gjournal-desktop/_index.adoc:294 #, no-wrap msgid "Reserving Space for Journaling" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:298 msgid "" "On a typical system with a single disk, the operating system, installed " "software, and user data all reside on the same device. The default " "automatic partitioning performed by the FreeBSD installer allocates most " "available space to `/usr`, with smaller partitions for `/var` and other " "mount points." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:302 msgid "" "By default, the installer allocates all available disk space to file systems " "and does not leave unused space. When GEOM journaling is planned for " "existing (non-empty) file systems, additional disk space must be reserved to " "hold journal providers. Each file system that will be journaled requires " "its own journal provider." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:304 msgid "" "Since `/usr` typically occupies the largest portion of the disk, it is " "usually the most practical partition to reduce slightly in order to make " "room for journal providers." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:306 msgid "In our example GEOM journaling is planned for both `/usr` and `/var`." msgstr "" #. type: Title ==== #: documentation/content/en/articles/gjournal-desktop/_index.adoc:307 #, no-wrap msgid "Partitioning Strategy" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:311 msgid "" "During installation, use the manual partitioning mode provided by the " "installer. Create any supported file system type for `/`, and create " "standard UFS partitions for `/usr` and `/var`, but reduce the size of `/usr` " "to leave sufficient unallocated space at the end of the disk." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:313 msgid "" "From the remaining unallocated space, create two additional partitions that " "will be used exclusively as journal providers:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:315 msgid "One partition for the `/usr` journal" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:316 msgid "One partition for the `/var` journal" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:319 msgid "" "These partitions must not be assigned mount points and must not be used for " "swap. They will remain unused until they are explicitly associated with " "their corresponding data providers using `gjournal(8)` after installation." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:321 msgid "A typical layout may look like the following:" msgstr "" #. type: Block title #: documentation/content/en/articles/gjournal-desktop/_index.adoc:322 #, no-wrap msgid "Partitions Reserved for GEOM Journaling" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:326 #, no-wrap msgid "Provider" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:327 #, no-wrap msgid "Intended Use" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:329 #, no-wrap msgid "Notes" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:330 #, no-wrap msgid "/dev/ada0p2" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:331 #, no-wrap msgid "/var" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:333 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:337 #, no-wrap msgid "UFS file system (data provider)" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:334 #, no-wrap msgid "/dev/ada0p3" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:335 #, no-wrap msgid "/usr" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:338 #, no-wrap msgid "/dev/ada0p4" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:339 #, no-wrap msgid "Journal for /var" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:341 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:344 #, no-wrap msgid "Unformatted, unused partition" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:342 #, no-wrap msgid "/dev/ada0p5" msgstr "" #. type: Table #: documentation/content/en/articles/gjournal-desktop/_index.adoc:343 #, no-wrap msgid "Journal for /usr" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:348 msgid "" "The exact device names will vary depending on the disk layout and " "partitioning scheme. It is strongly recommended to record the provider " "names during installation, as they will be required during journal " "configuration." msgstr "" #. type: Title ==== #: documentation/content/en/articles/gjournal-desktop/_index.adoc:349 #, no-wrap msgid "Journal Size Considerations" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:354 msgid "" "Journal size depends on the expected write workload rather than on the size " "of the file system. For general-purpose systems, journal sizes of 1–2 GB " "are commonly sufficient. Systems with sustained or bursty write activity " "may require larger journals." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:356 msgid "" "Allocate journal space conservatively during installation, as resizing " "partitions later may require additional downtime." msgstr "" #. type: Title ==== #: documentation/content/en/articles/gjournal-desktop/_index.adoc:357 #, no-wrap msgid "Completing the Installation" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:361 msgid "" "After reserving the required partitions, complete the FreeBSD installation " "normally. It is recommended to postpone the installation of third-party " "software and additional system configuration until GEOM journaling has been " "fully configured." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:364 msgid "" "At this stage, the system will boot using the standard UFS file systems. " "The reserved journal partitions will remain unused until journaling is " "explicitly enabled." msgstr "" #. type: Title ==== #: documentation/content/en/articles/gjournal-desktop/_index.adoc:366 #, no-wrap msgid "First Boot After Installation" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:370 msgid "" "After the first successful boot, no immediate configuration changes are " "required. The system should be verified to boot and operate normally before " "proceeding." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:372 msgid "" "Once the base system is confirmed to be functional, the next steps involve:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:374 msgid "Loading or enabling GEOM journaling support" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:375 msgid "Associating journal providers with their corresponding data providers" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:376 msgid "Updating `/etc/fstab` to mount the journaled devices" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:378 msgid "These steps are described in the following section." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:380 #, no-wrap msgid "Setting Up Journaling" msgstr "" #. type: Title ==== #: documentation/content/en/articles/gjournal-desktop/_index.adoc:383 #, no-wrap msgid "Enabling GEOM Journaling on Existing File Systems" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:386 msgid "" "This section describes how to enable GEOM journaling on the `/usr` and `/" "var` file systems using the partitions prepared during installation." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:389 msgid "" "Once the required journal providers have been reserved, GEOM journaling can " "be configured. Because the file systems to be journaled must not be " "mounted, the system must be switched to single-user mode." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:391 msgid "Log in as `root` and enter:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:395 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:718 #, no-wrap msgid "# shutdown now\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:400 msgid "" "Press kbd:[Enter] to obtain a root shell. Unmount the file systems that " "will be journaled. In this example, `/usr` and `/var`:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:404 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:725 #, no-wrap msgid "# umount /usr /var\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:407 msgid "Load the GEOM journaling kernel module:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:411 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:690 #, no-wrap msgid "# gjournal load\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:415 msgid "" "Next, associate each data provider with its corresponding journal provider. " "Use your notes to determine which partition will be used for each journal." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:417 msgid "In this example:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:419 msgid "" "`/usr` resides on `/dev/ada0p3` and its journal provider is `/dev/ada0p5`" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:420 msgid "" "`/var` resides on `/dev/ada0p2` and its journal provider is `/dev/ada0p4`" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:422 msgid "Create the journaled providers using `gjournal(8)`:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:429 #, no-wrap msgid "" "# gjournal label ada0p3 ada0p5\n" "GEOM_JOURNAL: Journal 2948326772: ada0p5 contains journal.\n" "GEOM_JOURNAL: Journal 2948326772: ada0p3 contains data.\n" "GEOM_JOURNAL: Journal ada0p3 clean.\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:434 #, no-wrap msgid "" "# gjournal label ada0p2 ada0p4\n" "GEOM_JOURNAL: Journal 3193218002: ada0p4 contains journal.\n" "GEOM_JOURNAL: Journal 3193218002: ada0p2 contains data.\n" "GEOM_JOURNAL: Journal ada0p2 clean.\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:441 msgid "" "If `gjournal` reports that the last sector of a provider is in use, the " "command will fail. On freshly created or unused partitions, it is safe to " "retry the operation with the `-f` flag to force initialization:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:445 #, no-wrap msgid "# gjournal label -f /dev/ada0p2 /dev/ada0p4\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:449 msgid "After labeling, two new journaled providers are created:" msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:451 msgid "`/dev/ada0p3.journal` for `/usr`" msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:452 msgid "`/dev/ada0p2.journal` for `/var`" msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:454 msgid "" "These devices will replace the original data providers when mounting the " "file systems." msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:456 msgid "" "Before mounting, we must however set the journal flag on them and clear the " "Soft Updates flag:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:464 #, no-wrap msgid "" "# tunefs -J enable -n disable -j disable /dev/ada0p3.journal\n" "tunefs: soft updates journaling cleared but soft updates still set\n" "tunefs: remove .sujournal to reclaim space\n" "tunefs: gjournal set\n" "tunefs: soft updates cleared\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:470 #, no-wrap msgid "" "# tunefs -J enable -n disable -j disable /dev/ada0p2.journal\n" "tunefs: soft updates journaling cleared but soft updates still set\n" "tunefs: remove .sujournal to reclaim space\n" "tunefs: gjournal set\n" "tunefs: soft updates cleared\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:473 msgid "" "Now, mount the new devices manually at their respective places to verify " "correct operation (note that we can now use the `async` mount option) and " "remove [.filename]#.sujournal# to reclaim space:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:480 #, no-wrap msgid "" "# mount -o async /dev/ada0p2.journal /var\n" "# rm /var/.sujournal\n" "# mount -o async /dev/ada0p3.journal /usr\n" "# rm /usr/.sujournal\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:483 msgid "" "Edit [.filename]#/etc/fstab# and update the entries for [.filename]#/usr# " "and [.filename]#/var#:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:488 #, no-wrap msgid "" "/dev/ada0p3.journal /usr ufs rw,async 2 2\n" "/dev/ada0p2.journal /var ufs rw,async 2 2\n" msgstr "" #. type: delimited block = 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:493 msgid "" "Make sure the above entries are correct, or you will have trouble starting " "up normally after you reboot!" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:496 msgid "" "Finally, edit [.filename]#/boot/loader.conf# and add the following line so " "the man:gjournal[8] module is loaded at every boot:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:500 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:682 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:816 #, no-wrap msgid "geom_journal_load=\"YES\"\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:504 msgid "" "Congratulations! Your system is now set for journaling. You can either type " "`exit` to return to multi-user mode, or reboot to test your configuration " "(recommended)." msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:508 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:762 #, no-wrap msgid "# shutdown -r now\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:511 msgid "During the boot you will see messages like the following:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:521 #, no-wrap msgid "" "# dmesg | grep GEOM_JOURNAL\n" "GEOM_JOURNAL: Journal 2948326772: ada0p4 contains journal.\n" "GEOM_JOURNAL: Journal 3193218002: ada0p5 contains journal.\n" "GEOM_JOURNAL: Journal 2948326772: ada0p2 contains data.\n" "GEOM_JOURNAL: Journal ada0p2 clean.\n" "GEOM_JOURNAL: Journal 3193218002: ada0p3 contains data.\n" "GEOM_JOURNAL: Journal ada0p3 clean.\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:524 msgid "After an unclean shutdown, the messages will vary slightly, i.e.:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:528 #, no-wrap msgid "GEOM_JOURNAL: Journal ada0p2 consistent.\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:531 msgid "" "This usually means that man:gjournal[8] used the information in the journal " "provider to return the file system to a consistent state." msgstr "" #. type: Title ==== #: documentation/content/en/articles/gjournal-desktop/_index.adoc:533 #, no-wrap msgid "Enabling GEOM Journaling on Newly Created Partitions" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:537 msgid "" "The procedure described earlier is required when enabling GEOM journaling on " "file systems that already contain data. When journaling a newly created, " "empty partition, the process is simpler because both the data and journal " "providers can reside within the same partition." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:539 msgid "" "This approach is typically used for new disks or newly allocated partitions " "that have not yet been formatted with a file system." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:544 msgid "" "While the above procedure is necessary for journaling partitions that " "already contain data, journaling an empty partition is somewhat easier, " "since both the data and the journal provider can be stored in the same " "partition. For example, assume a new disk was installed, and a new " "partition [.filename]#/dev/ada1p1# was created. Creating the journal would " "be as simple as:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:548 #, no-wrap msgid "# gjournal label /dev/ada1p1\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:554 msgid "" "The journal size will be 1 GB by default. You may adjust it by using the `-" "s` option. The value can be given in bytes, or appended by `K`, `M` or `G` " "to denote Kilobytes, Megabytes or Gigabytes respectively. Note that " "`gjournal` will not allow you to create unsuitably small journal sizes." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:556 msgid "" "For example, to create a 2 GB journal, you could use the following command:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:560 #, no-wrap msgid "# gjournal label -s 2G /dev/ada1p1\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:563 msgid "" "You can then initialize a UFS file system on your new partition, enable " "journaling using `newfs(8)` on the `.journal` device, and disable Soft " "Updates using `tunefs(8)`:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:568 #, no-wrap msgid "" "# newfs -J /dev/ada1p1.journal\n" "# tunefs -n disable -j disable /dev/ada1p1.journal\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:572 msgid "" "After the file system has been created, it can be mounted normally. For " "example, to mount it at `/data`:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:576 #, no-wrap msgid "# mount /dev/ada1p1.journal /data\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:579 msgid "" "To ensure the file system is mounted automatically at boot, add an entry to " "[.filename]#/etc/fstab#:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:583 #, no-wrap msgid "/dev/ada1p1.journal /data ufs rw,async 2 2\n" msgstr "" #. type: Title ===== #: documentation/content/en/articles/gjournal-desktop/_index.adoc:585 #, no-wrap msgid "Notes on Usage" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:588 msgid "When using a single provider for both data and journal storage:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:590 msgid "The partition must be empty before labeling" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:591 msgid "The journal space is allocated from within the partition" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:592 msgid "The file system size will be reduced by the size of the journal" msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:594 #, no-wrap msgid "Building Journaling into Your Custom Kernel" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:598 msgid "" "If you do not wish to load `geom_journal` as a module, you can build its " "functions right into your kernel. Edit your custom kernel configuration " "file, and make sure it includes these two lines:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:602 #, no-wrap msgid "options UFS_GJOURNAL <1>\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:604 #, no-wrap msgid "options GEOM_JOURNAL <2>\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:607 msgid "Note: This is already in GENERIC" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:608 msgid "You will have to add this one" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:611 msgid "" "Rebuild and reinstall your kernel following the relevant extref:{handbook}" "kernelconfig[instructions in the FreeBSD Handbook., kernelconfig]" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:613 msgid "" "Do not forget to remove the relevant \"load\" entry from [.filename]#/boot/" "loader.conf# if you have previously used it." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:614 #, no-wrap msgid "Checking GEOM Journaling" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:617 msgid "" "GEOM journaling status can be verified by inspecting active GEOM providers." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:619 msgid "To list all active GEOM journal devices, run:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:623 #, no-wrap msgid "# gjournal list\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:626 msgid "Or to view a summary of journal status:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:630 #, no-wrap msgid "# gjournal status\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:634 msgid "" "Journaled file systems are identified by device names ending in `.journal`. " "The presence of these providers indicates that GEOM journaling is active." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:636 msgid "Additional information about GEOM device stacking can be obtained with:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:640 #, no-wrap msgid "# geom -t\n" msgstr "" #. type: delimited block - 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:648 #, no-wrap msgid "" "# dumpfs /dev/ada0p2.journal | grep -i journal\n" "flags gjournal\n" msgstr "" #. type: Title == #: documentation/content/en/articles/gjournal-desktop/_index.adoc:652 #, no-wrap msgid "Troubleshooting Journaling" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:655 msgid "" "The following section covers frequently asked questions regarding problems " "related to journaling." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:656 #, no-wrap msgid "I am experiencing kernel panics during periods of high disk activity. Is this related to GEOM journaling?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:659 msgid "" "On modern FreeBSD systems, kernel panics caused solely by an undersized GEOM " "journal are rare." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:662 msgid "" "Under sustained or burst-heavy write workloads, an undersized journal " "typically results in write throttling or temporary I/O stalls while the " "journal is flushed to the data provider. A kernel panic may occur only in " "exceptional cases, usually in combination with additional problems such as I/" "O errors or resource exhaustion, where continuing operation could risk file " "system integrity." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:664 msgid "" "If panics are observed during heavy write activity, increasing the size of " "the journal provider for the affected file system is recommended." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:665 #, no-wrap msgid "I made some mistake during configuration, and I cannot boot normally now. Can this be fixed some way?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:671 msgid "" "You either forgot (or misspelled) the entry in [.filename]#/boot/" "loader.conf#, or there are errors in your [.filename]#/etc/fstab# file. " "These are usually easy to fix. During system startup, when the boot process " "stops and prompts for single-user mode (for example after a failed mount or " "`fsck` error), press kbd:[Enter] to get to the default single user shell. " "Then locate the root of the problem:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:675 #, no-wrap msgid "# cat /boot/loader.conf\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:678 msgid "Ensure that the following line exists and is spelled correctly:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:686 msgid "" "If the `geom_journal_load` entry is missing or misspelled, the journaled " "devices are never created. Load the module manually, mount all partitions, " "and continue with multi-user boot:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:697 #, no-wrap msgid "" "GEOM_JOURNAL: Journal 2948326772: ada0p4 contains journal.\n" "GEOM_JOURNAL: Journal 3193218002: ada0p5 contains journal.\n" "GEOM_JOURNAL: Journal 2948326772: ada0p2 contains data.\n" "GEOM_JOURNAL: Journal ada0p2 clean.\n" "GEOM_JOURNAL: Journal 3193218002: ada0p3 contains data.\n" "GEOM_JOURNAL: Journal ada0p3 clean.\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:701 #, no-wrap msgid "" "# mount -a\n" "# exit\n" "(boot continues)\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:706 msgid "" "If, on the other hand, this entry is correct, have a look at [.filename]#/" "etc/fstab#. You will probably find a misspelled or missing entry. In this " "case, mount all remaining partitions by hand and continue with the multi-" "user boot." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:707 #, no-wrap msgid "Can I remove journaling and return to my standard file system with Soft Updates?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:712 msgid "" "Sure. Use the following procedure, which reverses the changes. The " "partitions you created for the journal providers can then be used for other " "purposes, if you so wish." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:714 msgid "Login as `root` and switch to single user mode:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:721 msgid "Unmount the journaled partitions:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:728 msgid "Synchronize the journals:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:732 #, no-wrap msgid "# gjournal sync\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:735 msgid "Stop the journaling providers:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:740 #, no-wrap msgid "" "# gjournal stop ada0p2.journal\n" "# gjournal stop ada0p3.journal\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:744 msgid "" "Next step should be done with unloaded gjournal kernel module. If the " "following command fails:" msgstr "" #. type: source #: documentation/content/en/articles/gjournal-desktop/_index.adoc:749 msgid "... # gjournal unload ..." msgstr "" #. type: source #: documentation/content/en/articles/gjournal-desktop/_index.adoc:751 msgid "" "ensure that the following line exists in [.filename]#/boot/loader.conf# and " "is spelled correctly:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:755 #, no-wrap msgid "geom_journal_load=\"NO\"\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:758 msgid "Reboot your desktop without gjournal kernel module:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:765 msgid "" "Boot into single-user mode again. Clear the journaling metadata from all the " "devices used:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:772 #, no-wrap msgid "" "# gjournal clear ada0p2\n" "# gjournal clear ada0p3\n" "# gjournal clear ada0p4\n" "# gjournal clear ada0p5\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:775 msgid "" "Clear the file system journaling flag, and restore the Soft Updates flags:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:782 #, no-wrap msgid "" "# tunefs -J disable -n enable -j enable ada0p2\n" "tunefs: soft updates journaling set\n" "tunefs: gjournal cleared\n" "tunefs: soft updates set\n" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:787 #, no-wrap msgid "" "# tunefs -J disable -n enable -j enable ada0p3\n" "tunefs: soft updates journaling set\n" "tunefs: gjournal cleared\n" "tunefs: soft updates set\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:790 msgid "Remount the old devices by hand:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:795 #, no-wrap msgid "" "# mount -o rw /dev/ada0p2 /var\n" "# mount -o rw /dev/ada0p3 /usr\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:798 msgid "Edit [.filename]#/etc/fstab# and restore it to its original state:" msgstr "" #. type: delimited block . 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:803 #, no-wrap msgid "" "/dev/ada0p2 /usr ufs rw 2 2\n" "/dev/ada0p3 /var ufs rw 2 2\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:806 msgid "" "Finally, edit [.filename]#/boot/loader.conf#, remove the entry that loads " "the `geom_journal` module (or re-enable it if gjournal is still required for " "other partitions), and reboot." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:807 #, no-wrap msgid "How do I temporarily boot without GEOM journaling?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:810 msgid "" "To boot the system without GEOM journaling, prevent the journal module from " "loading during startup." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:812 msgid "" "Comment out or remove the following line from [.filename]#/boot/loader.conf# " "and reboot:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:820 msgid "" "After booting without GEOM journaling, journaled devices (`*.journal`) will " "not be created. File Systems must be mounted using their original (non-" "journaled) providers, or mounted manually as needed for recovery or " "maintenance." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:822 msgid "" "This method does not modify on-disk journal metadata and can be safely used " "for troubleshooting." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:823 #, no-wrap msgid "Can I resize a GEOM journal after it has been created?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:826 msgid "" "No. A GEOM journal cannot be resized in place after it has been created." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:830 msgid "" "The journal size is fixed at the time the journal is labeled. To change the " "journal size, GEOM journaling must be removed and reconfigured with a new " "journal provider of the desired size. For file systems containing data, " "this requires unmounting the file system and recreating the journal using " "appropriately sized providers, as described earlier in this article." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:832 msgid "" "Plan journal sizes conservatively to accommodate peak write activity, as " "resizing requires reinitialization of the journal configuration." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:833 #, no-wrap msgid "What happens after an unclean shutdown or power failure?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:836 msgid "" "After an unclean shutdown or power failure, GEOM journaling and Soft Updates " "with journaling replay the pending journal records during the next boot to " "return the file system to a consistent state." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:839 msgid "" "If the journal replay completes successfully, the file system is mounted " "normally and no full file system check is required. Journal replay " "typically takes only a few seconds and depends on the amount of recent write " "activity rather than the size of the file system." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:841 msgid "" "A full file system check may still be required in rare cases, such as when " "underlying storage errors are detected or the journal itself is inconsistent." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:842 #, no-wrap msgid "How does GEOM journaling interact with fsck?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:845 msgid "" "GEOM journaling and Soft Updates with journaling interact with `fsck_ffs(8)` " "in different ways, reflecting their different integration levels in the " "FreeBSD storage stack." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:850 msgid "" "For GEOM journaling, crash recovery is performed by the GEOM framework " "itself. During system startup, the `geom_journal` class detects journal " "metadata and replays any pending journal records while the provider is being " "tasted by GEOM, before the journaled device becomes visible to higher layers " "of the system. If journal replay completes successfully, the file system is " "returned to a consistent state and the UFS superblock is updated to indicate " "that no file system check is required. When `fsck_ffs(8)` is later invoked " "during boot, it reads this state from the superblock and skips the file " "system check." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:855 msgid "" "For Soft Updates with journaling, recovery is initiated by `fsck_ffs(8)` " "itself. During the file system check phase at boot time, `fsck_ffs(8)` " "detects that the file system supports Soft Updates with journaling and " "invokes the journal replay logic. If journal replay reports that the file " "system is consistent, `fsck_ffs(8)` terminates early without performing a " "full check. If journal replay cannot complete successfully, a traditional " "file system check is performed." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:857 msgid "" "As a result, the recovery path during system startup depends on the " "journaling mechanism in use, as illustrated by the following boot sequence:" msgstr "" #. type: delimited block - 4 #: documentation/content/en/articles/gjournal-desktop/_index.adoc:884 #, no-wrap msgid "" "Firmware / Boot Loader\n" " |\n" " v\n" "Kernel initialization\n" " |\n" " v\n" "GEOM framework (provider tasting)\n" " |\n" " +--> GEOM journaling (gjournal)\n" " | - Journal replay occurs here\n" " | - Filesystem consistency is restored\n" " | - Superblock is updated\n" " |\n" " v\n" "Filesystem check phase (fsck_ffs)\n" " |\n" " +--> Soft Updates with journaling\n" " | - Journal replay initiated by fsck\n" " | - fsck exits early if consistent\n" " |\n" " v\n" "Filesystem mount\n" " |\n" " v\n" "Normal system operation\n" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:888 msgid "" "`fsck_ffs(8)` is still used when journal replay cannot be completed, when " "underlying storage errors are detected, or during periodic manual or " "scheduled file system checks. GEOM journaling reduces recovery time after " "crashes but does not replace `fsck_ffs(8)` entirely." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:889 #, no-wrap msgid "Why does `gjournal clear` report \"Operation not permitted\" even in single-user mode?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:894 msgid "" "In GEOM, the same underlying storage can be exposed through multiple " "provider names at the same time. For example, a partition may be visible " "both under its disk-based name (e.g. `vtbd0p7`) and under a GPT label (e.g. " "`/dev/gpt/labelname`). These are different GEOM providers referring to the " "same physical storage." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:897 msgid "" "When `gjournal stop` or `gjournal clear` is executed on one provider name, " "the GEOM framework may immediately detect the journal metadata again through " "another provider name during the tasting process. As a result, the journal " "is re-attached automatically, and attempts to clear its metadata fail with " "an \"Operation not permitted\" error." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:900 msgid "" "It is technically possible to suppress this behavior by disabling GEOM " "tasting or by preventing the creation of alternative provider names, but " "doing so is strongly discouraged. Such changes may negatively affect other " "GEOM classes and system components that rely on normal provider discovery." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:903 msgid "" "For this reason, the recommended and safe procedure is to unload the " "`geom_journal` module entirely before removing journal metadata, as " "described earlier in this article. With the module unloaded, no tasting " "occurs and the journal cannot be re-attached, allowing `gjournal clear` to " "complete successfully." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:904 #, no-wrap msgid "Can GEOM journaling be used on the root file system?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:907 msgid "" "Yes. GEOM journaling can be used on the root file system, but it requires " "additional care during system configuration." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:910 msgid "" "The GEOM journal module must be loaded early during the boot process so that " "the journaled root device is available before the root file system is " "mounted. Misconfiguration may prevent the system from booting normally, so " "this setup is generally recommended only for experienced users who fully " "understand the boot sequence and recovery procedures." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:912 msgid "" "For these reasons, GEOM journaling is more commonly applied to non-root file " "systems such as `/usr` and `/var`." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:913 #, no-wrap msgid "What are the performance implications of using GEOM journaling?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:917 msgid "" "GEOM journaling introduces additional write I/O because all write operations " "are first recorded in the journal before being committed to the data " "provider. This results in increased write latency and higher overall write " "amplification compared to non-journaled file systems." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:921 msgid "" "Read performance is typically unaffected. The performance impact is most " "noticeable on write-heavy workloads and depends on journal size, placement, " "and the speed of the underlying storage. Using a sufficiently sized journal " "and fast storage for the journal provider minimizes performance penalties." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:922 #, no-wrap msgid "Can GEOM journaling be used together with other GEOM classes?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:925 msgid "Yes. GEOM journaling can be stacked with other GEOM classes." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:928 msgid "" "When used together, GEOM journaling typically operates on top of providers " "created by other GEOM classes such as `gmirror(8)` or `graid3(8)`. The " "order of stacking is important and should follow the documented layering " "requirements of the involved GEOM classes." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:930 msgid "" "GEOM journaling maintains file system consistency across the stacked " "providers, but it does not replace redundancy or error detection provided by " "other GEOM classes." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:931 #, no-wrap msgid "Can GEOM journaling and Soft Updates be enabled at the same time?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:934 msgid "" "No. GEOM journaling and Soft Updates must not be enabled at the same time on " "the same file system." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:937 msgid "" "GEOM journaling requires exclusive control over write ordering and " "consistency guarantees. If Soft Updates are enabled together with GEOM " "journaling, the file system may behave unpredictably and data integrity " "cannot be guaranteed." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:939 msgid "" "When using GEOM journaling, Soft Updates must be disabled on the affected " "file system, as described earlier in this article." msgstr "" #. type: Title === #: documentation/content/en/articles/gjournal-desktop/_index.adoc:941 #, no-wrap msgid "What is the difference between Soft Updates and Soft Updates with Journaling?" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:944 msgid "" "Both Soft Updates and Soft Updates with Journaling are designed to maintain " "file system consistency, but they use different mechanisms and behave " "differently after a system crash." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:948 msgid "" "_Soft Updates_ ensure consistency by carefully ordering metadata writes in " "memory so that only safe states are written to disk. If a crash occurs, any " "metadata updates that have not yet been written are simply lost, leaving the " "file system in a consistent but possibly older state. However, resource " "accounting may be temporarily inaccurate, and a full `fsck_ffs(8)` run is " "required to reclaim unused blocks and inodes." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:952 msgid "" "_Soft Updates with Journaling_ build on top of _Soft Updates_ by adding a " "metadata journal stored within the file system. Metadata changes are first " "recorded in the journal and are replayed automatically during the next boot " "after an unclean shutdown. This allows the file system to be restored to a " "consistent state quickly, usually without requiring a full `fsck_ffs(8)` run." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:954 msgid "" "In short, _Soft Updates_ provide consistency without a journal, while _Soft " "Updates with Journaling_ add fast and automatic recovery after crashes at " "the cost of additional disk space and minor performance overhead." msgstr "" #. type: Title == #: documentation/content/en/articles/gjournal-desktop/_index.adoc:957 #, no-wrap msgid "Further Reading" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:961 msgid "" "Journaling is a fairly new feature of FreeBSD, and as such, it is not very " "well documented yet. You may however find the following additional " "references useful:" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:963 msgid "" "A extref:{handbook}geom[section on journaling, geom-gjournal] is now part of " "the FreeBSD Handbook." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:964 msgid "" "https://lists.freebsd.org/pipermail/freebsd-current/2006-June/" "064043.html[This post] in {freebsd-current} by man:gjournal[8]'s developer, " "`{pjd}`." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:965 msgid "" "https://lists.freebsd.org/pipermail/freebsd-questions/2008-April/" "173501.html[This post] in {freebsd-questions} by `{ivoras}`." msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:966 msgid "" "https://www.youtube.com/watch?v=_NuhRkiInvA[Journaled Soft-Updates, Dr. Kirk " "McKusick, BSDCan 2010] on YouTube" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:967 msgid "" "https://www.youtube.com/watch?v=xMpmOezBJZo[GEOM - in Infrastructure We " "Trust, Pawel Jakub Dawidek, AsiaBSDCon 2008] on YouTube" msgstr "" #. type: Plain text #: documentation/content/en/articles/gjournal-desktop/_index.adoc:967 msgid "The manual pages of man:gjournal[8], man:geom[8], and man:tunefs[8]." msgstr ""