What is format Mac OS Extended journaled?

Mac OS Extended (HFS Plus) is the default file system format used on Macintosh computers. It replaced the original Hierarchical File System (HFS) in 1998 with Mac OS 8.1. The “journaled” part refers to an addition in Mac OS X that provides increased reliability.

What does “journaled” mean?

Journaling is a feature that was added to the Mac OS Extended file system starting in Mac OS X 10.2. It helps prevent data corruption and allows for faster recovery in the event of a crash or improper shutdown.

With journaling enabled, the file system keeps a log or “journal” of changes that are going to be made before they are actually written to disk. This provides a redundancy in case the write operation gets interrupted. The journal can be replayed to complete any pending disk writes that were in progress at the time of the crash or shutdown.

Some key advantages of journaling:

  • Prevents file system corruption – The journal acts as a safeguard to prevent incomplete disk operations.
  • Faster reboot and crash recovery – The file system can be restored to a consistent state quickly using the journal.
  • No need for lengthy disk checks – Since the journal maintains file system consistency, utilities like fsck do not need to scan the entire file system after an improper shutdown.

Mac OS Extended journaled provides a modern, robust file system for macOS with performance advantages over the older non-journaled HFS Plus implementation. It is optimized for use on solid state drives as well as traditional hard disk drives.

Brief history of Mac file systems

Here is a brief overview of the different file system formats used by Apple over the years:

  • Mac OS Standard (HFS) – Introduced in 1985 with the Macintosh. Used a hierarchical folder-based format.
  • Mac OS Extended (HFS Plus) – Released in 1998 with Mac OS 8.1. Added important improvements like longer filenames and larger drive formats.
  • Mac OS Extended journaled – Journaling feature added in 2002 with Mac OS X 10.2 to improve reliability.
  • APFS (Apple File System) – Apple’s newest file system introduced in 2017. Uses advanced techniques like cloning, snapshots, crash protection.

Mac OS Extended journaled was Apple’s flagship file system from the early 2000s until it was replaced by APFS in recent years. It represented a major milestone in Apple’s file system evolution, providing much improved stability and crash recovery capabilities.

Compatibility with other operating systems

Mac OS Extended journaled volumes can only be fully read and written to by macOS. Other operating systems have limited support for reading data from the format:

  • Windows – Can read HFS Plus drives in read-only mode with the help of third-party software like HFS Explorer.
  • Linux – Read-only access possible using the hfsplus and hfsutils packages.
  • Unix-based OSes – Can mount HFS Plus as read-only using hfspax and hfsutils.

Writing to HFS Plus journals from a non-macOS system can result in file system corruption. For exchanging data between macOS and other OSes, the ExFAT or FAT32 formats are preferred due to their cross-platform compatibility.

Creating a Mac OS Extended journaled volume

A Mac OS Extended journaled volume can be created in the following ways:

New hard drive or SSD

When initializing a new internal or external drive, the macOS Disk Utility will automatically create a Mac OS Extended journaled volume by default.

New partition

Using Disk Utility, an existing drive can be partitioned and a new HFS Plus journaled volume created in the partition.

Format existing volume

An existing volume can be reformatted by erasing it in Disk Utility and choosing Mac OS Extended journaled as the new format.

Disk image

A blank disk image can be created in Disk Utility with Mac OS Extended journaled format to emulate a writable volume.

Time Machine backup

Time Machine backups use HFS Plus journaled volumes, automatically created on the backup drive.

In all cases, the journaling feature will be enabled by default for maximum reliability. The volume can then be mounted and used just like any other volume formatted for macOS.

How does journaling work?

The journaling feature in HFS Plus works by tracking file system changes before they are written to disk. Here is a simplified overview of the journaling process:

  1. When a file system change is requested, a record of the change is written to the journal buffer in memory.
  2. The actual change is then made to the file system’s index node structures in memory.
  3. The journal entries are committed to reserved space on disk, followed by the updated nodes.
  4. The file system change is now safely on disk.

If a crash or improper shutdown occurs, any journal entries that were not committed can be replayed to complete the file system operations that were interrupted. This prevents any corruption.

The journal is a circular log, meaning it does not grow indefinitely. Old entries are cleared out as new ones are added.

Journal structures

The journal uses the following structures on disk:

  • Journal info block – Contains metadata like the size of the journal.
  • Journal header – Tracks the state of the journal.
  • Journaled blocks – Storage area for the actual journal entries.

These structures occupy reserved space at the start of the volume. An HFS Plus volume with journaling enabled will have a small amount of its total capacity set aside for the journal.

Advantages over traditional file systems

Compared to non-journaled file systems like older HFS Plus implementations, key advantages include:

  • No lengthy disk checks needed on volume mounting.
  • No file system corruption from interrupted disk writes.
  • Faster startup and crash recovery times.

The redundancy provided by the journal makes HFS Plus much more resilient against abnormal shutdowns and power failures.

HFS Plus journaled on modern versions of macOS

While Apple File System (APFS) has replaced HFS Plus as the default file system on SSDs, HFS Plus journaled remains an option on macOS for the following:

  • Formatting HDD volumes
  • Time Machine backup drives
  • Disk images and RAM disks
  • Legacy boot drives still using HFS Plus

Even with newer file systems available, HFS Plus journals provide important redundancy for these use cases where reliability is critical. The performance is less relevant on rotational HDDs and backups.

Best practices when using HFS Plus journaled

To get the most out of HFS Plus journaled volumes, the following best practices should be observed:

  • Use Mac OS Extended format unless cross-OS compatibility is needed.
  • Keep 10-20% of disk space free for optimal journal performance.
  • Do not manually disable journaling without good reason.
  • Allow disk repair utilities like fsck to run on sudden volume unmounts.
  • Back up data to protect against volume failures/corruption.

Following Apple’s recommended procedures for properly ejecting devices, restarting, shutting down Macs will also minimize file system corruption.

Potential downsides to journaling

The journaling feature brings significant reliability improvements, but has some potential downsides:

  • Disk space overhead – Journal requires a small reserved space on disk.
  • Performance impact – Writing file changes to the journal adds a minor overhead.
  • Prevents some access on other OSes – Journal makes HFS Plus read-only on non-macOS.
  • Added complexity – Potential for journal corruption if not properly maintained.

Fortunately the performance and disk space impacts are small, and are outweighed by the substantial gains in file system integrity provided by HFS Plus journaling.

Recovering a corrupted HFS Plus journal

If a journaled HFS Plus volume becomes corrupted, macOS has utilities that may be able to repair it and recover data:

  • Disk Utility – First choice for minor file system repairs and journal damage.
  • fsck – More advanced command line utility for serious file system issues.
  • Data recovery tools – Used if fsck cannot recover files. Scans disk directly.

For more serious corruption that prevents a volume from mounting, advanced recovery options include:

  • Repairing the journal by undoing pending transactions.
  • Disabling journaling temporarily to copy data off the volume.
  • Erasing the volume entirely and reformatting.

As a last resort, sending the drive to a data recovery service may be required if all DIY options fail. Having a good backup is recommended before attempting repairs.

Migrating from HFS Plus to APFS

For volumes using solid state storage, migrating from HFS Plus to APFS brings benefits like:

  • Faster performance – APFS is optimized for flash storage.
  • Stronger encryption – Improved security with native encryption.
  • More efficient storage – Advanced space saving techniques.
  • Time Machine snapshots – Allows rolling back changes.

The migration process consists of:

  1. Checking for compatibility issues with installed software, drivers, etc.
  2. Backing up the HFS Plus volume.
  3. Reformatting the volume with APFS.
  4. Restoring data from backup.

For systems still using HFS Plus as a boot volume, more care must be taken to maintain compatibility with installed OS versions older than macOS 10.13.

Conclusion

Mac OS Extended journaled represented a major leap forward in reliability and crash protection for Apple’s file systems. While it has been superseded by APFS on SSDs, HFS Plus journals continue to provide important redundancy on rotational hard drives and backups. When used properly, they deliver an excellent balance of robustness, backwards compatibility, and interoperability for macOS systems with traditional hard drive storage. While newer file systems have arrived, HFS Plus journaled still holds an important place in Apple’s ecosystem.