HFS Plus

from Wikipedia, the free encyclopedia
HFS +
Manufacturer Apple
Full name Hierarchical File System Plus
Initial release January 19, 1998 ( Mac OS 8.1 )
Partition identifier Apple_HFS( APM )
0xAF( MBR )
Apple_HFSX( APM ) for variant ( GPT ) HFSX
48465300-0000-11AA-
AA11-00306543ECAC
Technical implementation
Directories B * tree
Files B * tree
Defect block list B * tree
Maximum values
Size of a file egg
Number of all files 2 32 -1 (4,294,967,295)
Length of the file name 255 characters
File system size egg
Allowed characters in the file name HFS +: enforced case-insensitivity through NFD - Unicode .
HFSX: any Unicode character, including NUL.
properties
Dates of a file Created, changed, saved, last access, changed
Date range January 1, 1904 to February 6, 2040
Forks supported
File attributes Color (3 bits, all other 1 bit), locked, custom icon, bundle, invisible, alias, system, stationery, inited, no INIT resources, shared, desktop, extended attributes (from Mac OS X Leopard )
File rights management Unix rights, ACLs (from Mac OS X Tiger )
Transparent compression Yes, from Mac OS X Snow Leopard
Transparent encryption with the help of the Logical Volume Manager Core Storage ; see FileVault
Supporting operating systems Mac OS 8 , Mac OS 9 , Mac OS X , partly Linux , Windows NT (only with additional drivers)

The file system HFS Plus or - more commonly - HFS + is a further development of HFS . The abbreviation stands for H ierarchical F ile S ystem , hierarchical file system . It was introduced on January 19, 1998 with Mac OS 8.1 and is the standard file system for Macintosh computers with Mac OS X , which has been called OS X since 2012 and macOS since 2016, and iOS devices (iPhone, iPad, iPod, Apple TV and Apple Watch) and can be used for all internal and external storage media. In Mac OS X itself, it was called Mac OS Extended and its predecessor HFS was called Mac OS Standard .

Compared to FAT16 / 32, the allocation units of HFS + are smaller - this can result in greater efficiency in the partition or partition management and access speed.

The successor to HFS Plus is the Apple File System (APFS) introduced in 2016 .

variants

There are several variants of HFS Plus, some of which can be combined. For the sake of completeness, the older HFS is also listed here, as it is or was available for selection in Disk Utility under Mac OS X. In newer versions of OS X / macOS, some of the older versions are no longer available.

Mac OS standard
The older, available since 1986, Hierarchical File System ( hierarchical file system ).
Mac OS Extended
The new HFS Plus file system introduced on January 19, 1998 with Mac OS 8.1 . It is the standard file system under Mac OS from 8.1 to 9.2.2 (the last classic Mac OS versions, up to 2001) and Mac OS X up to 10.2 (Jaguar, 2002).
Mac OS Extended (Journaled)
This variant, also known as jHFS + or HFS + J , was introduced for the first time under Mac OS X Server 10.2.2 (2002, based on "Jaguar" ) and became standard under Mac OS X Panther (10.3, 2003), even for the desktop version. The journal is not part of the file system itself, but as a virtual file system (VFS) in the operating system in the form of two regular files .journaland .journal_info_blockimplemented so that the file system itself can be integrated with or without a journal. Older versions of Mac OS / Mac OS X can also use the same file system, but without the journal.
Mac OS Extended (Journaled, case-sensitive)
This variant was also introduced with Mac OS X Panther (10.3, 2003). The operating system distinguishes strictly between upper and lower case file name , what is also called English Case sensitivity is called. A different partition identifier is used for this variant, also known as HFSX . This prevents the partition (and thus the file system) from being mounted under an older version of Mac OS / Mac OS X that is not compatible with it, as this could lead to data loss.
HFSX in this case- sensitive variant is the standard file system on iOS devices.

With the exception of the HFSX variant, the HFS Plus file system (its driver) does not differentiate between uppercase and lowercase letters in the file name . B. Dateiname.ext(first capital letter) represents the same file as dateiname.ext(everything in lower case). The normalization (conversion of upper and lower case letters, NFD normalization for Unicode ) takes place in the file system driver .

HFS Plus is since the changeover from the PowerPC - the Intel - architecture only in the 2006 Journaling used variant. Like the free file systems ext3 / ext4 , XFS and ReiserFS or the commercial NTFS from Microsoft , it is more stable than file systems that do not use journaling ( FAT16 and FAT32 , ext2 , HFS, etc.).

Partition identifier

Under classic Mac OS and on the PowerPC versions of Mac OS X , HFS and HFS Plus use the same partition identifier Apple_HFSin the Apple Partition Map (APM). In the HFSX variant, however, the identifier is Apple_HFSXused for reasons of compatibility , so that older operating systems do not inadvertently integrate a more modern (incompatible) variant of HFS Plus, which could possibly lead to system instability and data loss. This is u. a. this is the case for the case- sensitive variant of HFSX, but not for the journaling variant.

Since the changeover to the Intel processor architecture IA-32 2006, the GUID Partition Table (GPT) has been used as the partition table . The old HFS partition is no longer shown in it - HFSX with GUID 48465300-0000-11AA-AA11-00306543ECAC is the standard GPT identifier for the HFS Plus file system.

For RAID and FileVault partitions there are different partition GUIDs within a GUID partition table (GPT), as well as for RAID partitions within an Apple Partition Map (APM). These partition types can or do not have to contain an HFS-Plus file system.

compatibility

Unixoid operating systems

Under the Linux distributions, reading and writing of HFS / HFS + is often possible by simply mounting it if the kernel hfsplussupports the file system; Otherwise the software packages hfsutils(only HFS) and hfsplusfor post-installation are still available. For write support it may be necessary hfsprogsto install or deactivate the file system journal. There are also software packages for BSD systems. This means that the data on the data carrier can be read by Unix / Linux systems if the corresponding kernel support has been installed.

Microsoft Windows

HFS + can only be used by NT -based Windows operating systems with the help of additional software. Boot Camp 3.0, which is supplied with Mac OS X Snow Leopard (10.6, 2009), offers the possibility of read access to HFS + file systems.

Commercial software for HFS (+) on Windows

  • TransMac from Acute Systems
  • MacDrive from Mediafour
  • HFS + for Windows from Paragon Software Group
  • DataViz's MacOpener (development discontinued)

Non-commercial software for HFS (+) on Windows

  • HFS + for Windows Free (Windows 8 / 8.1 only) from Paragon Software Group
  • hfsexplorer from catacombae (development discontinued)

Mac OS X / Classic

The Classic environment under Mac OS X requires a system partition formatted with HFS +; the UFS file system is not supported.

Fragmentation

HFS and HFS + are designed to find the largest block of free space on the hard drive in which to store a file. Only when a file does not fit into the largest free memory block is the file split up ( fragmented ) and the part that has not yet been written is saved in a further block.

Such a procedure assumes that the size of a file is known beforehand when writing it. This is often the case under Mac OS X , since the system libraries for processing documents are designed in such a way that they usually update files atomically : When a change is saved, the current version of the document is written in one go in a new file, followed by the previous version deleted and the file name transferred to the new file.

In addition, Mac OS X avoids reusing free memory blocks of deleted files, if possible. As of Mac OS X 10.2 (“Jaguar”, 2002) the debiting of free blocks is also delayed in order to combine the reservation of several small blocks into a single debiting of a large contiguous block.

This avoidance of fragments is ineffective when files grow slowly, i.e. after a file has been created for the first time, additional blocks are added later. As of Mac OS X Panther (10.3, 2003), the operating system can therefore also defragment at runtime (on the fly defragmentation) . When a file is opened, a check is made to determine whether it is fragmented into more than eight parts. If this is the case and all of the following conditions also apply, the file is moved to a sufficiently large free memory area and is thereby defragmented:

  • Only one process will open the file.
  • It lies on a writable medium .
  • The maximum file size is 20  MiB .
  • The file has not been changed within the last minute.
  • The operating system has been running for at least three minutes.

Another method that is used from version 10.3 of Mac OS X ( Panther , 2003) is the automatic grouping of intensively used files (adaptive hot file clustering) : Mac identifies each file by continuously keeping statistics on the frequency of read accesses OS X takes the most intensely used files and moves them to an area of ​​the file system that is located directly behind the central metadata . During this move, the files are defragmented and come to lie in the direct vicinity of the most frequently used elements of the HFS file system, so that head movements of the hard disk are minimized. The usage intensity of a file is determined by dividing the number of bytes read within an observation window of the last 60 hours by the total size of the file. The storage area used for these files is 0.5% of the total capacity of the file system. The number of files in this area is limited to a maximum of 5,000, and only files that are 10 MiB or less are included in the process.

Other defragmentation methods are not part of Mac OS X. Apple advises against using programs for subsequent defragmentation, as their use is usually not worthwhile.

criticism

A known problem with using HFS Plus is the default setting of case- in sensitivity , which is enforced at the file system level. This property creates unwanted incompatibilities in the exchange of data with other computer systems. Unlike z. B. With NTFS , where the case-insensitivity of Windows is not integrated in the file system itself, with HFS Plus the file names are converted directly by the file system driver from Apple.

Although there is also a strict case- sensitive variant of HFS Plus - it was introduced as "HFSX" with Mac OS X Panther (10.3, 2003) - it is only used very rarely and is therefore less well tested and sometimes even with far common application software incompatible. However, this is not a limitation of HFS Plus, but rather a problem of the operating system , since case sensitivity under macOS (up to 2012 “Mac OS X”, up to 2016 “OS X”) in the same way on other file systems (e.g. NTFS using NTFS-3G ) leads to incompatibilities.

See also

Web links

Individual evidence

  1. a b Mac OS X: Volume and file restrictions for the Mac OS Extended Format (HFS Plus). (No longer available online.) Apple on July 29, 2008, archived from the original on August 11, 2011 ; Retrieved November 13, 2010 .
  2. File-System Performance Guidelines - Overview of OS X File Systems. In: Apple Developer Documentation Archive. Apple, accessed March 18, 2020 .
  3. Mac OS X: System Journaling ; accessed on September 24, 2016.
  4. Apple Support: Using Disk Utility to Check or Repair Hard Drives , Release June 18, 2015; Retrieved September 25, 2016.
  5. What is Mac OS X? - Mac OS X Filesystems (English), Amit Singh; accessed on September 24, 2016.
  6. Apple Support: Mac OS X 10.6 Server Admin: Mac OS Extended (Journaled, upper / lower case), also known as HFSX (version dated June 29, 2012); accessed on September 24, 2016.
  7. Jonathan Levin: Mac OS X and iOS Internals: To the Apple's Core. Wiley, New York 2011, ISBN 1-118-05765-1 , p. 23.
  8. Mounting HFS + with Write Access in Debian : Write access to HFS + (English)
  9. disable HFS + journaling on Leopard to use disks read / write with linux Disable HFS + journal for write support (English)
  10. http://support.apple.com/kb/HT3777?viewlocale=de_DE
  11. Ben Schwan: Free HFS + drivers for Windows 8, NTFS for OS X 10.10. Heise, July 23, 2014
  12. Linus Torvalds: Apple's HFS + is probably the worst file system ever. (English) IT-World, January 13, 2015, accessed on September 24, 2015
  13. Adobe Helpdesk : Error "Case-sensitive drives not supported" or similar install error (English) for Adobe Creative Suite under Mac OS X, accessed on September 24, 2015
  14. Steam Support: Case Sensitive Filesystems not supported on Mac , accessed on February 20, 2016