So I was playing around with Disk Utility today. I created a second partition. Format is Free Space.
How do I undo this? As in, I want to have just one primary partition "Macintosh HD"
I've tried:
1) In Disk Utility, I select the partition tab. The "-" character is greyed out. As in, it cant be clicked on.
2) Rebooted in Recovery mode (CMD+SHIFT+R) and did above. Same result. The partition cannot be removed. The "-" button is greyed out. It simply cannot be clicked.
This is what diskutil list
returns:
diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 125.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD *125.1 GB disk1 <---- I believe, this is the second partition I accidentally created, which I want to remove
Logical Volume on disk0s2
8F5A679C-06AB-44CC-BD46-33E327446D80
Unencrypted
Best Answer
The reason is that disk0 contains your actual drive. If you look there, you see that only 125.4 GB of space is allocated to the "Core Storage". Disk 1 is the logical volume (Macintosh HD) which resides in disk0s2 (also named Macintosh HD) so deleting disk1 won't be what you want to accomplish and the tool is preventing you from deleting that "logical device".
You can fix this with the
cs
subcommand ofdiskutil
in terminal to remove the core storage and put things back on disk0s2 in a none-CoreStorage format.For safety's sake, make a good backup before continuing and then revert the core storage volume:
Now let the machine revert to none-CoreStorage layout. Once that's done, you can use the Disk Utility and or
diskutil
to resizedisk0s2
to take up all the space. Then you would re-enable file vault if you want core storage going forward. This may take more time than wiping the drive and reinstalling the OS and restoring your backup - but you will learn more by usingdiskutil
and not need to test your backup now if you've never restored it.I personally don't see any benefit to using Core Storage unless it's for encryption, but you're free to do so. Also, there is an undocumented
diskutil cs resizeStack
operation that I'd be hesitant to rely upon, but if you don't care to lose the data, might be a one trick pony to get your resize done.I'd just revert the core storage to normal storage and then grow your normal partition using Disk Utility from reading the various comments and your initial post closely.