Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dogbone

macrumors 68020
Original poster
It says on the Drive Genius website that it will repartion a drive without losing any data.

I've searched the forums and I haven't found any mention of Drive Genius and I was wondering if there are any recommendations for it and if it would indeed be safe to trust it to repartition a drive without losing data.
 

After G

macrumors 68000
Aug 27, 2003
1,583
1
California
Just wondering why you wouldn't use the built-in repartitioning capability of Tiger?

The command in terminal is "sudo diskutil resizeVolume ...". Only works on HFS+ Journaled filesystems though. I used it to make a 200 MB Windows XP partition to boot Windows XP from a USB hard drive I had handy.
 

dogbone

macrumors 68020
Original poster
Can this be done without losing any data that is already on the drive.

What I have is an external 250 GB single partition drive with data and I want to create a separate 100Gb partition to clone another drive onto without losing the data that is already on the 250gb drive.

Will that terminal command do this? Also if it can, does it have to done though terminal?
 

After G

macrumors 68000
Aug 27, 2003
1,583
1
California
Yes, it can be done without losing data on the original drive.

However, to make a new partition, there needs to be enough space on the drive to contain the new partition. So you couldn't have more than 150 GB of data already on the drive if you want to make a new 100 GB partition.

The command does have to be run from Terminal, but it's not that hard to understand.
Here's the help when you type in the command.

Code:
Disk Utility Tool

Usage:  diskutil resizeVolume [Mount Point|Disk Identifier|Device Node] size
        <part1Format part1Name part1Size> <part2Format part2Name part2Size> ...

Non-destructively resize a disk. You may increase or decrease its size.

When decreasing size, you may optionally supply a list of new partitions to create.
Ownership of the affected disk is required.

Valid partition sizes are in the format of <number><size>.
Valid sizes are B(ytes), K(ilobytes), M(egabytes), G(igabytes), T(erabytes)

Example: 10G (10 gigabytes), 4.23T (4.23 terabytes), 5M (5 megabytes)

resizeVolume is only supported on GPT media with a Journaled HFS+ filesystem.

A size of "limits" will print the range of valid values for the current filesystem.
Example: diskutil resizeVolume disk1s3  10G
         JHFS+ HDX1 5G MS-DOS HDX2 5G

Valid filesystems: "Case-sensitive HFS+" "Journaled HFS+" "Case-sensitive Journaled HFS+" "HFS+" "HFS" "MS-DOS FAT32" "MS-DOS FAT16" "MS-DOS" "MS-DOS FAT12" "UFS" "Linux" "Swap"

So assuming you wanted to make a 100 GB first partition, and a 150 GB second partition, what you would type would be:
Code:
sudo diskutil resizeVolume <path to volume> 100G <new partition filesystem> <new partition name> 150G
where <path to volume> is where your partition is mounted (/ for internal drive, /Volumes/... for external)
<new partition filesystem> is the filesystem type you want for the new partition.
<new partition name> is what you want to call the new partition.
 

the future

macrumors 68040
Jul 17, 2002
3,435
5,514
Very interesting indeed! Is it also possible to merge two partitions? I have an external FW drive with 2 partitions but would like to make it 1 partition without losing the data.
 

After G

macrumors 68000
Aug 27, 2003
1,583
1
California
I think the best you could do is to copy the data over from the second partition to the first partition and then expand the first partition. Again, this would require enough free space to do it, from the first partition itself or from an external drive, to save the data while moving it.

I noticed that you do gain 128 MB of space for each extra partition you remove, as Apple's partitioning scheme likes to put 128 MB of unpartitioned space in between each partition.
 

dogbone

macrumors 68020
Original poster
Something that I find puzzling when splitting for example a 250GB drive up is how to know how big partition to make for the bit other then the 100GB without having anything left over.

For example the internal HD on my emac is 80GB but it can only get 74.5 GB of data on it. I'm not sure exactly where this missing 5 gig is.

So on a 250, if I make a 100GB partition how big should I make the other one to fill it up. Clearly !50GB won't fit as there needs to be some room for the partitioning itself. My emac seems to need 5 GB, what about this 250? how much extra head room does it need.

Also what happens if the two partitions wont fit. What if I made a 100GB partition and made the second one say, 145GB but there still needed to be some extra room. What would happen then. Would diskutil command in terminal just abort the partitioning without doing any harm?
 

After G

macrumors 68000
Aug 27, 2003
1,583
1
California
"diskutil list" should tell you how big your current partitions are.

Code:
mac os x:~ after g$ diskutil list
/dev/disk0
   #:                   type name               size      identifier
   0:  GUID_partition_scheme                    *74.5 GB  disk0
   1:                    EFI                    200.0 MB  disk0s1
   2:              Apple_HFS Cherry             74.0 GB   disk0s2
   3:   Microsoft Basic Data Boot               215.0 MB  disk0s3

In this example, my disk has 74.5 GB capacity. I gave 74 GB to Mac OS X and made a 200 MB partition for Windows XP booting.

You are not actually missing any bytes. An 80 GB HD = 80,000,000,000 bytes. Mac OS X lists your drive in binary bytes, where 1024 bytes = 1 KiB, 1024*1 KB = 1 MiB = 1048576 bytes, and 1024*1 MiB = 1 GiB = 1073741824 bytes. If you multiply the 1 GiB number by 74.5, you should get the 80 GB you are looking for (or darned close). It's a result of converting between base 2 (what computers see) and base 10 (what people see).

I will need more clarification on the "extra room" part. Do you mean the unpartitioned space in between partitions? Or something else?

diskutil will stop if it finds anything wrong. In my case, I needed to repair a Volume Header error on my HD before it would work.
 

dogbone

macrumors 68020
Original poster
Yes the 'extra room' part was because I assumed (wrongly) that this missing space got used up in the partitioning, but now you have explained it as a different interpretation of a GB.

EDIT: whoa that diskutil command is neat. I just went to check my HD but it also booted up my plugged in but unmounted external and gave a readout of that as well.
 

After G

macrumors 68000
Aug 27, 2003
1,583
1
California
Your 250,000,000,000 byte drive should show up as 232.8 GB (or somewhere around there).

So you could do a 100G partition and a 132G partition. I think you do have to take the 128 MB that Mac OS X puts in between each partition into account when making your new partitions. So I guess you could make a 132.6 GB partition, leaving 200 MB or so for the space in between partitions.

Edit: Going off to bed as I have to wake up early later today.
If you have any more questions, they'll have to wait until later.
 

the future

macrumors 68040
Jul 17, 2002
3,435
5,514
After G said:
I think the best you could do is to copy the data over from the second partition to the first partition and then expand the first partition. Again, this would require enough free space to do it, from the first partition itself or from an external drive, to save the data while moving it.

That would work for me as I don't have much data on the 2nd partition anyway (hence the wish to merge). As I'm very (read: absolutely) terminal illiterate, could you possibly tell me which command I would have to type in exactly to expand the first partition? I'd appreciate it very much!!
 

DontBurnTheDayy

macrumors member
Dec 23, 2005
44
0
Michigan
dogbone said:
the future,

you could try typing

telnet towel.blinkenlights.nl then hit "return"

into the Terminal window (you can find Terminal with spotlight)

it will keep you amused while you are waiting.


HAHA awesome!!!
 

DontBurnTheDayy

macrumors member
Dec 23, 2005
44
0
Michigan
About repartitioning the hard drive, here is my situation.

When I installed XP on my MBP, I had little room left on my hard drive anyways, and gave the windows drive only 6 GB of space.

I cleared up 15 GB on my MacHD, and I want to add about 7GB of that to my XP Partition. Is there anyway I can do that? Or do I have to reinstall/repartition?
 

After G

macrumors 68000
Aug 27, 2003
1,583
1
California
the future said:
That would work for me as I don't have much data on the 2nd partition anyway (hence the wish to merge). As I'm very (read: absolutely) terminal illiterate, could you possibly tell me which command I would have to type in exactly to expand the first partition? I'd appreciate it very much!!

Sure. Sorry for the delay.

First, delete the second partition by running Disk Utility from your install discs. Put the install disc in your computer, reboot, and hold down the letter C on your keyboard. Then after picking your language for the installer, run Disk Utility from the menu. Sorry, I forgot which menu item it is, so do some poking around up there.

Then, you would type in the Terminal after rebooting back to your desktop:
Code:
mac os x:~ after g$ diskutil resizeVolume <volume> limits
For device disk0s2 Cherry:
        Current size:   79456894976 bytes
        Minimum size:   9389641728 bytes
        Maximum size:   79456894976 bytes
where <volume> is the path to the volume you want to resize.

Then the command you would run is
Code:
mac os x:~ after g$ diskutil resizeVolume <volume> <Maximum size>
where <volume> is the volume you want to expand
and <Maximum size> is the maximum size from the last command.
 

After G

macrumors 68000
Aug 27, 2003
1,583
1
California
DontBurnTheDayy said:
About repartitioning the hard drive, here is my situation.

When I installed XP on my MBP, I had little room left on my hard drive anyways, and gave the windows drive only 6 GB of space.

I cleared up 15 GB on my MacHD, and I want to add about 7GB of that to my XP Partition. Is there anyway I can do that? Or do I have to reinstall/repartition?

You'd probably have to repartition and reinstall XP; I don't think that the XP partition can be resized but I'm not sure as I've never tried it.
 

projectle

macrumors 6502a
Oct 11, 2005
525
57
Drive Genius works on PPC macs where you can not "resize" your partition through Disk Utility.

diskutil only resizes on GPT partitions (the Partition Tables used in EFI).

If you use a PPC mac, then the current encarnation of diskutil will not work for resizing.
 

After G

macrumors 68000
Aug 27, 2003
1,583
1
California
Sorry, forgot to mention that. I did say I used it to boot Windows XP (which you can't do on a PPC Mac), but apologies to the PPC Mac owners who are trying this in the belief that it works on PPC Macs.
 

jmmo20

macrumors 65816
Jun 15, 2006
1,164
102
I can't seem to find a way to merge partitions.
there are some sites explaining how to take a big partition and split it into 2 partitions, but none explain how to merge them.

in my case, i had bootcamp repartitioned my hardrive.

macintosh hd (disk0s2) with 70gb
and another volume (disk0s3) with 5gb. this volume i then reformated to HFS+ to use with Leopard (time machine)

seeing that 5gb was too small for time machine, i then decided to "merge" the 5gb back into my main partition disk0s2 and maybe leave it at that or run bootcamp again.

what i found was that, because i had subsequently reformated the bootcamp partition to HFS+, Bootcamp did no longer recognise it and refuse to merge it to the main 70gb partition.

I tried the comand diskutil resizeVolume but it did no let me increase the size of the disk0s2 partition (probably because disk0s3 was there!!)

I then deleted disk0s3 using GPT... the partition is gone and i have 5gb of free unpartitioned space on my HD... however..... diskutil still does not recognise it :(

i cannot increase disk0s2 to take up the 5gb free space.
is tehre anything i can do?
 

Bob-o-Link

macrumors newbie
Feb 17, 2008
29
0
Brooklyn, NY USA
It says on the Drive Genius website that it will repartion a drive without losing any data.

I've searched the forums and I haven't found any mention of Drive Genius and I was wondering if there are any recommendations for it and if it would indeed be safe to trust it to repartition a drive without losing data.

Doesn't Disk Utility already do this if you are running Leopard (I'm running the latest, 10.5.4)? Or does Drive Genius do it better, safer, etc.?
 

m1ss1ontomars

macrumors 6502
Oct 1, 2006
273
2
For example the internal HD on my emac is 80GB but it can only get 74.5 GB of data on it. I'm not sure exactly where this missing 5 gig is.

I don't understand why the explanation for this isn't a sticky. Every single damn time I come on here there's someone else asking about this. "My 120 GB drive is only 111.8! My 80 GB drive is only 74.5! Seagate/Maxtor/Fujitsu/Hitachi/WD/Toshiba lied to me! I'll sue them!" Guess what? They didn't lie; they told you on the box that 80 GB is 80 billion bytes, which is 74.5 GB as reported by most OSes. Same deal with 120 GB. This has been common practice ever since we went past 1 KB of storage and some wise-ass marketing exec decided to use base-10 when advertising storage. I don't understand why people haven't noticed it until now.

Also, Seagate already got sued and lost. They owe each of us who bought a Seagate hard drive (not included in a computer) like 50 cents or something per hard drive.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.