APFS, fsck_apfs and 'physical extent corruption' - what's up with my MacBook Pro?

So, this morning I ran First Aid on my SSD and found that my local snapshots had a bunch of extent ref mismatches. I made sure my Time Machine back-ups were up to date, then removed the snapshots using tmutil. I then let Time Machine create a couple more local snapshots and ran First Aid again, and found the same problem in First Aid.


To try and fix the issue I ran Internet Recovery and ran First Aid from there, and while the issues were found, fsck_apfs is reporting "warning: found physical extent corruption but repairs are disabled". It then reports "The volume /dev/rdisk2s1 appears to be OK," which sounds like a contradiction.


Can anyone shed any light on what's up with the 'physical extent corruption'? Thanks!!


For reference, last week I installed the combo update for 10.14.4.


Full output from First Aid (well, fsck_apfs, really):


Running First Aid on “MBP4 HD” (disk2s1)


Repairing file system.

Volume was successfully unmounted.

Performing fsck_apfs -y -x /dev/rdisk2s1

Checking the container superblock.

Checking the EFI jumpstart record.

Checking the space manager.

Checking the space manager free queue trees.

Checking the object map.

Checking volume.

Checking the APFS volume superblock.

The volume MBP4 HD was formatted by newfs_apfs (748.21.6) and last modified by apfs_kext (945.250.134).

Checking the object map.

Checking the snapshot metadata tree.

Checking the snapshot metadata.

Checking snapshot 1 of 2.

error: Cross Check : Mismatch between extentref entry reference count (1) and calculated fsroot entry reference count (0) for extent (0xa9697f7 + 362927)

error: Cross Check : Mismatch between extentref entry reference count (1) and calculated fsroot entry reference count (0) for extent (0xaa1f949 + 65528)

error: Cross Check : Mismatch between extentref entry reference count (1) and calculated fsroot entry reference count (0) for extent (0xaa4fa4d + 27648)

error: Cross Check : Mismatch between extentref entry reference count (1) and calculated fsroot entry reference count (0) for extent (0xaa9e8ea + 524224)

error: Cross Check : Mismatch between extentref entry reference count (1) and calculated fsroot entry reference count (0) for extent (0xabf039b + 1056)

Checking snapshot 2 of 2.

error: Cross Check : FSroot tree references extent (0xaa2f941 + 8191) which is not present in the ExtentRef tree

error: Cross Check : FSroot tree references extent (0xaa31940 + 1388) which is not present in the ExtentRef tree

error: Cross Check : FSroot tree references extent (0xaa5664d + 4608) which is not present in the ExtentRef tree

error: Cross Check : Mismatch between extentref entry reference count (0) and calculated fsroot entry reference count (1) for extent (0xaa2f941 + 8191)

error: Cross Check : Mismatch between extentref entry reference count (0) and calculated fsroot entry reference count (1) for extent (0xaa31940 + 1388)

error: Cross Check : Mismatch between extentref entry reference count (0) and calculated fsroot entry reference count (1) for extent (0xaa5664d + 4608)

Checking the extent ref tree.

Checking the fsroot tree.

error: Cross Check : Mismatch between extentref entry reference count (0) and calculated fsroot entry reference count (1) for extent (0xaa2f941 + 8191)

error: Cross Check : Mismatch between extentref entry reference count (0) and calculated fsroot entry reference count (1) for extent (0xaa31940 + 1388)

error: Cross Check : Mismatch between extentref entry reference count (0) and calculated fsroot entry reference count (1) for extent (0xaa5664d + 4608)

Verifying allocated space.

Performing deferred repairs.

warning: found physical extent corruption but repairs are disabled

The volume /dev/rdisk2s1 appears to be OK.

File system check exit code is 0.

Restoring the original state found as mounted.


Operation successful.


MacBook Pro 15", macOS 10.14

Posted on Apr 1, 2019 4:29 AM

Reply
Question marked as Top-ranking reply

Posted on May 19, 2019 9:07 PM

Hi All


I believe the problem is due to corrupt local timemachine snapshots (when timemachine can't backup to the storage device - example when its not present, it creates a snapshot). I had the same problem and manual remove all snapshots using the following command.


Launch the Terminal (from Applications > Utilities), and then copy and paste this command and press Return:


tmutil listlocalsnapshots /


The Terminal will show a list of local snapshots with names like com.apple.TimeMachine.2018-03-01-002010. To remove a snapshot:


  1. Copy and paste this command: sudo tmutil deletelocalsnapshots
  2. Type a space and then paste in the date portion of the snapshot.
  3. Press Return, and finally press Return.


Altogether, using the example snapshot above, that looks like:


sudo tmutil deletelocalsnapshots 2018-03-01-002010


If it deletes properly, you’ll see Delete local snapshot '2018-03-01-002010' in the Terminal as the response.

Run FirstAid again, this should produce a better report with no snapshot errors.


Catchyou


Similar questions

16 replies

May 20, 2019 12:49 AM in response to Nick_Dore

Hi Nick,


Thanks for posting :)


Yes, I was thinking along those same lines; the first thing I tried was to remove all the local snapshots, using the tmutil in the manner you described. Then, there were no reference count mismatches to report :)


Once any new local snapshots were created, though, the reference count mismatches reappeared, for the same extents.


I eventually erased and recreated the volume, restoring from a Time Machine backup. No errors have been reported since, so whatever the problem was, the OS has worked around it, and local snapshots are created without any reference count problems.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

APFS, fsck_apfs and 'physical extent corruption' - what's up with my MacBook Pro?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.