what’s new in apple filesystems · divide et impera preboot recovery vm / local bin lib users...

107
© 2019 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. #WWDC19 Max Matveev, CoreOS Jon Becker, CoreOS Bill Stouder-Studenmund, CoreOS What’s New in Apple Filesystems

Upload: others

Post on 09-Feb-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

© 2019 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

#WWDC19

Max Matveev, CoreOS Jon Becker, CoreOS Bill Stouder-Studenmund, CoreOS

•What’s New in Apple Filesystems

Page 2: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

•Protecting system software on macOS •APFS volume replication •External files for iOS

Page 3: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

APFS Refresher Default filesystem on iOS since 10.3 and macOS since High Sierra

Page 4: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

APFS Refresher Default filesystem on iOS since 10.3 and macOS since High Sierra

HFS Plus

Device

ESPGPT

Page 5: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

APFS Refresher Default filesystem on iOS since 10.3 and macOS since High Sierra

HFS Plus

Device

ESPGPT APFS ContainerVolume1

Volume2Volume1

Volume1Volume2

Volume2

Page 6: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Max Matveev, CoreOS

•Protecting System Software

Page 7: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Protecting System Software on macOS

System Integrity Protection is designed to help prevent potentially malicious software from modifying files and folders on your Mac

Page 8: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Read-Only System Volume

Page 9: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Container Layout

Macintosh HD

Preboot Recovery VM

disk1

Page 10: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Container Layout

Macintosh HD

Preboot Recovery VM

/

local

lib

Users

Jane S

usr

disk1

bin

bin

Page 11: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Macintosh HD — Data

Delete Old System Content

Macintosh HD

Preboot Recovery VM

/

local

bin lib

Users

Jane S

usr

disk1

— Data

bin

Page 12: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Macintosh HD — Data

Delete Old System Content

Macintosh HD

Preboot Recovery VM

/

local

bin lib

Users

Jane S

usr

disk1

— Data

Page 13: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Divide et Impera

Preboot Recovery VM

/

local

bin lib

Users

Jane S

usr

disk1

Macintosh HD — Data

Page 14: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Macintosh HD

Divide et Impera

Preboot Recovery VM

/

local

bin lib

Users

Jane S

usr

disk1

Macintosh HD — Data

Page 15: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Macintosh HD

Divide et Impera

Preboot Recovery VM

/

local

bin lib

Users

Jane S

usr

disk1

/

bin

usr

Macintosh HD — Data

Page 16: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Firmlinks Bi-directional wormhole in path traversal NEW

Page 17: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Firmlinks Bi-directional wormhole in path traversal

New filesystem object, similar to symlink

NEW

Page 18: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Firmlinks Bi-directional wormhole in path traversal

New filesystem object, similar to symlink• Consistent forward and backward traversal of the file name space

NEW

Page 19: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Firmlinks Bi-directional wormhole in path traversal

New filesystem object, similar to symlink• Consistent forward and backward traversal of the file name space• Only for directories

NEW

Page 20: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Firmlinks Bi-directional wormhole in path traversal

New filesystem object, similar to symlink• Consistent forward and backward traversal of the file name space• Only for directories• Created on the system volume at installation time

NEW

Page 21: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Firmlinks Bi-directional wormhole in path traversal

New filesystem object, similar to symlink• Consistent forward and backward traversal of the file name space• Only for directories• Created on the system volume at installation time• Not expected to be noticed by a user or an application

NEW

Page 22: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Stitch It Up

Macintosh HD — Data Macintosh HD

Preboot Recovery VM

/

local

bin lib

Users

Jane S

usr

disk1

/

bin

usr

Page 23: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Stitch It Up

Macintosh HD — Data Macintosh HD

Preboot Recovery VM

/

local

bin lib

Users

Jane S

usr

disk1

/

bin

usr

local

Page 24: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Stitch It Up

Macintosh HD — Data Macintosh HD

Preboot Recovery VM

/

local

bin lib

Users

Jane S

usr

disk1

/

bin

usr Users

local

Page 25: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Stitch It Up

Macintosh HD — Data Macintosh HD

Preboot Recovery VM

/

local

bin lib

Users

Jane S

usr

disk1

/

bin

usr Users

local

Page 26: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Stitch It Up

Macintosh HD — Data Macintosh HD

Preboot Recovery VM

/

local

bin lib

Users

Jane S

usr

disk1

/

bin

usr Users

local

Page 27: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Take Home Message

Page 28: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Take Home Message

The volumes are split during the update, no way to opt-out

Page 29: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Take Home Message

The volumes are split during the update, no way to opt-out• System volume is writable in the Developer Preview

Page 30: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Take Home Message

The volumes are split during the update, no way to opt-out• System volume is writable in the Developer Preview• Create a file named /.rootro to force read-only behavior

Page 31: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Take Home Message

The volumes are split during the update, no way to opt-out• System volume is writable in the Developer Preview• Create a file named /.rootro to force read-only behavior• Will be made read-only in a future seed build

Page 32: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Take Home Message

The volumes are split during the update, no way to opt-out• System volume is writable in the Developer Preview• Create a file named /.rootro to force read-only behavior• Will be made read-only in a future seed build• Read-only state of the system volume can be disabled but not persistently, will

revert to read-only after a reboot

Page 33: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Take Home Message

The volumes are split during the update, no way to opt-out• System volume is writable in the Developer Preview• Create a file named /.rootro to force read-only behavior• Will be made read-only in a future seed build• Read-only state of the system volume can be disabled but not persistently, will

revert to read-only after a reboot

Test your applications

Page 34: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Jon Becker, CoreOS

•ASR, Volume Replication, and Snapshots

Page 35: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What is Volume Replication?

Page 36: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What is Volume Replication?

Copying volume content

Page 37: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What is Volume Replication?

Copying volume content

Superior to file copies

Page 38: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What is Volume Replication?

Copying volume content

Superior to file copies

All volume data, metadata

Page 39: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What is Volume Replication?

Copying volume content

Superior to file copies

All volume data, metadata

Apple Software Restore (ASR)

Page 40: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Who Wants This?

Enterprise / Education IT, setting up labs

Backup utilities

Page 41: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Traditional Model (HFS Plus) Partitions and volumes in one-to-one relationship

GPT

ESP

HFS Plus

GPT

ESP

HFS Plus

Page 42: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

APFS

Great features

Page 43: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

APFS

Great features• Volume management,

space sharingHFS

Device

ESPGPT APFS ContainerVolume1

Volume2Volume1

Volume1Volume2

Volume2

Page 44: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

APFS

Great features• Volume management,

space sharing• Encryption

HFS

Device

ESPGPT APFS ContainerVolume1

Volume2Volume1

Volume1Volume2

Volume2

Page 45: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

APFS

Great features• Volume management,

space sharing• Encryption

Block copies not possible with APFS volumes

HFS

Device

ESPGPT APFS ContainerVolume1

Volume2Volume1

Volume1Volume2

Volume2

Page 46: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Container

APFS Volume Replication with ASRNEW

Volume 2Volume 1

Stream Container

Page 47: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Decryption / encryption part of generation / restore

Container

APFS Volume Replication with ASRNEW

Volume 2Volume 1

Stream Container

Page 48: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Decryption / encryption part of generation / restore

Volume is defragmented as stream is generated

Container

APFS Volume Replication with ASRNEW

Volume 2Volume 1

1

2

3

4 5

Stream

12345

Container

54321

Page 49: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Target before restore

Restore Options Restoring to an existing target volume (erasing prior content)

Container

Source Volume

Container

Volume 2

Volume 1

Page 50: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Target before restore

Restore Options Restoring to an existing target volume (erasing prior content)

# Restore, erasing a target volume % sudo asr restore --source file.dmg --target /Volumes/Volume2 --erase

Container

Source VolumeRestore

Container

Volume 2

Volume 1

Page 51: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Target after restore

Restore Options Restoring to an existing target volume (erasing prior content)

# Restore, erasing a target volume % sudo asr restore --source file.dmg --target /Volumes/Volume2 --erase

Container

Source VolumeRestore

Container

Volume 1

Restored Volume

Page 52: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Container

Restore Options Restoring to a newly created target volume

Target before restore

Container

Source VolumeVolume 2

Volume 1

Page 53: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Container

Restore Options Restoring to a newly created target volume

# Creates a new volume during restore % sudo asr restore --source file.dmg --target /dev/disk1

Target before restore

Container

Source VolumeRestore

Volume 2

Volume 1

Page 54: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Container

Restore Options Restoring to a newly created target volume

# Creates a new volume during restore % sudo asr restore --source file.dmg --target /dev/disk1

Target after restore

Container

Source VolumeRestore

Volume 2

Volume 1

Restored Volume

Page 55: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Snapshots Point-in-time capture of volume state

Page 56: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Snapshots Point-in-time capture of volume state

Page 57: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Snapshots Point-in-time capture of volume state

Snapshot

Page 58: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Snapshots Point-in-time capture of volume state

Snapshot

Deleted from live volume

Page 59: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Snapshots Point-in-time capture of volume state

Snapshot

Added to live volume

Deleted from live volume

Page 60: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Restoring with Snapshots

Snap 1

Snap 2

Page 61: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Restoring with Snapshots

Snap 1

Snap 2

Restore "to" Snap1

# Restore a snapshot % sudo asr restore --source file.dmg --target /Volumes/Target --toSnapshot Snap1

Page 62: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Restoring with Snapshots

Snap 1

Snap 2

Restore "to" Snap1

# Restore a snapshot % sudo asr restore --source file.dmg --target /Volumes/Target --toSnapshot Snap1

Snap 1

Page 63: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Restoring with Snapshots

Snap 1

Snap 2

Snap 1

Page 64: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Restoring with Snapshots

Snap 1

Snap 2

Snap 1

Page 65: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Restoring with Snapshots

Restore "from" Snap1 "to" Snap2

Snap 1

Snap 2

# Restore a snapshot delta % sudo asr restore --source file.dmg --target /Volumes/Target --fromSnapshot Snap1 \ --toSnapshot Snap2

Snap 1

Page 66: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Restoring with Snapshots

Restore "from" Snap1 "to" Snap2

Snap 1

Snap 2

Only items in blue need to be copied

Snap 2 = live volume

# Restore a snapshot delta % sudo asr restore --source file.dmg --target /Volumes/Target --fromSnapshot Snap1 \ --toSnapshot Snap2

Snap 1

Page 67: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Replication Summary

Page 68: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Replication Summary

New features in APFS require new models of replication

Page 69: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Replication Summary

New features in APFS require new models of replication

APFS Volume replication best done with ASR

Page 70: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Replication Summary

New features in APFS require new models of replication

APFS Volume replication best done with ASR• Gives highest fidelity

Page 71: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Replication Summary

New features in APFS require new models of replication

APFS Volume replication best done with ASR• Gives highest fidelity• Handles encryption

Page 72: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Replication Summary

New features in APFS require new models of replication

APFS Volume replication best done with ASR• Gives highest fidelity• Handles encryption

ASR can restore snapshots, snapshot deltas

Page 73: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Bill Stouder-Studenmund, CoreOS

•External File Access for iOS

Page 74: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery
Page 75: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery
Page 76: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery
Page 77: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery
Page 78: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

USB Storage

Page 79: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

USB Storage

Unencrypted APFS

Page 80: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

USB Storage

Unencrypted APFS

Unencrypted HFS Plus

Page 81: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

USB Storage

Unencrypted APFS

Unencrypted HFS Plus

FAT, ExFAT

Page 82: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Network Shares

Page 83: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Network Shares

Supports SMB 3.0

Page 84: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Network Shares

Supports SMB 3.0

Connect over WiFi, Cellular, and Ethernet

Page 85: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Network Shares

Supports SMB 3.0

Connect over WiFi, Cellular, and Ethernet

Search using Windows Search Protocol

Page 86: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Network Shares

Supports SMB 3.0

Connect over WiFi, Cellular, and Ethernet

Search using Windows Search Protocol

And we've added Windows Search to macOS Catalina’s SMB server

Page 87: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery
Page 88: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

•Demo

Page 89: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

Page 90: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

Enabled by default for apps linked on or after iOS 13

Page 91: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

Enabled by default for apps linked on or after iOS 13

Pay attention to volume capability attributes

Page 92: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

Enabled by default for apps linked on or after iOS 13

Pay attention to volume capability attributesNSURL.resourceValues(forKeys:)

Page 93: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

Enabled by default for apps linked on or after iOS 13

Pay attention to volume capability attributesNSURL.resourceValues(forKeys:)

File movement now may take time

Page 94: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

Enabled by default for apps linked on or after iOS 13

Pay attention to volume capability attributesNSURL.resourceValues(forKeys:)

File movement now may take time

Put your temp files near the working files

Page 95: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

Enabled by default for apps linked on or after iOS 13

Pay attention to volume capability attributesNSURL.resourceValues(forKeys:)

File movement now may take time

Put your temp files near the working files

fileManager.url(for: .itemReplacementDirectory, in: .userDomainMask, appropriateFor: yourFile, create: true)

Page 96: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

Page 97: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

External devices can suddenly go away

Page 98: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

External devices can suddenly go away• mmap can be dangerous

Page 99: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

External devices can suddenly go away• mmap can be dangerous• Use NSData.ReadingOptions.mappedIfSafe

Page 100: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

External devices can suddenly go away• mmap can be dangerous• Use NSData.ReadingOptions.mappedIfSafe

External devices have higher latencies than the internal Flash Storage

Page 101: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

What This Means for You

External devices can suddenly go away• mmap can be dangerous• Use NSData.ReadingOptions.mappedIfSafe

External devices have higher latencies than the internal Flash Storage• For best results, keep multiple large operations in-flight at once

Page 102: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Summary

Page 103: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Summary

We are making the root volume read-only for enhanced security

Page 104: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Summary

We are making the root volume read-only for enhanced security

You can use ASR to perform volume replication, including snapshot deltas

Page 105: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

Summary

We are making the root volume read-only for enhanced security

You can use ASR to perform volume replication, including snapshot deltas

We now support accessing external files on USB Storage and Network Shares

Page 106: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery

More Informationdeveloper.apple.com/wwdc19/710

Filesystem Lab Wednesday, 5:00

Introducing Combine and Advances in Foundation Thursday, 10:00

What’s New in File Management and Quick Look WWDC App

Page 107: What’s New in Apple Filesystems · Divide et Impera Preboot Recovery VM / local bin lib Users Jane S usr disk1 Macintosh HD — Data. Macintosh HD Divide et Impera Preboot Recovery