This is just a quick snippet that I spent quite a bit of time researching. It is easily possible to resize an HFS+/Mac OS X volume without using any other tools such as GParted or whatever. Just open up the terminal.app from /Applications/Utilities folder and run the following sequence (remember that I am held responsible for you mucking up your system, so be VERY EXTRA SUPER UBER DUPER CAREFUL when dealing with any sort of disk partitioning on any system):
[bash]diskutil list[/bash]
This will list your volumes, what you will be resizing is #2 (Apple _HFS Macintosh HD), so that comes out to be 'disk0s2' (since your primary boot partition is /dev/disk0)
Next up we'll get to the dirty work:
[bash]diskutil resizeVolume disk0s2 120G[/bash]
This should successfully shrink/grow your volume to whatever limit you've set (120GB in my case). Of course, you can check the volume limits by issuing:
[bash]diskutil resizeVolume disk0s2 limits[/bash]
Finder on Mac OS X should automatically pick up the changed size, but it sometimes could be helpful to reboot to ensure that no other issues pop up.
If you get any errors saying that the volume verification failed, reboot into the single user mode by pressing and holding CMD+S on bootup and run:
[bash]/sbin/fsck -fy[/bash]
Which will in turn do a filesystem check on the main volume.
Ciao.
Comments
comments powered by Disqus