Tom Boone wrote:
From looking over than command it looks like this will "erase disk." Is that correct? I'm looking to keep all of the data without having to format the disk.
Yes, that's correct. The command will completely wipe your disk.
The original poster of this thread couldn't partition his external hard drive via Disk Utility. Plus there was anything at all on that disk. So I suggested to reinitialise that particular disk using Terminal.
If you are looking to RESIZE the actual partition on your disk use Disk Utility.
Use Terminal only if you are skilled enough on the command line. The resizeVolume is the correct verb to use in that case. See the below syntax
diskutil resizeVolume
Usage: diskutil resizeVolume MountPoint|DiskIdentifier|DeviceNode size
[part1Format part1Name part1Size part2Format part2Name part2Size
part3Format part3Name part3Size ...]
Non-destructively resize a disk. You may increase or decrease its size.
When decreasing size, you may optionally specify new partitions to create
to fill the newly-freed space. Specify these new partitions as in the
diskutil partitionDisk command. A size of zero will cause a grow fit-to-fill.
Ownership of the affected disk is required.
Valid sizes are floating-point numbers with a suffix of B(ytes), S(512-byte-
blocks), K(ilobytes), M(egabytes), G(igabytes), T(erabytes), P(etabytes),
or (%)percentage of the total size of the whole disk.
A size of "limits" will print the valid range for the current conditions of
the file system and room to grow up to an immovable object (next partition).
A size of "R" for the target partition will resize it to the maximum
possible; "R" cannot be used for the size of new partition triples, if any.
resizeVolume is only supported on a Journaled HFS+ file system.
Experiment on a disk that has no data at all on it.
If you need further assistance, please start your own thread. This one is marked as solved.
And, be sure to have a recent backup before playing around with partition 😉