X

Tackling lost partitions on your Mac

Sometimes when a hard drive is improperly unmounted or subjected to software that otherwise modifies the drive's structure, you can end up with a few or all the partitions on a drive being inaccessible.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
4 min read

Partitioning can be a useful way to manage files, accounts, or create multiple boot environments on your computer, so many people use them; however, sometimes when a hard drive is improperly unmounted or subjected to software that otherwise modifies the drive's structure, you can end up with a few or all the partitions on a drive being inaccessible.

While the easiest way to fix corrupt partitions is to repartition the drive, format, and start over, there may be times when important data is still on the drive and you would like to restore it if possible.

When any disk corruption occurs, the first thing to do is unmount and disconnect the drive unless it is the boot drive, even if some partitions on it are perfectly fine. Having it connected and actively accessed will only increase the probability of additional errors, so only connect it when you are ready to fix the problem, if you have chosen to do this.

The next thing to do is consider the sensitivity of the data. If you have exceptionally important data for which there is no backup, consider using a data recovery service (Stellar Phoenix is one, but there are many out there). Keep in mind these services can cost hundreds and thousands of dollars, depending on the extent of the problem and how much recovery is done or needed to be done (NOTE: If you need to send your hard drive in for servicing and recovery, you can always install a fresh copy of OS X or restore from Time Machine to an external drive and continue using your machine).

If you decide to tackle fixing the hard drive yourself, first ensure you have a backup of what you can access. The easiest way is to prepare your suite of utilities and hardware (enclosures, second computers, etc) and have an spare drive or local network volume mounted on your system so you can quickly copy files to it. Then attach the faulty drive and back it up.

When the data is backed up, first try to manually mount the faulty partition with Disk Utility. If you see the partition listed under the device in Disk Utility, select it and try clicking the "Mount" button in the Disk Utility toolbar. If it does not mount, then try run Disk Utility's "Verify Disk" routine on the drive to see if that picks up any errors. If so, try fixing them with Disk Utility; however, if this fails or if Disk Utility does not find any problems, then the next option is to use a more robust utility.

For drive structure problems, one of the best tools available is Disk Warrior, but there are also TechTool Pro and Disk Tools Pro which are great alternatives as well (as of this writing Disk Tools website seems to be erroneously flagged as a malicious site by Google). While the utility Drive Genius is a good program for running maintenance on the hard disk, it is limited in file recovery and "undelete" functions and would not be the best tool to use in the event of lost files.

Use one of these utilities to run a full rebuild of the affected hard disk. You may need to boot off an included boot volume if the faulty drive contains your boot volume. Check the drive's directory structure, and then run scans for files to recover. The easiest way to do this is to use your spare recovery hard drive to dump all found and recoverable files, and sort through them at a later date. One additional thing to keep in mind is even if one utility cannot recover files, another may be able to so do not give up after trying one or two utilities.

Beyond commercial options, if you are terminal-savvy you can use the open-source disk recovery tool "TestDisk" to rebuild corrupt partition tables and perform undelete functions on the hard drive. It is a very robust tool that is included with a variety of Linux distributions, but it is open source and therefore does not come with any guarantee. I have used this utility in the past to successfully locate files on a corrupted NTFS partition on a USB thumb drive that would not mount in Windows or in OS X. The TestDisk Web site contains several example recoveries and other documentation (available at the bottom of the TestDisk webpage) that is exceptionally useful, and recommended reading before using the utility.

Regardless of what utilities you decide to use, after you have recovered your data or restored your faulty partition, back up the hard drive and rebuild it from scratch. While recovery software may get the drive readable again, there is no full guarantee it has fully restored the drive and fixed all errors. There are plenty of situations where hard drives can be unstable but readable, and therefore the first thing to do is backup any additional files you can get off the drive, and then fully partition and erase the drive. After doing this, you can test the drive thoroughly by extensively using it, scanning it with utilities, and benchmarking it.

While you start using the drive again, make sure you frequently back up your files since the initial problem either could have been from a hardware fault. If the drive shows problems either with slow data access, odd noises, excessive spinning, or random dismounts, then your best bet would be to get a new drive.



Questions? Comments? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.