Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

So if I have two partitions on one hard drive can I combine them without losing the data that is on one of them?

So if I have two partitions on one hard drive can I combine them without losing the data that is on one of them? If not, could I just do a time machine backup, combine the two partitions, and then restore the time machine backup? Would that work?

Mac mini, Mac OS X (10.6.7), Mac OS X Server; 2.66GHz; 8GB; 1TB

Posted on Sep 1, 2011 7:25 AM

Reply
Question marked as Best reply

Posted on Sep 1, 2011 7:46 AM

Diskutil has a mergePartitions command. It has caveats: only partitions that are sequential on disk can be merged, and only the data from the first partitions will be preserved, and only if it's a partitions formatted as journaled HFS+. in terminal, you would type:


diskutil mergePartitions firstPartition lastPartition


where first and last partitions can be specified bu mount points, disk identifiers, UUIDs, or device paths. see man diskutil for details.


Be careful. the command diskutil mergePartitions disk1s1 disk1s3 will merge partition 1, 2 and 3, not just 1 and 3. This is particularly tricky if you use mount points: diskutil mergePartitions /volumes/gumby /volumes/foxtrot may erase other partitions accidentally or may do nothing at all if you are not sure of the partition order on disk. Run the command diskutil list in terminal to make sure you have your specifiers and formats correct before you try merging.

4 replies
Question marked as Best reply

Sep 1, 2011 7:46 AM in response to Barry Lee Reynolds

Diskutil has a mergePartitions command. It has caveats: only partitions that are sequential on disk can be merged, and only the data from the first partitions will be preserved, and only if it's a partitions formatted as journaled HFS+. in terminal, you would type:


diskutil mergePartitions firstPartition lastPartition


where first and last partitions can be specified bu mount points, disk identifiers, UUIDs, or device paths. see man diskutil for details.


Be careful. the command diskutil mergePartitions disk1s1 disk1s3 will merge partition 1, 2 and 3, not just 1 and 3. This is particularly tricky if you use mount points: diskutil mergePartitions /volumes/gumby /volumes/foxtrot may erase other partitions accidentally or may do nothing at all if you are not sure of the partition order on disk. Run the command diskutil list in terminal to make sure you have your specifiers and formats correct before you try merging.

Sep 1, 2011 8:08 AM in response to Barry Lee Reynolds

It sounds like a reasonable plan, but I've never used time machine for that purpose so I can't say for certain. The only sticking point would be if time machine keeps track of the UUID of the disk it's backing up - when you repartition the drives the UUIDs will change, which might interfere with the restore. That doesn't strike me as likely, mind you, but I'd want to be sure I could recover the data before I tried it. Maybe someone else can say.

Sep 1, 2011 11:25 AM in response to twtwtw

I just read some up on time machine and it seems you can either restore data from the same mac or from another mac. If you do it for the same mac, you simply do a restore. From another mac it will just import everything over from a fresh install. I think I will give it a shot and see what happens.


I got myself into this mess for nothing having enough hard drive space. I was not using the server software so I wanted to install regular SL on one of the HDs but the other hard drive was filled with ripped DVD content, so I decided to partition and install SL and then I could delete the server portion. I did not know (stupidly) that I could not recombine them without losing the data. I ordered a 3TB drive that will arrive here tomorrow (hopefully) and I will get all that straightened out. I'll post what happens. Either way, I will do a time machine backup as well as another backup of my itunes, iphoto, and two media database programs I use. The other stuff I have on the computer is easily replaced. Documents are all saved in Dropbox anyway.

So if I have two partitions on one hard drive can I combine them without losing the data that is on one of them?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.