Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

fsck_apfs check error

Just after upgrading to High Sierra for few days and running with APFS auto-conversion

I had 2 kernel-panics (almost forgotten that those exists...) and now I got this:

-bash-3.2# fsck_apfs /dev/rdisk2s2

** 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 0x76ed006): invalid type (0)

fsroot tree is invalid.

** The volume /dev/rdisk2s2 could not be verified completely.


I don't have a clue what "error: drec_val object XXX invalid type (0)" means.

So what Do I do now? Pray to the gods of internet since APFS sources aren't released,

there is no documentation and now what? I can go and reformat my drive because

that the base fs can't be repaired? Really?

I'm seriously amazed at the quality and implementation of such major change as APFS.

iMac, macOS High Sierra (10.13), null

Posted on Oct 19, 2017 6:15 AM

Reply
19 replies

Oct 19, 2017 7:43 AM in response to Synaps1s

So, if you have one drive in your mac and it happens to be a SSD - you are basically saying that APFS recovery is useless, then what is it there for?


You have a recovery option saying you that you can't use the recovery option and this makes sense to you?

I think my sense of sane computing is different then yours. That being said, this is not the "solution" I am looking for

since (as it did by booting from a USB stick - which is the very same thing pulled from the internet) I got the same error message again.

Oct 20, 2017 10:14 AM in response to Synaps1s

OK, but how do I repair a Filesystem then? Diskutility does nothing else as wraps around fsck, and fsck is not working - so what do I do now?


What is Apple doing if their FS's fails? Format the Volume? For real? APFS is not only dangerous in use,

it's absolutely insane to roll out a "upgrade" without bullet-proof repair tools for it.


How are the users suppose to actually work with this? I mean imagine any Unix out there doing the same- am I missing something, but those are basic scenarios like sudden power off, service interaption, forced restarts, system stops - not some fancy marginal scenarios but casual scenarios.


This can't be real - no working fsck, call support, pray to the internet god...

Apple, please release the sources of APFs, so other smart people can make repair tools that actually work. I still can't believe that it is the case.


Software level errors on Filesystem = Volume reformat. What is this? 1993?

Oct 19, 2017 6:45 AM in response to Synaps1s

Update: after starting through the only one available Recovery from the very same disk drive

where on the whole drive there is 1 APFS Container with 4 default volumes setup (erased, fresh GPT based default APFS)

I got this hillarious message - I was buffled and had to re-read this few times:

Repairing file system.

Volume was successfully unmounted.

Can’t repair volume because other APFS Volumes in its Container are mounted.

Unmount them, or perform a repair while running from another macOS system (such as the Recovery System).

Restoring the original state found as mounted.

Unable to unmount volume for repair.

Operation failed…


You gotta be kidding, right? What "another macOS system" is being referred here? I have only

one macOS system - and that is a fresh 1 SSD hard-drive High Sierra installation, AND this is

actually the very Recovery System that is supposed to repair the very same disk.

I can go and reformat my drive because that the base Filesystem (marketed as the key feature) fs can't be repaired?

Apple, for real? I'm seriously amazed at the quality and implementation of such major change as APFS.

So any one got a usefull solution on how to repair a FS that can't be repaired with it's own repair tools?

Dear reader. Understand my irritation and frustration- I am sorry for the sarcasm, it's not directed at you- I had to let it out, somehow.

otherwise I would have imploded while writing the 3rd sentence of this post.

Oct 19, 2017 7:08 AM in response to Synaps1s

Update II: After making a new USB bootable High Sierra installer (otherwise Recovery can't repair APFS Containers it is a part of, yup, for real) I found that -d flag (of course, documented in places I haven't been able to find) works with this version as it does in all previous versions (-d as for debug) and got a bit more output from it: In bold I marked new parts from the fsck_apfs command output (as usual very useful and informative without doc's...)


bash-3.2# fsck_apfs -d -l /dev/disk5

fletcher64_init:58: Selecting AVX2 implementation of fletcher64

** Checking volume.

** Checking the container superblock.

** Checking the EFI jumpstart record.

** Checking the space manager.

** Checking the object map.

** Checking the APFS volume superblock.

warning: apfs_sb at apfs_fs_index (0): apfs_features has unrecognized features (2)

** Checking the object map.

** Checking the fsroot tree.

error: btn: key (2) compare error: 22

fsroot tree is invalid.

** The volume /dev/disk5 could not be verified completely.


Sidenote: who is fletcher anyways? Please, tell me there is some sanity in APFS and one can actually repair

the FS without erasing the whole thing, and what then if I run into the very same error again?

How is Apple handling this internally I wonder, can't imagine Tim Cook reinstalling his macOS after this 😉

Oct 19, 2017 7:23 AM in response to anonyme4321

What for? I want to repair a core filesystem, not reinstall a operating system. Operating system still operates (to a degree) - what is not operating is the underlying filesystem the same operating system resides on.


Reinstalling won't solve anything since the probability is quite high that I will land in the same place again after few days of usage as I did now. Since computers do crash from time to time- or one pulls the plug on a running one unintentionally or (insert some other sane reason here)- ergo: service interruption happens, and one could assume that a new filesystem would be bullet-proof against such casual scenarios, right? Now I am not so sure about it.


I mean, imagine you have to reinstall your operating system each time your kid pulls your power cord

while running around you– since after reboot you find out that you have a filesystem called APFS that can't be

casually repaired (like filesystems do) from tools provided by its developer.


Does this makes sense to you?


Please don't take it personally - I'm just frustrated and sarcasm helps me to let out some steam otherwise computer hardware would have a very sad and short livespan because I seriously struggle to keep with my anger management in check.

Oct 19, 2017 7:53 AM in response to anonyme4321

I don't have disk errors, and I am absolutely sure about it. The SSD drive is fault free. I made sure about that with by booting a linux, runing hdparm, smart tests and re-checking logs for any kind of hardware faults.


It's not a hardware issue- and macOS kernel would spill something in dmesg if there is any kind of hardware issues.

I work with BSD/Unix'es for more then 20 years so I know a bit about it, and macOS is BSDish os with a fancy GUI 😉

Oct 19, 2017 8:32 AM in response to Synaps1s

What model iMac and what model SSD? There are thousands of permutations and Apple only tests what they manufacture and sell themselves. If you already provided those details I can't find them. Please endeavor to stick to the facts and omit irrelevant information. It makes it difficult to find relevant details.


I work with BSD/Unix'es for more then 20 years so I know a bit about it, and macOS is BSDish os with a fancy GUI


Fine, but be advised Macs and macOS incorporate proprietary hardware and software features that no one outside of Apple knows or is willing to discuss. APFS is one of them. That's essentially the opposite of open BSD platforms, and a Mac cannot be expected to work the same way.

Oct 19, 2017 8:54 AM in response to John Galt

John, thank you for your answer, I thought that Darwin + fancy GUI = macOS applies since it was synced with FreeBSD in 2000's, did something changed? Anyways, what I would like to know is how to repair my APFS filesystem.


Hardware: iMac (27-inch, Late 2013), 256GB stock SSD, nothing special, nothing fancy. Standard issue hardware and I am certain that this hardware is flawless.


What I expect is APFS to be repairable without reformatting a Container/Volume within terminal based tools, you don't?

Oct 19, 2017 11:33 AM in response to Synaps1s

I don't know. DU's or fsck's "Repair" options don't always work, and as you know Apple's APFS documentation is sparse. I encourage you to Contact Support and ask them what options you have. I wouldn't be surprised if they told you to reformat the Mac's flash storage though. If that's their only suggestion then just be persistent, and with any luck at all you may get the attention of an engineer.


fsroot tree is invalid.


That's the problem, and I don't know of a way to fix it short of reformatting.


warning: apfs_sb at apfs_fs_index (0): apfs_features has unrecognized features (2)

Whatever those "unrecognized features" are, Apple does not explain.

Oct 19, 2017 2:23 PM in response to John Galt

stupid question: but you didn't try to format AFS whole drive instead of a single partition right? Alternatively - you didn't try to partition a partition rather than partition the whole drive, right? I did that once 🙂


First I'm unsure on all mac that "Command-R" during boot is a pure internet boot. I was reading about installing Win10 and something said there is an "Apple Boot Parition" (bsd uses such a thing) that is hidden that has the software Command-R uses. (forget what that has to do with dual boot and using boot camp - but at least for some imac models if that were corrupted one would be forced to boot from USB of an apple image download).


ok well your a 'nix user so didn't you try unmounting the disks (except for the external one you booted from from the boot menu - which you smartly pressed a key combo i can't remember to see) and running the filesystem checking with "automatic repair = yes" ? and if the filesystem checker/repair-er-er can't fix it are you not prepared to format the drive? it's not true that "fsck" can fix everything right?


APFS is new so I would count on the (commandline) utilities that work with it to be ... new. You might not even have found all the programs Apple has made available that are new. I was surprised (as a linux more than bsd user) when I had to use diskutil(1) to unmount a drive without dis-connecting it (from the usb drive list - umount was doing that so i couldn't dd an img).

Oct 20, 2017 10:19 AM in response to QuietMacFan

Thank you for your answer- but most of the things you write are not correect. Apple Boot Partition was a previous disk partition scheme, nowadays modern drives uses GPT partition scheme and boot through uEFI (as all intel mac's do),

There is no pure internet boot either- since the download has to go somewhere BEFORE it is mounted, since it is a base system image that is being mounted, where do you think it goes? RAM?

Nov 4, 2017 7:34 PM in response to John Galt

this is totally off topic (replying to an off topic comment by original poster)


I don't agree Apple should release intellectual property that is not on their developer source code site they withhold (perhaps they are just late releasing source, though).


Were apple to do that, xxxx would steal it, put their names on it, and use it to promote "dual boot" machines that were incompatible with it or hacked it. Or, as often as not, release products that use it without releasing source code to the public composed of stolen software (something like Unity Game Engine) that is posed to ruin apple's business in favor of, say, Google.


No good comes from giving hackers free valuable code these days, many hackers are militant efforts in hiding and are up to no good, and the rest are up to no good, and the few left: are locked out by passwords.

Nov 4, 2017 8:02 PM in response to Synaps1s

drec_val probaby means "disk record"


The upgrade notes i saw said APFS is currently suggested only for optimal SDD (not even sata attached sdd necessarily: apple built-in ssd slot ssd). I read that shortly after an initial release High Sierra stopped making APFS default for non-ssd drives due to various reported difficulties. And that High Sierra either no longer formats SATA to apfs or that apfs had been fixed (whichever comes first, but the default choice for upgrade should work).


Your free to use UFS if you like: the high sierra upgrade notes say you can still choose UFS over APFS (any FS apple supports for that matter, which is two or just a few). And APFS - I'm unsure where you saw any apple legal statement that they were not releasing source code to developers. can you cite where you found any such statement?


You maybe had a disk failure or perhaps a power outage caused the loss. or, maybe you tried running "fix disk" on a mounted disk which caused corruption. At any rate you have a broken record and who knows if that belies some further problem underneath.


Anyway the advice you were given early on, "reformat your disk", is likely the most direct and sure to work cure.


I'm not conviced Apple didn't provide a "chkdsk" that works nor that apple's fsck didn't already fix the fixable errors. As I said earlier: "fsck" and "chkdsk" never did fix "any or all problems". Moreso forced fixes by fschk NORMALLY do cause corruption (in my experience, having applied such a few times on disks with real issues: such as the EZ-DRIVE bug that Maxtor hard drives shipped with).


as far as dual booting: what is normal is that the internet is not a nice place: linux has been known to corrupt WIndows10 and Apple things, WIndows 10 has been known to corrupt linux and apple, and Apple ... well i'm not sure it's often just "never released". all of the previous never admit this until one is looking for articles about "why it happened / how to fix" - and it's not nice to say these things after one is aready up the creek w/o a paddle.


SUMMARY: Apple is not corrupting your system. It's the least corrupted system with the greatest uptime I've ever had (all things considered - this includes that it's running allot of upgrades and apple softwares, whereas compared to my linux box - linux is stable but not upgrading and not running multimedia heavy apps). Note I only use app store though - and do not install apps that "alter the OS". Also Apple is not preventing you from developing.

fsck_apfs check error

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