Nick Shubin | ||||
Home | Articles | Photos | Publications | Site Map |
Nick Shubin
March 17, 2012 (Updated: March 27)
I had an opportunity to troubleshoot a problem occurred after use of the TechTool Pro version 6.0.4.
The user successfully passed all other tests and tools, and approached to the Volume Optimization. It does disk defragmentation and takes much longer than other tools. While the process was running, the user changed his mind and decided to run this tool later. There was an option to cancel. The Volume Optimization has been successfully stopped, and the TechTool Pro has been quit. After that, the target volume (it wasn't the system one) didn't show up in the Finder.
While running, disk utilities quite often unmount the volume they work with to prevent other applications from accessing it. An obvious solution to try first was to use the Disk Utility to mount the volume (TechTool Pro doesn't provide such an option). By clicking the Mount button, I've got this message:
Mount failed
The disk "my_disk" could not be mounted.
Try running First Aid on the disk and then retry mounting.
Following the suggestion, I have run the disk verification, and then attempted to mount the volume again. Disk Utility failed to mount the disk again. Well, it wasn't as easy as it looked.
Using diskutil was ineffective as well. This shell command
diskutil mount disk0s5
returned
Volume on disk0s5 failed to mount
Running
diskutil unmount disk0s5
diskutil mount disk0s5
didn't help as well.
You can notice that the shell commands use the Disk Identifier instead of the volume name. The name of the unmounted volume was grayed out (but still present!) in the Disk Utility, so I could bring up the Info pane to find out the Disk Identifier that was "disk0s5" in my case.
On the developer's forum, I couldn't find any topic with the same problem.
After each attempt to mount the disk using the Disk Utility, these messages were added to the Console log:
3/7/12 11:15:13.000 AM kernel: hfs_mounthfsplus: BTOpenPath returned (5) getting EA BT
3/7/12 11:15:13.000 AM kernel: hfs_mounthfsplus: encountered errorr (5)
3/7/12 11:15:13.000 AM kernel: hfs_mountfs: encountered failure 5
3/7/12 11:15:13.000 AM kernel: hfs_mount: hfs_mountfs returned 5
The Console log has suggested a solution (inspired by the blog of Diego Zamboni)—to use the hfs_mount utility. These two commands did the trick:
mkdir /Volumes/data/
sudo mount_hfs /dev/disk0s5 /Volumes/data/
Update:
Two weeks of use of the drive showed that the solution wasn't final. The affected volume frequently appeared to be unmounted after rebooting. The user had to manually mount this volume almost every day what was quite annoying. Then the mount_hfs utility stopped working and began to return:
mount_hfs: Input/output error
For a workaround, one needed to mount the volume without journaling (the -j key). And then turn journaling on using diskutil:
mkdir /Volumes/data/
sudo mount_hfs -j /dev/disk0s5 /Volumes/data/
diskutil enableJournal /dev/disk0s5
The situation turned to be unbearable, it was decided to backup all data from the affected volume and format it. Since then the problem disappeared at all.
1. Don't interrupt disk utilities. Some tools are just checking the S.M.A.R.T records, others like free disk space consolidation physically move parts of files on your drive. A sudden interruption (caused by a power outage, for instance) can potentially lead to data loss.
2. Before running hard drive utilities, create a backup of all valuable files. Apart from Time Machine, you can use specialized backup software like Get Backup. Obviously, you should save the backup on an independent storage (another drive), not on another volume of the same drive.
© 2016 Nick Shubin. All rights reserved.