0

I accidentally ran this command and now I am missing 100gb of space, how can I get it back? All help appreciated!!

diskutil eraseVolume free %noformat% disk0s2

Terminal gives this diskutil info: enter image description here

And this corestorage info: enter image description here

Partitioning will only allow me to change the 68gb and not the full 250gb.

2
  • Do you want to restore the old content or do you want a new volume? Is it an external hard drive?
    – klanomath
    Apr 24 '16 at 5:56
  • It is the actual computer SSD. I have a backup of everything. I just want to get the space back. After running that command I am not able to find about 100gb of free space using disk utility. I deleted a 100gb partition and since it used the %noformat% I cannot figure out how to get it back.
    – John S.
    Apr 24 '16 at 14:37
1

The proper command to resize your main volume to completely fill your disk is:

diskutil resizeVolume disk0s2 0

Usually you have to enter a size like 249g but 0 acts as a magic number and resizes to full size (fit to fill) while moving Recovery HD automatically.

8
  • Yes I tried that before and this is the exact error I get: Error: -69742: The requested size change for the target disk or a related disk is too small; please try a different disk or partition, or make a larger change
    – John S.
    Apr 25 '16 at 3:43
  • Macs-MacBook-Pro:~ mac$ diskutil resizeVolume disk0s2 0 Resizing to full size (fit to fill) Started partitioning on disk0s2 Mac Verifying the disk Verifying file system Using live mode Performing live verification Checking Journaled HFS Plus volume Checking catalog file Checking catalog hierarchy Checking extended attributes file File system check exit code is 0 Resizing Error: -69742: The requested size change for the target disk or a related disk is too small; please try a different disk or partition, or make a larger change
    – John S.
    Apr 25 '16 at 3:45
  • @JohnS. Please try diskutil resizeVolume disk0s2 150g. You may have to repair your volume/disk first!
    – klanomath
    Apr 25 '16 at 3:45
  • Running the second command gives: Error: -5341: MediaKit reports partition (map) too small; if you recently grew your whole-disk, you should run whole-disk repair
    – John S.
    Apr 25 '16 at 3:46
  • I have used the built in diskutility repair function for both the partition and the disk but it does not find anything to repair..
    – John S.
    Apr 25 '16 at 3:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .