Resizing of Mac Partition with Disk Utility and Terminal Application

Spread the love

OS X comes with a verity of inbuilt utilities and tools to configure your system according to the requirements and Disk Utility is one of them. Using Disk Utility, you can easily add, delete and even resize Mac disk & OS X partitions, it also allows you to burn DVDs and CDs, create disk images. Disk Utility comes as the “diskutil” terminal command and is located in /Applications/Utilities.

If you are a regular user of Mac, you should know how to manage your hard drive with this inbuilt tool. Your complete Mac performance is dependent upon the management of the hard drive.

The Disk Utility is developed to allow you to resize Mac disk & OS X partitions as well as add, remove the user-accessible disk partitions. When you open Disk Utility, it will show the user-accessible partitions. On the other hand, in the Terminal, the ‘diskutil’ command is more robust and has the capability to manage more details about the hard disk. In Terminal, whenever you write “diskutil list” command and press ’Return’, the system will automatically display the output of each partition of all the devices, which can be resized and also check out hidden partitions, if any.

  • Free Mac Disk Optimization Software for EL Capitan

However, there are some more ways to enhance the capabilities of Disk Utility by which, you can manage several partitions without using the Terminal. You just have to enable the hidden features of Disk Utility by enabling the program’s “Debug” menu. To enable menu, enter

command: defaults write com.apple.DiskUtility DUDebugMenuEnabled 1

in the Terminal. It will edit the preferences of Disk Utility.

Macintosh HD partition list will look like this, where you can resize, rename and expand the Mac OS X existent and new partitions.

Resizing_of_MAC_Partition_with_disk_utility_and_terminal_application

Let us have a look at some common steps by which you can easily manage and can resize your internal volumes of hard drive with Disk Utility and Terminal. It is recommended that if you are considering the use of Disk Utility, take backup of your data in case something goes wrong.

  • Firstly, create a backup of your work, you can do this using Time Machine, which is built-in backup feature of OS X. Make sure that your backup works and your complete data should be there in the system.
  • Resizing hard drive partitions: In the Disk Utility it is very easy to make a volume smaller for that you just have to drag the grey-striped triangle in the lower right corner of the partition. However, you cannot assign this free space to another volume directly.
  • Here are two steps by which you can assign free space of one partition to another:
  1. Merge both the Partitions: To merge two volumes you have to go to “Utilities” in the “Applications” folder or you can simply press Cmd-Shift-U in the finder. It will launch the Terminal, now type ‘diskutil list’ and this will display a list. The list will look like this:

For example if you wanted to merge #2 and #3 then the command will be

diskutil

Resizing_of_MAC_Partition_with_disk_utility_and_terminal_application_1

mergePartitions “Journaled HFS+” new disk0s2 disk0s3

In Mac OS X, the standard is that the first volume needs to have journaled Hierarchical File System Plus (HFS+) file system; otherwise, the data will be wiped. Here, in the partition list, you can merge more than two volumes in one go. Now, we have to specify to the system that merged volume will have the same file system. Always remember that this command works only on Intel Macs with hard disks formatted using the GPT (GUID Partition Table) format with HFS+ file system.

  1. Resizing Process: To resize a partition, create a new partition in the freed-up space, or in the terminal type command like

diskutil resizeVolume disk0s2 90G JHFS+ Users 250G

It could be different for you, depends according to partitions.

If you are using Disk Utility, drag the volume and decide the size of it (size will be displayed on the screen according to selected area) or you can type the size manually. Now, click the ‘+’ button (which is placed on the lower side of the disk list) to create a new volume.

  • Now, a new volume has created. To check, move your home folder using Terminal and type the command

sudo ditto -rsrc /Users/[YourUserNameHere] /Volumes/[Volume-Name]/[Folder-Name]/[Your-User-Name-Here]

this command will assure you that all the meta data of your files are saved when copied.

  • When you are done with all the above steps, now, go to ‘System Preferences’ → ‘User Accounts’ and right click on your username and choose ‘Advanced options’ and set a home directory to your recent copied folder. Now, reboot the system and everything should work well.

When the actual resizing starts Disk utility will verify the disk on the partition being resized. In case you are resizing the partition on your startup disk, your OS may respond slowly during the process. If any error occurred at during the progress, you will get a message that verify failed and the disk will not be partitioned. Make sure that you have created a backup so that if any error occurred you can boot the backup file and restore your complete data.

Note: In case you get any error message during the resizing procedure, do not worry, cancel the process and repeat it again.

Himadri Subrah Saha

Himadri is an ICT Professional who writes for his technology tips & tricks related blog TechnTechie. Though it is hard to balance time in between professional life and blogging, he still manages time to work for his own blog and writes almost regularly. The dashboard of this WordPress is the only place where he does not feel tired! Read my other blogs @ PetCare and Teleinfo

0 0 votes
Article Rating

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x