MacOS – High Sierra – Why is Recovery HD inside the APFS container

apfshigh sierramacosrecovery-hd

I noticed a few days ago that the Recovery partition was inside the APFS container. Isn't it better for it to be a separate volume? For example, APFS containers sometimes get corrupted with an invalid partition type (FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF), so you can't boot to Recovery mode either, because that's inside the container! Why is this the case? Is there an explanation? Here is the output from diskutil list. You can clearly see that it's inside the container.

$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         435.1 GB   disk0s2
   3:           Linux Filesystem                         25.0 GB    disk0s3
   4:           Linux Filesystem                         39.9 GB    disk0s4

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +435.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            425.5 GB   disk1s1
   2:                APFS Volume Preboot                 22.4 MB    disk1s2
   3:                APFS Volume Recovery                517.8 MB   disk1s3
   4:                APFS Volume VM                      3.2 GB     disk1s4

Best Answer

Placing the recovery volume inside the APFS container allows space sharing. Instead of creating a fixed partition, the unused space inside Preboot and Recovery can be pooled with your normal volume. Only the actual space used by the Recovery files becomes unavailable.

This also simplifies issues if in the future, the Recovery volume needs more space. Instead of a risky resize operation to your data partition, it simply becomes a matter of adjusting the metadata for the Recovery volume.

Finally, any Mac that shipped with an SSD has Internet Recovery, so you have a reasonable solution if the entire drive gets corrupted.