Non destructive resizing of partitions on OsX

Find the name of the disk you want to resize by typing:

diskutil list

#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *160.0 GB   disk0
1:                        EFI                         209.7 MB   disk0s1
2:                  Apple_HFS Hugin                   159.7 GB   disk0s2

In my case i wanted to resize the disk0s2 for to have some room for another partition

Ok lets check if we have room on the disk

diskutil resizeVolume disk0s2 limits

For device disk0s2 Hugin:
Current size:  159.7 GB (159697911808 Bytes)
Minimum size:  121.8 GB (121845587968 Bytes)
Maximum size:  159.7 GB (159697911808 Bytes)

I just need around 1GB so to be on the safe side i want to resize it to 158GB and that is done with the command

diskutil resizeVolume disk0s2 158G

To be on the safe side remount the device (or reboot)

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>