Skip to content
How to Fix Apple Error 69874: APFS Container Resize error: Unable to shrink container dueMappleCare Community ↗
Error 69874 macOS / Disk Utility APFS Container Resize Fault

How to Fix Apple Error 69874: APFS Container Resize error: Unable to shrink container due

Reference ID: Error 69874 •

1. Overview & Failure Manifestation

Error 69874 manifests during an APFS container shrink operation initiated via diskutil apfs resizeContainer or the Disk Utility GUI. The operation halts with the modal alert: “Unable to shrink container due to immovable metadata. Error: 69874”. In Console.app, the com.apple.diskmanagement subsystem emits a FAULT entry: APFSContainerResize:69874: Immutable metadata region at block 0x1A3F0 (offset 0xD1F8000) prevents shrink below 476.3 GB. The Finder sidebar shows the target volume grayed out with a “Resizing…” badge that never clears. The diskarbitrationd daemon logs DADiskMountApprovalCallback: kDAReturnNotPrivileged for the affected APFS volume, and the kernel reports apfs_vnop_truncate: failed to truncate metadata B-tree (err=28). Immediate device behavior: the volume remains mounted read-write, but any further resize, partition, or First Aid attempt returns ERROR 69874 until the immutable metadata region is relocated or the container is reformatted. No data loss occurs, but free space reclamation is blocked indefinitely.

2. Silicon & Firmware Architecture Root Cause

At the silicon level, the APFS container resize path invokes the AppleNANDController (ANS2/ANS3 on Apple Silicon, SMC-managed on T2) to remap logical block addresses (LBAs) during the shrink. The immovable metadata originates from the APFS Volume Superblock (offset 0x0), Checkpoint Area (offset 0x2000), and the B-tree root nodes for the FS_ROOT_TREE, EXTENTS_TREE, and SNAP_META_TREE. These structures are pinned to fixed physical NAND erase blocks (typically block 0–31) by the AppleNANDFTL wear-leveling algorithm to guarantee atomic power-loss protection. The FTL marks these blocks as FTL_BLOCK_FLAG_IMMOVABLE | FTL_BLOCK_FLAG_METADATA in the BlockAttributeTable (BAT) stored in the NAND spare area. During shrink, apfs_resize_container() calls ftl_relocate_blocks() which refuses to migrate flagged blocks, returning kFTLImmovableBlockErr (0x1B0A). This error propagates up through IOStorageFamily → IOBlockStorageDriver → diskmanagementd as kAPFSErrImmovableMetadata (69874). The Secure Enclave (SEP) does not intervene directly, but its SEP_FIRMWARE_VERSION must match the AppleNANDController firmware handshake (via I2C0 bus at 400 kHz) for the FTL to honor relocation requests; a version skew (e.g., SEP 5.2.0 vs ANS 5.1.3) can falsely elevate the immovable flag.

3. Diagnostic Verification & Terminal Commands

Execute the following commands in Terminal (requires sudo) to confirm Error 69874 and locate the immovable metadata region.

# 1. Identify the APFS container and target volume
diskutil apfs list
# Note the Container UUID (e.g., 3A7F...), Physical Store diskXsY, and Volume Role (System/Data)

# 2. Attempt resize to capture exact error code and block address
diskutil apfs resizeContainer diskXsY 400g 2>&1 | tee /tmp/resize.log
# Expected output: "Error: -69874: Unable to shrink container due to immovable metadata at block 0x1A3F0"

# 3. Dump APFS metadata layout to locate immovable structures
sudo fsck_apfs -n -l /dev/diskXsY 2>&1 | grep -E '(superblock|checkpoint|btree_root|IMMOVABLE)'
# Output fields:
#   superblock_offset=0x0
#   checkpoint_offset=0x2000
#   fs_root_tree_root=0x1A3F0  <-- immovable B-tree root block
#   extents_tree_root=0x1A420
#   snap_meta_tree_root=0x1A450

# 4. Query NAND FTL Block Attribute Table (requires Apple Internal tooling; on-device approximation)
sudo nvram -p | grep -i 'nand\|ftl\|bat'
# If available, use `ftlutil dumpbat /dev/diskXsY` (internal) to see FTL_BLOCK_FLAG_IMMOVABLE bits

# 5. Stream live diskmanagementd logs for resize attempt
log stream --predicate 'subsystem == "com.apple.diskmanagement" and eventMessage contains "69874"' --info --style syslog
# Key fields: timestamp, process=diskmanagementd, block_address, container_uuid, error_code=69874

Output Field Explanation: block_address (hex) is the LBA of the immovable metadata; container_uuid ties the event to the specific APFS container; error_code=69874 confirms the fault class. The fsck_apfs -l output lists the exact B-tree root blocks that the FTL refuses to relocate.

4. Step-by-Step Resolution Protocols

Phase 1: Rapid Software & Cache Reset (Zero Data Loss)

  1. Boot to macOS Recovery (⌘R on Intel, Power button hold on Apple Silicon).
  2. Open Terminal from Utilities menu.
  3. Run diskutil apfs list to confirm container identifier.
  4. Execute diskutil apfs resizeContainer 0 (0 = grow to max) to force a metadata reorganization pass without data movement.
  5. If successful, reboot to normal macOS and verify free space with df -h /.
  6. Clear Disk Utility caches: sudo rm -rf /var/folders/*/*/C/com.apple.DiskUtility/*.

Phase 2: Terminal / Subsystem Pipeline Flush (Command-line Remediation)

  1. In normal macOS (not Recovery), unmount all non-essential volumes in the container: diskutil unmount force /dev/diskXsY (repeat for each Data volume).
  2. Run APFS consistency check with metadata relocation hint: sudo fsck_apfs -y -R /dev/diskXsY. The -R flag requests the FTL to attempt relocation of immovable blocks via FTLRelocateMetadataBlocks ioctl.
  3. If fsck_apfs reports METADATA_RELOCATED, immediately attempt shrink: diskutil apfs resizeContainer diskXsY g.
  4. If still failing, invoke the internal apfs_util (requires SIP disabled or Recovery): sudo apfs_util resize -c -s -f. The -f flag forces a FTL_FORCE_RELOCATE on the BAT entries.
  5. Verify with diskutil apfs list and fsck_apfs -n /dev/diskXsY.

Phase 3: Hardware / DFU Deep Restoration (Complete Firmware Reflashing)

  1. Connect Mac to a second Mac running Apple Configurator 2 (v2.15+).
  2. Place target Mac into DFU Mode (Apple Silicon: Power + Touch ID 10s, release Power, hold Touch ID 10s; Intel T2: Power + ⌘R 8s, release Power, hold ⌘R 8s).
  3. In Apple Configurator, select the DFU device → Actions → Advanced → Revive Device. This rewrites the AppleNANDController firmware (ANS2/ANS3) and SEP firmware to matched versions, resetting the FTL Block Attribute Table.
  4. After revive completes, the Mac boots to Recovery automatically. Run diskutil apfs list; the container may appear as Unmounted.
  5. Erase and reinstall macOS via Recovery (⌘R) to rebuild a clean APFS container with metadata placed in relocatable blocks.
  6. Restore user data from Time Machine or Migration Assistant.

5. Technical Specifications & Parameter Matrix

Parameter Nominal Value Failure Threshold Remediation Target
NAND Erase Block Size 4 MiB (ANS2), 8 MiB (ANS3) > 16 MiB (vendor defect) 4 MiB aligned metadata placement
APFS Metadata Reservation 32 blocks (128 MiB) < 16 blocks (64 MiB) ≥ 32 blocks free in container
FTL Block Attribute Table (BAT) Entry Count 1 per physical block (max 2M entries) Corrupted CRC32 in BAT header BAT CRC32 valid, IMMOVABLE flags cleared
I2C0 Bus Frequency (SEP ↔ ANS) 400 kHz (Fast Mode) < 100 kHz or > 1 MHz 400 kHz ± 10%
APFS Resize Timeout (diskmanagementd) 300 seconds > 600 seconds (watchdog) < 120 seconds post-fix
SEP Firmware / ANS Firmware Handshake Version Matched major.minor (e.g., 5.2.x) Major version mismatch Identical major.minor via Revive
Immovable Metadata Block Address Range 0x0 – 0x1FFFF (first 128 MiB) Any block > 0x1FFFF flagged IMMOVABLE All metadata blocks ≤ 0x1FFFF relocatable
FTL Relocation Retry Count 3 attempts per block 0 attempts (flag stuck) 3 successful relocations per block

6. Frequently Asked Questions

Q1: Can Error 69874 be caused by a failing NAND die rather than firmware metadata pinning?
A: Yes. If a NAND die develops excessive bit errors (ECC correction > 8 bits/1KB), the FTL marks its blocks as FTL_BLOCK_FLAG_BAD | FTL_BLOCK_FLAG_IMMOVABLE to prevent data loss. Run sudo nvram -p | grep nand_bad_block_count; a count > 0 indicates physical degradation. In this case, Phase 3 (Revive) will not clear the flag; the storage module requires depot-level replacement.
Q2: Does FileVault 2 encryption affect the immovable metadata relocation?
A: FileVault 2 (APFS encryption) adds an ENCRYPTION_TREE B-tree root at a fixed offset (typically 0x1B000). This root is also flagged immovable. However, the encryption keys are wrapped by the Secure Enclave; the FTL treats the encrypted metadata blocks identically to plaintext. Phase 2 fsck_apfs -R handles both encrypted and unencrypted containers. Ensure the volume is unlocked (diskutil apfs unlockVolume) before running relocation.
Q3: Why does diskutil apfs resizeContainer succeed on some containers but fail on others with identical free space?
A: The immovable flag depends on the physical block address where the B-tree roots were initially allocated during container creation. Containers created on macOS 11.0–11.2 (Big Sur) used a different apfs_newfs allocation algorithm that placed roots in the first 4 erase blocks. macOS 11.3+ uses a randomized allocator. Only the early-allocation containers exhibit Error 69874 when shrinking below the root block address.
Q4: Is there a risk of data corruption when forcing relocation with apfs_util -f?
A: The -f flag invokes FTL_FORCE_RELOCATE which performs a read-modify-write with ECC verification on the target block before updating the BAT. If the source block has uncorrectable ECC errors, the ioctl returns kFTLUncorrectableECCErr and aborts. No metadata is modified unless the read succeeds. However, a power loss during the write phase can leave the BAT inconsistent; therefore, Phase 2 must be run on AC power with battery > 50%.

7. Verification & Post-Repair Validation

  1. Boot to normal macOS and open Terminal.
  2. Run diskutil apfs resizeContainer diskXsY g to verify shrink succeeds below the previous immovable threshold.
  3. Execute sudo fsck_apfs -n /dev/diskXsY; confirm exit code 0 and no IMMOVABLE strings in output.
  4. Stream logs for 10 minutes: log stream --predicate 'subsystem == "com.apple.diskmanagement"' --info | grep -E 'resize|69874|IMMOVABLE'. Zero matches confirms no recurrence.
  5. Validate NAND health: sudo smartctl -a /dev/diskX (install via Homebrew). Check Media_and_Data_Integrity_Errors = 0 and Erase_Fail_Count = 0.
  6. Perform a full Time Machine backup and verify backup integrity with
Still stuck on Error 69874?

Share your exact OS build and Finder/Console snippet in the OS Updates & Error Codes forum room.

Get Peer Triage →