Mac Pro model 5,1 (mid 2012, 3.33 Ghz 6-core Xeon) with 32 GB of stock RAM and the stock video card. I am running High Sierra fully updated.
I have a fairly new 4 TB Seagate HDD (3.5") that I use strictly for data; non-booting, no OS. I use it for my 1.5 TB Home folder since it's way too big for my SSD boot drive. When I installed it late last year, I formatted it as APFS and used CCC (Carbon Copy Cloner) to clone my old drive over to it.
It's been working fine without issues as far as I know. While I was in Disk Utility I ran Disk First Aid on this hard drive and it found the following:
Checking the APFS volume superblock.
Checking the object map.
Checking the fsroot tree.
error: inode_val: object (oid 0x3): invalid nchildren (-1)
fsroot tree is invalid.
The volume /dev/rdisk3s1 could not be verified completely.
File system check exit code is 0.
Restoring the original state found as unmounted.
Operation successful.
Disk Utility gives you the green checkmark "complete", and you have no idea there is an issue unless you click "see details". According to the documentation for fsck_apfs
, exit code 0
means no errors.
I've already looked into third-party tools and there are none that can repair APFS drives. I've also attempted fsck
via the terminal but that results in the exact same error and messages. There seems to be no way to fix an invalid fsroot except for reformatting the drive.
I bought another 4 TB drive, formatted it as HFS, and used CCC to clone the "bad" APFS drive over and get the machine back into use. The new HFS drive passes Disk First Aid without errors.
What does the "invalid nchildren" error mean?
How do I know CCC copied all my files without corruption? Since it was apparently operating without issues except for the First Aid error, I have no idea if any files are missing or corrupted.
Is there another way to fix this drive?No 3rd party utilities can repair, but perhaps through debug mode finding the files that caused the error and restoring or deleting those?
EDIT:
Running fsck_apfs
again in debug mode -d
. Disk was unmounted and it's not the boot disk, yet still had to use sudo
to overcome permission denied errors.
Mac-Pro:~ ••••••••$ sudo fsck_apfs -d /dev/disk3s1
Password: ••••••••
** Checking volume.
** Checking the container superblock.
** Checking the space manager.
** Checking the object map.
** Checking the APFS volume superblock.
** Checking the object map.
** Checking the fsroot tree.
error: inode_val: object (oid 0x3): invalid nchildren (-1)
obj-id: 3 type: Inode
private-id: 3 parent-id: 1 cr/mtime: 1638063393117254350/1663519361466993480
gen-count: 32501214 nchildren: -1
def-prot-class: 0
uid/gid/mode: 0/0/0x41a4 bsd_flags: 0x0 internal_flags: 0x8000 name: NO-NAME
fsroot tree is invalid.
** The volume /dev/disk3s1 could not be verified completely.
FWIW: I have the original 4 TB APFS drive with the invalid fsroot tree in my hands untouched if I need to do further troubleshooting and/or recovery.