My drive is formated to hfs+ and it is not clean.
In example when I'm trying to mount the drive by
mount -f -o rw,
dmesg displays the error:
hfs: Filesystem was not cleanly unmounted, running fsck.hfsplus is recommended. mounting read-only.
So when I'm trying to repair it via
fsck.hfsplus (part of
hfsprogs) it says:
$ fsck -dyf /media/sdd2 ** /dev/sdd2 Using cacheBlockSize=32K cacheTotalBlock=1024 cacheSize=32768K. ** Checking HFS Plus volume. ** Detected a case-sensitive catalog. ** Checking Extents Overflow file. ** Checking Catalog file. Invalid map node linkage (4, 0) ** Volume check failed. volume check failed with error 7 volume type is pure HFS+ primary MDB is at block 0 0x00 alternate MDB is at block 0 0x00 primary VHB is at block 2 0x02 alternate VHB is at block 3906291630 0xe8d547ae sector size = 512 0x200 VolumeObject flags = 0x07 total sectors for volume = 3906291632 0xe8d547b0 total sectors for embedded volume = 0 0x00
Despite of using
-f, the drive is not being repaired.
Here is the explanation of that error according to this blog:
Once the B*-Tree has been checked, fsck moves on to checking the Allocation Map. fsck checks the header node as described above. Then it checks through each node making sure it identifies itself as a map node and has the proper number of records. If the node fails these checks fsck returns “Invalid Map Node.” Then fsck checks to make sure the node height is not 0 (“Invalid Node height”). Finally, if it has made it to the bottom of the tree and the mapSize,(which stores the total number of records in the tree and is decremented each time a node is processed) is not 0, fsck knows there are nodes that are orphaned and returns “Invalid map node linkage.”
However I don't know how to fix that error as it's not being corrected automatically and I can't mount the partition to be writable. Any ideas how to fix that error?
P.S. Disk Utility has similar problem.