APFS Corruption

I started getting crashes with apps on file opening and Finder crashes on emptying the Trash. Booted into High Sierra and got this on First Aid:

Checking volume.

Checking the container superblock.

Checking the EFI jumpstart record.

Checking the space manager.

Checking the object map.

Checking the APFS volume superblock.

Checking the object map.

Checking the fsroot tree.

error: drec_val object (oid 0xf9): invalid type (0)

fsroot tree is invalid.

The volume /dev/rdisk10s1 could not be verified completely.

File system check exit code is 0.


Is it worth booting into the Mojave rescue partition and try First Aid or is this done for?

Accepted Reply

Ok, fixed.

I booted into Mojave Recovery. But Disk Utility could not run First Aid due to another mounted partition in the container? I have a small separate Lion Partition on the system, but that is not in the APFS container.


I booted into Mojave and tried Disk Utility in it. It created a write-lock (new!) and was able to fix things. All is well.


I will keep a fresh CarbonCopy clone - just in case!

Replies

I have to say this:

- a file system should never corrupt in normal use. There were no kernel crashes and very few app crashes

- APFS should always be repairable from the Disk Utility


There is NO excuse for this unless a system goes down really hard. Apple should have the best tools in this regard no matter what. A file system is the left ventricle, the kernel the right.


Apple has been sloppy in this regard. HFS+ has had to rely on Disk Warrior and other tools. This is not ok.


I am an Apple fan, but just sayin...

Ok, fixed.

I booted into Mojave Recovery. But Disk Utility could not run First Aid due to another mounted partition in the container? I have a small separate Lion Partition on the system, but that is not in the APFS container.


I booted into Mojave and tried Disk Utility in it. It created a write-lock (new!) and was able to fix things. All is well.


I will keep a fresh CarbonCopy clone - just in case!

I don't understand your fix.


I am still stuck with a corrupt APFS container. Here's my problem:


My Fusion Drive in my iMac is now unreadable, since the iMac rebooted and couldn't boot into macOS anymore. The Fusion Drive with APFS is now only shown as greyed out "APFS Physical Store disk0s2", "APFS Physical Store disk1s2" ... all data must still be there, but the APFS container seems to have currupted, like it has happened to me a myriad times before on external HDDs.

Since there is still no tool available that can repair APFS containers, how can I fix my drive? I'm coing to report this to Apple.

I deleted my backup shortly before since it was faulty and I needed a new one, and now I have NO Backup!

Apple, what's going on there? Why does your APFS keep crashing randomly on my HDDs and now my Fusion Drive, making all APFS Volume in the respective containers vanish?


As I see it, the partitions are still shown as being APFS-partitions, but there are no valid containers found.

Hence, the normal partition map seems intact, the APFS-partition map (I guess that's how the containers work) seems to have gone corrupt.

fsck_apfs would only return the partition's block that conatins this info:


0160: 02c3 496e 7661 6c69 6420 7061 7274 6974 |..Invalid.partit|

0170: 696f 6e20 7461 626c 6500 4572 726f 7220 |ion.table.Error.|

0180: 6c6f 6164 696e 6720 6f70 6572 6174 696e |loading.operatin|

0190: 6720 7379 7374 656d 004d 6973 7369 6e67 |g.system.Missing|

01a0: 206f 7065 7261 7469 6e67 2073 7973 7465 |.operating.syste|

01b0: 6d00 0000 0062 7a99 90e1 0713 0000 0000 |m....bz.........|


Neither Disk Utility nor fsck_apfs help.

HELP ME!

So sorry to see this.

I ususally keep dual backups (Carbon Copy Clones and TimeMachine) of all my systems. Especially before risky operations like APFS conversion I will refresh the dual backups. All my docs and media is in the cloud and on multople machines. All my apps are either from the apps store on availabel as installers on separate storage. I am cautious...

I personally have 5 systems in regular use, there twice that many in my house. We do have periodic full failures about once a year - mainly by me trying things on the bleeding edge.

You are aware that APFS is not supported to work reliably on Fusion drives, right?

Can you boot into Recovery and try Disk Utility/Aid from there?

All I can think of is to install a fresh copy of HIghSierra or Mojave on an external drive and run Disk Utility from there. I am not aware of any 3rd party tools that help.

The fact that fsck_apfs could only return the partition block is a very bad sign. You might be wasting your time.

Well no - it is indeed possible to restore corrupt volumes / partitions.

For HFS+, there are enough tools. Just for APFS, there's nothing yet.


And: Mojave converts all Fusion Drives into APFS containers. So that IS intended for the next release of macOS.

I am not sure how many users will face this APFS failure in the future.

As I said, I had the same phenomenon already on external HDDs, so if Apple is still not capable of making APFS run on HDDs/Fusion Drives failuresave, they should work hard on it. I wonder how they can speak about APFS being so failuresave if it seems to crash randomly, making the contents (the volumes) of a whole APFS container unreadable.

This can't just happen out of the blue - but it does.

HFS+ doesn't crash this easily - you'd have errors in the B-Tree or small problems, but your whole volume won't vanish!

Som what's wrong with APFS? And, is there anay software around that can fix APFS containers?

DiskWarrior is still holding out for Apple's final documentation of the APFS standard so they could offer an update to their tool.

Even TechTool Pro 10 offers nothing in that regard.


@@HStriepe: I didn't quite understand your scenario - did your APFS container show in Disk Utility or were you even able to see the APFS volume? What exactly were you speaking about?

As my problem is that the volume "Macintosh HD" is not shown, but only the APFS-containers.

Wasn't aware they were converting Fusion drives.


On my main system I run the command line and prevent APFS conversion on major installs. I also do not trust it. On Mac Pro APDS boots extremely slowly (90-120s instead of 20s on SSD.) I have a 512GB partition for Mojave that is expendable, but also cloned for safety.


Totally agree that file systems in use should never fail to be unrecoverable under normal circumstances.

Could it be realted to this? Does not seem to fit, but we are guesssing.

From the release notes:

Apple File System (APFS)Known Issues• After enabling or disabling FileVault, the volume will become invisible to pre-macOS Mojave systems until the encryption or decryption process completes.


No, I have never actiavted File Vault 2, as I said, the APFS containers just keep crashing in the middle of using macOS (has happened to external disks already with macOS High Sierra, so this is not a new bug to me in Mojave...).