How to set up smartphones and PCs. Informational portal
  • home
  • Programs
  • APFS File System Overview for Apple Devices: What's the Difference, How to Apply? The four most exciting features of the new Apple File System.

APFS File System Overview for Apple Devices: What's the Difference, How to Apply? The four most exciting features of the new Apple File System.

Apple has announced the app “ Files", Which is designed to become a full-time file manager for iPhone, iPod touch and iPad. Well, better late than never. In this article, we will tell you about the main features of this application and answer the most interesting questions.

In contact with

"Files" allows you to view and manage files (images, videos, documents, music and other data) that are stored in user folders both on the disk directly in the device and in cloud storage. Program " Files"Is an advanced version of the application.

On which iPhones and iPads is Files Explorer available?

Program " Files»Is available on iPhone, iPod touch and iPad running iOS 11 and later.

Files app: look and feel

The application interface is simple and minimalistic. We have a main window with folders and a left side menu with sources. The sources are Places and Tags.

Tab Places contains a menu with storage sources (iCloud Drive, Dropbox, etc.), files located directly on the iOS device itself. There is also a folder with recently deleted files (see screenshot below).

For convenience, it is possible to sort the list of files by name, date, size or tag. Also allow you to switch between views " Badges" and " Overview».

There is a search and the ability to create subfolders.

At the bottom there are two main tabs " Overview" and " Recent».

How to drag and drop multiple files at the same time in the Files app

The nice thing is that Apple in File Explorer has implemented the ability to manage files using multitouch gestures. Having selected one file, you can easily add other documents by tapping on their icons, or by holding the files with one finger, navigate through the folders of the explorer.

When moving files, be careful, because once you start an operation, you cannot stop it or cancel all actions in one click. Alternatively, instead of physically moving the files, assign tags to them.

What actions can be taken with files?

The app is incompatible with many types of files. Despite this, some of them are available for preview, and some for editing. Despite the fact that the program almost always shows a preview of the data contained in the files, this does not mean that “ Files"Will discover this type. Often, an application opens unsupported formats in third-party programs. For example, launching the Ulysses files opens the application associated with this format.

Images can be viewed and edited using standard markup tools. Text files can be viewed only those that are opened by regular iOS programs. Files of unsupported formats are opened in third-party applications, of course, if they are installed. You can watch videos in AVI and MOV formats. As for music, support for high-quality tracks in. The archives are viewed, but they will not allow you to archive and unzip the files.

Since January this year, Apple has been testing the iOS 10.3 update, in which the company is implementing a new file system. A new way of organizing data storage will follow the Mac on the iPhone, iPad and Apple Watch. How the users of "apple" devices will benefit from this, further in our material.

What is Apple File System (APFS)?

The Apple File System is a proprietary company that was announced last summer. It replaces the previous HFS + file system, which Apple first introduced back in 1998. APFS was announced in June 2016 at WWDC. The technology was developed by Apple from the ground up and is focused primarily on working with flash drives and more advanced data encryption.

APFS implements support for almost all HFS + features, but it better meets the requirements of modern Apple products. Unlike HFS +, it is optimized for flash and SSD drives, supports strong encryption, system snapshots, copy-on-write metadata, atomic primitives.

What are the benefits of APFS?

Not all users may notice this, but APFS allows devices to run faster. First, the new file system calculates the amount of free and used space differently, so after switching to APFS, it will turn out that there will be more space on the drive. This has already been noticed by the developers who have installed the beta version of iOS 10.3 on the iPhone and iPad.

Second, APFS moves and copies files faster, which means it will take less time to boot the OS and install applications. Apple engineer Eric Tamura demonstrated the advantages of APFS over HFS + at WWDC 2016 by copying iTunes to a flash drive formatted for the new system. When APFS had finished working, the HFS + disk continued to copy for another 17 seconds.

APFS enables copy-while-write metadata, clones files and folders, snapshots of the file system, has improved crash resilience, supports space sharing, accelerated cataloging, and many other features that will make iPhone and iPad run faster and more reliably.

APFS release date

Last Thursday, the seventh beta version of iOS 10.3 was released, which means that the final release is not far off. Users have nothing to worry about: the new OS will automatically convert the current HFS + file system to APFS.

APFS is designed to work with iOS, macOS, tvOS, and watchOS, so it can be installed on all Apple products. The company is going to transfer its devices to it. Changing the file system should not lead to the loss of user data, the company says, but it is recommended to resort to backing up information just in case.

Yesterday, Apple showed new versions of the operating systems macOS (Sierra) 10.12, iOS 10, tvOS 10, watchOS 3, an application for teaching children Swift Playgrounds programming and new emoji.

It would seem nothing interesting. However, Apple has rolled out something fundamental. The most significant development from everything mentioned at the presentation is the Apple File System (APFS) next generation file system in macOS (Sierra) 10.12.

On the developer site, shortly after the presentation, documentation was published with the main characteristics and descriptions of the file system, which replicates some of the features of the powerful free file system ZFS.

Apple computers now use the HFS + file system, an extended version of HFS (Hierarchical File System) that was created more than 30 years ago. Like its predecessor, HFS + uses a tree structure called a B * -tree to store most of the metadata. Hence the name "hierarchical file system".

HFS + was officially unveiled on January 19, 1998, along with macOS 8.1. Since 2002, logging has been implemented in the system to improve the reliability of information storage. Since OS X 10.3, logging is enabled by default, it is now possible to work in case-sensitive mode.

Until OS X 10.7, developers continued to refine HFS + and implement new functions for OS X at the file system level. But the fact remains: HFS was originally developed in the days of floppy disks and spinning hard drives, when file sizes were measured in kilobytes or megabytes. Today, many people work with SSDs, which store millions of files - gigabytes or terabytes of data. The requirements for the file system are completely different. Instead of reworking the old code, Apple decided to finally write a new file system from scratch.

The next generation APFS file system is still at the stage developer preview, that is, it is not planned to roll out to mass use in the near future. The APFS volume cannot currently be used as a boot drive, nor can it be used with Time Machine backups, Fusion Drive, or File Vault encryption. But it is possible for a normal non-bootable volume.

There is still a lot of refinement and testing, but only then APFS will become Apple's main file system for decades to come.

APFS, unlike HFS +, is initially case sensitive in file and folder names, and this feature cannot be disabled. Anyone who decides to use APFS should keep this in mind.

Main characteristics

The official documentation lists the general characteristics of APFS versus HFS +.

Containers and volumes

Container is the main storage object for APFS. Containers are usually exactly the same as GUID Partition Table (GPT) entries and have their own crash protection and disk allocation scheme. Each container contains one or more volumes or filesystems, each with its own namespace, that is, a collection of files and directories.

APFS does not directly support software RAID, but it can be used with Apple RAID volumes to support Striping (RAID 0), Mirroring (RAID 1), and Concatenation (JBOD).

64-bit inodes

64-bit inodes significantly increase the namespace compared to 32-bit identifiers in HFS +. 64-bit APFS supports over 9 quintillion files per volume. This should be enough for everyone, as Bill Gates said.

Nanosecond time stamps

APFS has significantly improved the accuracy of timestamps (timestamps). APFS supports timestamping with nanosecond precision. For comparison, in HFS +, timestamps were set to the nearest second.

Nanosecond timestamps are very important in modern file systems because they help implement atomicity and atomic transactions - one of the main ACID requirements for a transactional system (for example, a DBMS). Atomicity ensures that no transaction is partially committed in the system. Either all of its suboperations will be executed, or none of them will be executed.

Crash protection

APFS implements an innovative copy-on-write metadata scheme that Apple calls “Crash Protection”. It ensures that changes to the file system and logging remain in sync if something happens during the write — for example, a power outage.

ZFS copy-on-write scheme

Sparse files

A file with the "sparse" attribute assumes the content of blocks of zero bytes, not stored on the drive, but implied. HFS + did not have support for sparse files.

Extended attributes

APFS has built-in support for extended file attributes, which in HFS + is implemented through the Attributes file, that is, through the B-tree.

Encryption

Apple says encryption is a fundamental property built into APFS at the file system level. For each volume in the APFS container, one of the encryption models is installed: no encryption, encryption with one key, encryption with multiple keys. In the latter case, separate keys are used to encrypt files and metadata. Depending on the hardware, APFS uses either AES-XTS or AES-CBC encryption mode.

Cloning files and directories

Cloning is almost instant copying of a file or directory, which does not require additional storage space. When modifying a clone, the filesystem only records the change to the data. Thus, the new file system can store many versions of large files, consuming less disk space.

Snapshots

Snapshots are read-only snapshots of the file system on a volume. The operating system can use snapshots for more efficient backup procedures. That is, finally, Time Machine will work fine (fast).

Of course, in terms of its capabilities, APFS is significantly inferior to the 128-bit file system ZFS, which is supported by Linux, FreeBSD and other free operating systems, but from Apple's side this is a step in the right direction.

It is strange that the preliminary documentation does not mention the compression feature that HFS +, by the way, supports.

Apple has been trying to port ZFS to OS X for a long time, there was an active discussion about this on the ZFS mailing lists, preliminary snapshots for the next version of OS X were published. Later, an implementation of OpenZFS was made for OS X (O3X) and MacZFX.

The ZFS file system is open source, and Apple may well have borrowed some ideas for the APFS file system. The open source implementation for APFS is not yet ready, Apple plans to publish, document and publish the APFS format in 2017.

The first formal session will take place at WWDC tonight, where developers will be shown in more detail the new features of APFS.

At WWDC, Apple introduced a new file system - the Apple File System, or APFS. Although HFS + is used on all Apple products (and will be in use for at least another year, the APFS release is planned for 2017), HFS + does not meet the requirements of modern file systems. More than 30 years old, it was created for the times when floppy disks and hard drives were considered the latest technology. To use HFS + on iOS, tvOS, and watchOS, Apple had to add completely third-party functionality not supported on macOS: for example, encryption for each individual file.

The new APFS has added so many features that the eyes run up: optimization for Flash and SSD, protection against data loss in case of emergency shutdowns by increasing the number of atomic operations, built-in support for several types of encryption, greatly reduced response time, quick estimation of the size of files and folders - the list goes on and on. In this article we will look at four of what we think are the most interesting features of the new file system.

Secure Copy-on-write

To begin with, we will have to figure out a few key terms. Atomic operations- these are operations that are performed in the file system or database indivisibly, and it is impossible to simplify them. An atomic operation cannot remain incomplete if interrupted. Such an operation is either carried out completely or not at all. POSIX Compliant Safe Atomic File Saving is performed as follows - when we work with the application and save the file, the data from memory is unloaded into a temporary file on disk. When the application is sure that the data has been downloaded completely and without errors, the application asks the file system about renaming... The renaming operation is atomic, it will either be performed completely or not at all. When renaming, the following happens: the file system moves the temporary file to the save location (say, from /var/tmp/Batcave_shopping.pages to ~ fedor / Documents / Batcave_shopping.pages) and then deletes the old file.

However, what if we are not saving a file, but a folder or Bundle (for example, .rtfd or .app, also, in essence, folders)? Suppose we are working with ~ fedor / Documents / AlfredHappyBirthday.rtfd. This is a Bundle, we have text and some images in it. When we make changes and save them, the application overwrites the entire Bundle, not just the changed text or image. POSIX requirements do not allow you to rename a folder somewhere where there is already data, so you have to resort to tricks. The document is moved from ~ fedor / Documents /, freeing up space, then the temporary file from /var/tmp/AlfredHappyBirthday.rtfd is renamed to empty space. Such an operation is non-atomic and unsafe. If a system error occurs or the computer loses power during the operation, the document will be lost.

Obviously, such a solution is undesirable. Therefore, a new, POSIX-incompatible atomic safe folder save operation was introduced in APFS. When an application requests to save a folder, the temporary and permanent files are swapped. This is done by the filesystem, and it is an atomic operation.

This is the secure Copy-on-write feature, one of the most important innovations in APFS.

Cloning and snapshots

If you need a copy of a file or folder, you right-click on it and select Duplicate. In HFS +, this means that the file system reads all data and then writes it to free space. This approach wastes space inefficiently and wasted disk and processor loads. In APFS, when you duplicate data - via Duplicate or simply ⌘C, ⌘V - the file system only copies the link to it (the so-called hard link), and the content is not duplicated. This operation is called cloning... Thanks to cloning, a duplicate data or folder appears almost instantly, and takes up negligible amount of free space. If you make changes to the original or clone, the filesystem will write the changes and redirect the link accordingly, and the original piece of data will remain intact. In APFS, the cloning operation is atomic.

Snapshots Is a specific snapshot of a volume that stores information about the data on that volume at a specific point in time. The easiest way to understand how it works is by example. Suppose we have a volume (say, a USB stick) with two presentations. We create a Snapshot of this flash drive, it says: two files Joker.key and Riddler.key, the following data blocks belong to the files. The Snapshot itself does not contain data from the flash drive - only what files were on it at the time of the snapshot creation and which blocks belonged to them. The peculiarity of Snapshot is that the blocks written to it are closed. They cannot be deleted, moved, or overwritten. Therefore, for example, if we make changes to Joker.key, and Riddler.key is deleted altogether, the original data blocks will remain intact. Although this approach takes up additional free space, it allows APFS to almost instantly retrace the volume in time to the time any snapshot was taken.

Space sharing

Space sharing is another very interesting feature of APFS. Once again, the easiest way to understand it is with an example. Suppose you have a laptop, it has a 256 GB SSD (it is very possible that you actually have such a laptop) and you want to install OS X El Capitan and the beta version of macOS Sierra on it. Alas, Apple does not yet allow booting the operating system from an APFS volume (or using it for Time Machine, for that matter), so you need to create two HFS + partitions. You start Disk Utility and you are faced with a dilemma - how much partitions should you make? You can just split the disc in half, but what if you run out of space to comfortably work in El Capitan? Or, on the contrary, do you overdo it and the applications you need in Sierra cannot fit?

APFS solves this problem with Space sharing. A container containing all volumes is created on a disk with APFS volumes higher up. They can freely and dynamically grow or shrink within such a container, without requiring the user to choose how much they should be. Let's go back to our hypothetical laptop. If APFS were used for both volumes instead of HFS +, both operating systems would report that there is 256 GB of space available for each. In this case, the space occupied by files on one system would be inaccessible to another. This solution greatly simplifies the work with multiple volumes and allows you to get the most out of their use without much difficulty.

Migrating from HFS +

Finally, how can we migrate to APFS? The process of migrating to a filesystem is usually difficult, time-consuming, and not always secure. You have to back up your data to an external medium, erase your computer's hard drive, write a new file system, install an OS, restore your data from a copy and hope that nothing has disappeared from its place.

Fortunately, Apple has taken care of this. The company's engineers have done a great job on the migration process. The process consists almost entirely of atomic operations, but the main thing is that data about the new file system is written only to empty space on the HFS + volume. This means that even if something goes wrong, it will not damage your data or the structure of your existing file system. And according to Apple engineers, the entire migration only takes a few minutes.

Here we come to the end. We only talked about four functions, but APFS has many more. If you want to dive into the details, the official documentation has all the details. The new file system, as we mentioned above, cannot be used for a boot disk or Time Machine, and will not be supported on OS X Yosemite and older. The official release of APFS is scheduled for 2017.

iOS 10.3 and macOS Sierra 10.12.4, on Monday, run on the new Apple File System, or APFS. At first glance, this is nothing special - the main thing is that the devices after the update do not turn into "bricks".But there is more interesting in the transition to the new system than it seems.

What is Apple File System

Apple File System is a new file system forThis will be used on all devices from Apple Watch to Mac... It is "sharpened" for flash memory and replaced the outdated HFS +. The main innovations in APFS are: improved encryption algorithms, memory optimization, crash protection, file and folder cloning functions, andsmart use of space... In practice, this will ensure more stable operation of the OS, increase the read / write speed of data and further protect user information.

Why Apple is moving to APFS

The 30-year-old HFS +, on which the file systems of modern Apple gadgets are based, was created for computers with multiple drives that handled large volumes of files. On mobile devices like the iPhone or Apple Watch, the priorities are different - users need to quickly open applications, and the OS responds to requests on time. To do this, APFS uses functions such as cloning (instant copying of a file or directory, which does not require additional storage space) and compression (data compression, which saves disk space and increases write speed). And through the use of "snapshots" (read-only "snapshots" of the file system in the volume) will speed up the backup, namely the creation of backups using Time Machine.

APFS is designed for future expansion. Unlike HFS +, which uses a 32-bit write directory, APFS uses a 64-bit inode (this is the data structure in file systems). In other words, APFS will be able to store 9 quintillion (million trillion!) Files, which is not so important for iOS devices, but is too much for the next ten years for macOS and external drives.

What are the benefits for users

In addition to faster and more stable operation of the operating system, users will have access to reliable tools for encrypting data on the disk. Thanks to APFS, iPhones will no longer turn into "bricks" after failed updates - Apple will protect the data on the drive from damage caused by failures. Finally, using the Space Sharing function, all disk volumes will be able to "share" the free space.

UiPservice engineer Vladislav Yudchenko commented on the UiP editorial board:

“APFS will allow operating systems to crash less, it copies files quickly and optimizes space. So far, the difference will not be so noticeable, but it will become noticeable in new updates. Soon we'll get used to it, we won't even notice the transition of all devices to APFS "

For example, with the second system (via Bootcamp) you have Windows installed and youallocated 100 GB for her... With Apple File System, you no longer have to manually reallocate allocated memory. If 100 GB is not enough, the system itself will "take" the required amount of free disk space. At the same time, the function of cloning files and folders will allow you to quickly copy and move data.

Apple File System limitations

System drives cannot be formatted in APFS at this time.... Does not support the new file system Hybrid Fusion Drive, FileVault and Time Machine.

How to start using APFS

If you've updated your iPhone or iPad to iOS 10.3, your device is already using Apple File System. It's more difficult with Mac, here APFS is something like a beta version. You can format an external drive, SD card or USB flash drive, and even then only using the Terminal. In short, it’s better not to experiment for now.

Top related articles