It could be nightmarish if you have got the below message through Disk Utility while repairing HFS formatted internal or external hard drive.
Error: Disk Utility can’t repair this disk. Back up as many of your files as possible, reformat the disk and restore your backed-up files.
The above message doesn’t show up in normal circumstances of disk errors. In most cases, the disk utility is vigorous enough to verify & repair your Apple hard drive. But if the HFS hard drive is beyond the repair scope of disk utility, then it means the directory structure of the drive is severely corrupt.
You can try copy and paste all files from the corrupt external or internal hard drive to another destination. But doing this may also result in copying errors to another location. Moreover, the corruption may not allow you to copy & paste all the files from the disk.
2) Fix Mac hard drive using FSCK
You might have luck with FSCK command line.
To run fsck command you have to restart Mac and log in as ADMIN. Launch Terminal, enter df -h1 and press Return. Use of df-h1 will let you know the path of the internal disk drive.
Use below line
sudo fsck_hfs -r -d /dev/disk1s1
The command (-r) in above code will recreate Catalog B – Tree. It will help you fix Invalid B-tree node problem occurred on the disk drive. It will further resolve errors like –
Invalid key length
Invalid volume file count
Invalid volume directory count
Invalid volume free block count, and likewise.
3) Recover Mac disk using Stellar Data Recovery Professional
Though helpful, fsck isn’t the sure shot method to repair the corrupt external/internal hard drive. You might need the help of a professional disk recovery software for Mac. Stellar Data Recovery Professional is a sophisticated application to scan and recover your HFS drive.
Step 1) Connect your HFS drive and launch Stellar Data Recovery Professional on your machine.
Step 2) Leverage the Create Disk image feature of the software and create a dot dmg file of your corrupt HFS partition. You can save the .dmg file to your desired location. Allow the software to complete the disk imaging process successfully.
Step 3) After the image creation, use the Load Image feature to upload the image to the software. Scan the image file until the software completes the scanning procedure.
Step 4) Preview all the data after the software has completed the scan. If you have activated the Stellar Data Recovery Professional for Mac then you will be able to recover/save your files conveniently. Here is the link to register the Stellar Data Recovery Professional for Mac.
Watch the Video For HFS Recovery
Not just the corrupt HFS drive or volume but you can leverage Stellar Data Recovery Professional for Mac to image an APFS volume for the purpose of data recovery. The process to do the job will be same as mentioned in the sequential steps and the video tutorial.
Vishal is a data recovery expert @Stellar addressing several data loss scenarios on a macOS system. He recommends backing up the Mac proactively. However, Vishal insists on trying a D-I-Y data recovery app on MacBook or iMac for free if the situation arises.