What are the advantages of formatting an external disk as journaled HFS+?
The application Disk Utility /Library/Utilites/Disk Utility.app
which is part of the applications that ship with the Mac OS allows to reformat an external disk.
Options include:
- Mac OS Extended (Journaled) (journaled HFS+)
- Mac OS Extended (Case-sensitive, Journaled)
- MS-DOS (FAT)
- ExFAT
I'm aware that using the MS-DOS (FAT) format offers the good compatibility when sharing the flash drive with Windows users. But for this question I want to rule out compatibility preferences of the different options.
What are the advantages of formatting an external disk as journaled HFS+?
Solution 1:
Taking aside the part that says which OS a particular filesystem is associated with, the main point is the word "journaled".
I include the following Wikipedia quote as there is no point re-inventing the wheel:
A journaling file system is a file system that keeps track of the changes that will be made in a journal (usually a circular log in a dedicated area of the file system) before committing them to the main file system. In the event of a system crash or power failure, such file systems are quicker to bring back online and less likely to become corrupted.
Taking that to one logical end, an external drive is by definition more likely to be removed from the system than an internal drive. It's not possible to remove your laptop drive and keep the OS running, but perfectly possible with something USB or Firewire attached for example. As such you run a greater risk of changes that need to be written to the drive failing to complete should you remove the drive too quickly, or without following the correct eject procedures.
Particularly if you use any form of caching, the data may be waiting to be written to the disk at the point of removal, thus losing your data.
A journaled filesystem helps to prevent too much damage in these scenarios by keeping a log of all changes it needs to apply, and noting when they are successfully completed. In this way it can examine the log on a restart and work out of there are outstanding changes that were never completed. This is far faster than simply running a chkdsk
or similar command to check the entire filesystem for problems which you would need to perform on a FAT32 file system.
In addition to the protective side of things discussed above, is the fact that a HFS filesystem has all the Mac OS X hooks built in for automated indexing, backup, version control and so on that would not be possible on a FAT32 enabled filesystem.
Solution 2:
I format my external disks as Mac OS Extended (Journaled) if I plan to use it with OS X as journaling reduces change of drive filesystem corruption if something unexpected happens when I'm writing data to that external disk, for e.g.
- OS X hibernates
- A/C power cuts off to a Mac desktop
- a Mac laptop battery drops to 0 power
- laptop HDD went to sleep in response to it being dropped
- accidentally disconnect the external drives
If I plan to use the external disks with Windows, then I'll format as ExFAT.
Solution 3:
When choosing file system format, one needs to consider expected usage. SD cards are much more sensitive to write operations than traditional hard drives. A journaled file system adds additional layer of writes on top of the data itself, which reduces the life span of the drive.
Therefore, for mostly static storage (music, apps, books) where writes are few and reads from the device are the major activity, ExFAT is the right choice. If you use the card for DB or other constantly updating critical storage, be prepared to take the hit of shorter life span and format the card using HFS+ called Mac OS Extended (Journaled)
in Disk Utility.