1

I attempted to update to High Sierra (I'm a year behind). It failed with “filesystem verify or repair failed.” The only option it gives me is restart, which I've tried multiples times, and I'm stuck in a loop.

I tried to boot into recovery mode and run fsck on the volume. However, that fails with “CreateNewBTree returned -34 Disk full error.” My disk is not actually full, Disk Utility reports 33 GB free.

I thought maybe deleting some files might help anyway. How can I mount the filesystem to delete stuff?

Booting into single user mode actually boots me from a disk with "Install macOS High Sierra.app" on the filesystem, not my main Macintosh HD volume. It's like I'm stuck at a point where my boot disk is pointed to this upgrade install disk.

If I turn my computer on without doing anything, it asks for my disk password and shows my user's avatar image, and entering my password promptly jumps to the black macOS loading bar and it tries to install High Sierra, which quickly fails due to the disk issue.

1
  • In theory no, I did a time machine backup this morning, but I did do some work today I'd rather not have to repeat. There must be some way to mount the disk even if fsck fails, no?
    – Aaron Ash
    Commented Jun 20, 2018 at 23:54

1 Answer 1

1

I have this exact same problem on my iPad Pro 256GB after completely filling the disk several times. I've jailbroken it and gotten command line single user access to dismount the user partition so I can fsck it.

Unfortunately fsck_hfs -fdyr fails with

** Rebuilding catalog B-tree.
BlockFindAll:  found 33068 blocks but needed 450588
CreateNewBTree returned -34
   Disk full error
** The volume Data could not be repaired.

The disk sector size is 512 bytes but df displays "1K blocks", so I'm not sure which it is. But it's likely either saying I have 16MB free but need 230MB (512 byte blocks), or 32MB free but need 460MB (1K blocks).

The "aha" moment I finally had was when I just learned elsewhere there has to be CONTIGUOUS free space of the necessary amount! And I don't know any way to defrag a HFS drive from command line, or to even diagnose how fragmented the disk is. In Windows NTFS this is trivial using SysInternals Contig.exe which can also conveniently rearrange individual files to be contiguous. I am not aware of any equivalent tool for iOS/MacOS.

I tried deleting my PhotoData\Thumbnails which was 2x2.5GB files (5GB total) and that only upped the free blocks from 31000 to 33000...

My last ditch attempt is to try and find a large, old file that's never been modified or removed since I got the iPad. That would have the best chances of leaving an unfragmented stretch if I copy it and delete the original...

EDIT: I battled this problem for 16 excruciating months. Ultimately I could not solve it despite an unbelievable level of effort. I’m convinced the BTree became corrupt during a disk full situation due to a bug in iOS HFS driver.

The only solution to save my data was to update from iOS 10 to iOS 12.4 which included a conversion to APFS - completely side-stepping the problem. The conversion happened largely without issue.

However, iOS/Mac mastermind Jonathan Levian has a command line tool HFSleuth (Universal binary, iOS/Mac) at www.NewOSXBook.com that allowed me to see I had a 1.8GB BTree Catalog. Unfortunately, my iPad Pro 9.7” only has 2GB RAM, and his experimental tool crashed with “out of memory” errors every time I tried to run operations that would potentially have resolved the issue (presumably the tool was loading the entire BTree into RAM). On a Mac (or any iOS disk without such a huge BTree) this wouldn’t be an issue as sufficient RAM would be available.

3
  • Let us know if it works!
    – Aaron Ash
    Commented Feb 13, 2019 at 14:34
  • 1
    This was very helpful for my own process. I ultimately managed to remove files with this simple command: mount -o update / More context: apple.stackexchange.com/a/385343/367209
    – Oxidator
    Commented Mar 26, 2020 at 22:18
  • @Oxidator Oh man, I have never heard of this “update” flag! What does it do? I just edited my answer to include a significant postmortem of what turned out to be perhaps the all time worst computer issue I’ve ever battled. I wonder if that flag could have possibly been the miracle I needed? PS: Glad to hear it was helpful and you solved your problem. Commented Mar 27, 2020 at 18:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .