PDA

View Full Version : Don't trust Disk Utility




Shiggity
Jun 2, 2013, 08:02 PM
I had a 3 TB external hard drive with two existing partitions -- let's call them "foo" and "bar." I didn't need foo anymore, so I clicked on the "Partition" tab and the minus sign button. Disk Utility informed me that my foo partition would be erased and my bar partition would NOT be erased. After committing the change, it seemed to do what it promised; there was no longer a "foo" partition listed and the "bar" partition was sitting in the middle of the hard drive. Not able to resize the bar partition in Disk Utility to take up the entire 3 TBs, I decided to allocate a new partition to the new free space that had been created where "foo" used to be with the intention of copying data over to the new partition. I clicked once on the free space area, and clicked the plus sign button. Disk Utility informed me that a new partition, let's say I named it "newfoo" would be created and other partitions would not be affected.

When I committed, what did I see? Two partitions, the top one called "newfoo" and the bottom one called "bar?"

No. I ended up with a top partition called "disk6s2" and the BOTTOM one called "newfoo," the latter which had overwritten "bar" and the files that were in bar were not in "newfoo."

At this point, you might be wondering what my question is. In fact, it isn't a question at all, but an admonishment. DON'T TRUST DISK UTILITY. I don't know why there's a partition called "disk6s2" and I don't care. The point is, if you're going to use Disk Utility, pretend you're pushing a button that instead of "Apply" is called "Do unexpected crap that might blow away existing data."



SandboxGeneral
Jun 2, 2013, 08:08 PM
I'm sorry for your [data] loss, but Disk Utility only does what it's told to do. Somewhere in your process you must have missed a step or clicked the wrong partition.

One has to be very careful when adjusting partitions with valuable data on it. It's always best to ensure you have a proper back up before working in Disk Utility.

simsaladimbamba
Jun 2, 2013, 08:13 PM
Or you might have clicked the wrong settings. In all my uses of Disk Utility and formatting around 50 HDDs, even partitioning them and only erasing one of ten partitions on one HDD, I have never came upon such failure and I worked with Disk Utility from Mac OS X 10.2 Jaguar, Mac OS X 10.3 Panther, Mac OS X 10.4 Tiger, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion and OS X 10.8 Mountain Lion.

Also know, that if "foo" is the first partition and "bar" is the second partition, deleting "foo" will not let you extend "bar", as one can only extend/shrink one partition via its end, not its start. Therefore deleting "bar" and extending "foo" would have worked quite well, unless you may have had a corrupted partition table. You could have simply used the ERASE tab with the "foo" partition and be done with it.

To retrieve files, that have been deleted and also been emptied from the Trash or are on unrecognisable partitions or HDDs or on accidentally formatted partitions or HDDs, you can use


Data Rescue 3 (http://www.prosofteng.com/products/data_rescue.php) - trial lets you scan for free, but recovery needs a purchase (99 USD)
Stellar Phoenix Mac Data Recovery (http://www.stellarinfo.com/mac-data-recovery.htm) - trial lets you scan for free, but recovery needs a purchase (99 USD)
FileSalvage (http://subrosasoft.com/OSXSoftware/index.php?main_page=product_info&products_id=1) - trial lets you scan for free, but recovery needs a purchase (99 USD)
DiskDrill (http://www.cleverfiles.com/) - trial lets you scan for free, but recovery needs a purchase (79 USD)
Nice To Recover (http://www.92recover.com/product) - trial lets you scan for free, but recovery needs a purchase (69.95 USD)

Yahooligan
Jun 2, 2013, 08:15 PM
Out of curiosity, did you not change the partition table type from Master Boot Record to GUID when you initially formatted the drive? Unexpected things can happen when you mess with partitions on a drive set to MBR as it's not as flexible as GUID.

If you had used GUID then you should've had no problem resizing the remaining partition unless it wasn't the first partition, which it sounds like it wasn't. As the poster above says, you can't resize the beginning of the partition and extend backwards to the start of the disk, you can only extend the end of the partition.

Hope you had a recent backup and you're only out the time it takes to get it back the way you want.

Shiggity
Jun 2, 2013, 08:56 PM
Somewhere in your process you must have missed a step or clicked the wrong partition.

Since I don't have video proof, I know it'll be impossible to prove that I didn't slip up somewhere. But I definitely remember left-clicking in the free space area and Disk Utility not mentioning at all that it would touch the "bar" partition. It's plausible that the exact combination of file system(s) and steps I took happened to expose a bug in the UI.

----------

In all my uses of Disk Utility and formatting around 50 HDDs, even partitioning them and only erasing one of ten partitions on one HDD, I have never came upon such failure

I'm not exactly new to the process either. That's one of the reasons I trusted my own actions and those of Disk Utility.

Also know, that if "foo" is the first partition and "bar" is the second partition, deleting "foo" will not let you extend "bar", as one can only extend/shrink one partition via its end, not its start. In Disk Utility, you're right, there is no way to do this. Partition Magic had this function, as does some other programs, but not Disk Utility.

Therefore deleting "bar" and extending "foo" would have worked quite well, unless you may have had a corrupted partition table. You could have simply used the ERASE tab with the "foo" partition and be done with it.

If by this you mean I could have copied the files on "bar" to an intermediary directory, then deleted "bar", extended "foo" and copied them back to the new extended "foo," you're right, I could have done that. But the actions I did take theoretically should also have worked, and they didn't.

----------

Out of curiosity, did you not change the partition table type from Master Boot Record to GUID when you initially formatted the drive? Unexpected things will happen when you mess with partitions on a drive set to MBR as it's not as flexible as GUID.

If you had used GUID then you should've had no problem resizing the remaining partition unless it wasn't the first partition, which it sounds like it wasn't. As the poster above says, you can't resize the beginning of the partition and extend backwards to the start of the disk, you can only extend the end of the partition.

Hope you had a recent backup and you're only out the time it takes to get it back the way you want.

In all honesty, I don't remember what the partition map scheme was set to (it's GUID now) and it may well have been MBR. This could have been the problem, and I appreciate your insight. It would have been nice if Disk Utility had (1) been able to handle MBR-typed drives correctly, or (2) refused to commit changes at all, or (3) said something like "Whoa. You're trying to create a new partition on an MBR-typed drive. This will likely screw over your data. Are you sure you want to do this?"

As far as the backup goes, I'm pretty sure that at least some of the data wasn't backed up. What I was doing when this happened was consolidating my data with the intention to back it up. I'm in the process of recovering the files via various recovery software, and I think I should be able to get all of it back.

----------

Unexpected things will happen when you mess with partitions on a drive set to MBR as it's not as flexible as GUID.

I wanted to address this specifically. "Unexpected things" happening is exactly what a DISK UTILITY program shouldn't do and why I wanted to mention my situation in case others decided to try this.

Yahooligan
Jun 2, 2013, 09:07 PM
I should clarify and say can happen, not will. I've edited MBR partitions with Linux without issue, but sometimes partition alignment can get off and screw things up. I haven't had any issues when changing partitions that use GUID.

blueroom
Jun 2, 2013, 09:19 PM
All the more reason everyone should have a backup solution.

Shiggity
Jun 3, 2013, 12:50 AM
All the more reason everyone should have a backup solution.

Yeah, well. I do have one, a time capsule. It won't fit all my data, because some of it is redundant, because of backup attempts of yesteryear. That's why I was consolidating my data which ironically caused this problem.

dontpannic
Jun 3, 2013, 01:06 AM
That doesn't matter, if you are messing around with partitions you should ALWAYS have a backup before you start.

SandboxGeneral
Jun 3, 2013, 05:10 AM
Yeah, well. I do have one, a time capsule. It won't fit all my data, because some of it is redundant, because of backup attempts of yesteryear. That's why I was consolidating my data which ironically caused this problem.

That doesn't matter, if you are messing around with partitions you should ALWAYS have a backup before you start.

That's exactly right. Any time one is going to do anything that has potential for disastrous data loss, a fresh back up is the first thing that should be done before going any further.

maflynn
Jun 3, 2013, 05:23 AM
DON'T TRUST DISK UTILITY. I don't know why there's a partition called "disk6s2" and I don't care. The point is, if you're going to use Disk Utility, pretend you're pushing a button that instead of "Apply" is called "Do unexpected crap that might blow away existing data."

I don't trust any disk utility. If I'm going to use that on my disk, I make sure I have a backup of my system. Too many things can go wrong, always make sure you have a solid backup strategy.

Sorry about the issues, its never fun when this occurs :(

crjackson2134
Jun 4, 2013, 01:27 PM
That doesn't matter, if you are messing around with partitions you should ALWAYS have a backup before you start.

In a perfect world, we all have extra drive space and money. I've had issues like this in years past myself. Out of backup drive space, and no money to simply add more. I did the same thing he did. Data consolidation IS proper housekeeping (along with having sufficient room for backing everything up).

No one is disagreeing about the backup should have been done. Point is CRAP HAPPENS when least expected. This is how one discovers limitations of the tools being used. OP has already learned not to trust the HDUTIL tool alone. Lesson learned.

fisherking
Jun 4, 2013, 02:11 PM
In a perfect world, we all have extra drive space and money. I've had issues like this in years past myself. Out of backup drive space, and no money to simply add more. I did the same thing he did. Data consolidation IS proper housekeeping (along with having sufficient room for backing everything up).

No one is disagreeing about the backup should have been done. Point is CRAP HAPPENS when least expected. This is how one discovers limitations of the tools being used. OP has already learned not to trust the HDUTIL tool alone. Lesson learned.

for all the experiences we've had, and all the stories we've heard, there's simply no reason NOT to backup regularly; external drives are not expensive. & there are online solutions (i use crashplan). before doing ANYTHING, back up.