Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DuncanGarp

macrumors regular
Original poster
Sep 6, 2018
194
205
Hello Folks

I have a Macbook Pro Mid 2012 (on Mojave) that has an internal SSD disk with 2 partitions:
  1. MommyMerge (APFS format) - Partition #1
  2. DaddyTemp (HFS+ format) - Partition #2
ran diskutil list and here's terminal display:

Screen Shot 2019-05-25 at 7.52.37 PM.png

I've been trying to delete the 2nd partition and merge it into the 1st.
Ran Disk Utility but haven't had any luck.
Tried these:
  • Erase partition #2 but cannot delete it.
  • Resize partition #1 but cannot.
None of these is core storage, and the other weird thing is that partition #2 is defined as Apple Boot although partition #1 is what I boot into. Checked System Preferences | Starting Disk to verify.
My goal is to only have 1 partition to boot to and also store all my data.

Any suggestions? Thanks.
 
Last edited:
The problem here is DaddyTemp is partition one (not two) and there is no way to erase it because it is "above" the other volume.

The easiest thing at this point would be to just make a Time Machine backup to a local USB drive, then option key boot to that drive. Then from there in DU select show all devices, then select the drive itself at the very top and erase the whole thing to APFS. Then restore the TM backup.

Screen Shot 2019-05-26 at 6.23.14 AM.png Screen Shot 2019-05-26 at 6.23.06 AM.png
 
  • Like
Reactions: DuncanGarp
I wanted to try this out myself to see what happens. The advice given in post #2 won't change - you can't expand the APFS partition - but it turns out that if you had put the APFS partition first and the HFS+ second, you would have been able to.

These are for example only, but if you had the APFS partition first, you can erase the HFS+ and Recovery partition? (it's the typical size for a Recovery partition although it's usually named "Recovery HD"), you would enter:

sudo diskutil eraseVolume free free /dev/disk0s2
sudo diskutil eraseVolume free free /dev/disk0s3

Then, you would enter:
sudo diskutil ap resizeContainer /dev/disk1 0

(Again, this is for people who want to do what the OP wants to do but who put the APFS partition first. You have to use the disk/partition number which correspond to your specific situation - not necessarily these same numbers.)

I tried this out on a 1TB HDD and when the HFS+ partition was first, when I deleted the HFS+ partitions and enter the following command (where disk6s3 is the diskutil list "Apple_APFS Container disk X" entry)

sudo diskutil ap resizeContainer /dev/disk6s3 limits

I get:
Resize limits for APFS Physical Store partition disk6s3:
Current Physical Store partition size on map: 499.9 GB (499930456064 Bytes)
Minimum (constrained by file/snapshot usage): 78.0 GB (78014054400 Bytes)
Recommended minimum (if used with macOS): 88.8 GB (88751472640 Bytes)
Maximum (constrained by partition map space): 499.9 GB (499930456064 Bytes)

So it's telling me I'm at the maximum size. In the manpage, it says the following: "Grows are constrained by the amount of partition map free space trailing the targeted or implied Physical Store partition."

When I enter the following command (disk7 being the synthesized container):

sudo diskutil ap resizeContainer /dev/disk7 0

I get:
Error: -69743: The new size must be different than the existing size

However, same situation - but the APFS partition is first and I create a HFS+ partition second (disk6s2 is the "Apple_APFS Container disk X" entry, after I run the disktutil eraseVolume command)

sudo diskutil ap resizeContainer /dev/disk6s2 limits

I get:
Resize limits for APFS Physical Store partition disk6s2:
Current Physical Store partition size on map: 500.1 GB (500064673792 Bytes)
Minimum (constrained by file/snapshot usage): 81.8 GB (81805705216 Bytes)
Recommended minimum (if used with macOS): 92.5 GB (92543123456 Bytes)
Maximum (constrained by partition map space): 1000.0 GB (999994101760 Bytes)

Notice the maximum is now the size of the 1TB disk. When I then enter

sudo diskutil ap resizeContainer /dev/disk7 0

it goes and resizes the container to 1000.0GB.

(This was done on a HDD - maybe it's different on a SSD considering what the man page says, I wouldn't think so.)
 
Last edited:
  • Like
Reactions: DuncanGarp
The problem here is DaddyTemp is partition one (not two) and there is no way to erase it because it is "above" the other volume.

The easiest thing at this point would be to just make a Time Machine backup to a local USB drive, then option key boot to that drive. Then from there in DU select show all devices, then select the drive itself at the very top and erase the whole thing to APFS. Then restore the TM backup.

View attachment 839051 View attachment 839052

Thanks @Weaselboy for the response and suggestion. One question regarding your suggestion. Is the USB drive for the TM bootable?
[doublepost=1558923714][/doublepost]
I would use Carbon Copy Cloner instead of TimeMachine. I have found it to be faster than TM and able to create a bootable drive.

Thanks @haralds for the suggestion. I'm going to try Carbon Copy Cloner for this if the @Weaselboy won't work. Does Carbon Cloner defaults to creating the USB TM backup bootable?
[doublepost=1558924271][/doublepost]
I wanted to try this out myself to see what happens. The advice given in post #2 won't change - you can't expand the APFS partition - but it turns out that if you had put the APFS partition first and the HFS+ second, you would have been able to.

These are for example only, but if you had the APFS partition first, you can erase the HFS+ and Recovery partition? (it's the typical size for a Recovery partition although it's usually named "Recovery HD"), you would enter:

sudo diskutil eraseVolume free free /dev/disk0s2
sudo diskutil eraseVolume free free /dev/disk0s3

Then, you would enter:
sudo diskutil ap resizeContainer /dev/disk1 0

(Again, this is for people who want to do what the OP wants to do but who put the APFS partition first. You have to use the disk/partition number which correspond to your specific situation - not necessarily these same numbers.)

I tried this out on a 1TB HDD and when the HFS+ partition was first, when I deleted the HFS+ partitions and enter the following command (where disk6s3 is the diskutil list "Apple_APFS Container disk X" entry)

sudo diskutil ap resizeContainer /dev/disk6s3 limits

I get:
Resize limits for APFS Physical Store partition disk6s3:
Current Physical Store partition size on map: 499.9 GB (499930456064 Bytes)
Minimum (constrained by file/snapshot usage): 78.0 GB (78014054400 Bytes)
Recommended minimum (if used with macOS): 88.8 GB (88751472640 Bytes)
Maximum (constrained by partition map space): 499.9 GB (499930456064 Bytes)

So it's telling me I'm at the maximum size. In the manpage, it says the following: "Grows are constrained by the amount of partition map free space trailing the targeted or implied Physical Store partition."

When I enter the following command (disk7 being the synthesized container):

sudo diskutil ap resizeContainer /dev/disk7 0

I get:
Error: -69743: The new size must be different than the existing size

However, same situation - but the APFS partition is first and I create a HFS+ partition second (disk6s2 is the "Apple_APFS Container disk X" entry, after I run the disktutil eraseVolume command)

sudo diskutil ap resizeContainer /dev/disk6s2 limits

I get:
Resize limits for APFS Physical Store partition disk6s2:
Current Physical Store partition size on map: 500.1 GB (500064673792 Bytes)
Minimum (constrained by file/snapshot usage): 81.8 GB (81805705216 Bytes)
Recommended minimum (if used with macOS): 92.5 GB (92543123456 Bytes)
Maximum (constrained by partition map space): 1000.0 GB (999994101760 Bytes)

Notice the maximum is now the size of the 1TB disk. When I then enter

sudo diskutil ap resizeContainer /dev/disk7 0

it goes and resizes the container to 1000.0GB.

(This was done on a HDD - maybe it's different on a SSD considering what the man page says, I wouldn't think so.)

Mahalo @treekram for your input. If previous posts somehow fail, I will try yours.
For these on your example:
sudo diskutil eraseVolume free free /dev/disk0s2
sudo diskutil eraseVolume free free /dev/disk0s3
Is there a way to switch my APFS and HFS+ partitions?

One more request for clarification. Based on your examples, can you please use the "disk#s#" based on my screenshot? Mahalo again.

~~~
 
Last edited:
but it turns out that if you had put the APFS partition first and the HFS+ second, you would have been able to.
Yeah... APFS is much more flexible in this regard. If the drive is all APFS, it is very easy to manipulate and move around the "containers"

Is the USB drive for the TM bootable?
It can be booted to the recovery volume on the TM disk, then used to erase the drive and restore. It cannot be booted to the OS to actually operate the Mac like a CCC clone can.
 
  • Like
Reactions: DuncanGarp
Mahalo @treekram for your input. If previous posts somehow fail, I will try yours.
For these on your example:
sudo diskutil eraseVolume free free /dev/disk0s2
sudo diskutil eraseVolume free free /dev/disk0s3
Is there a way to switch my APFS and HFS+ partitions?

One more request for clarification. Based on your examples, can you please use the "disk#s#" based on my screenshot? Mahalo again.

~~~

You can't use the method I outlined because your HFS+ partition is the first one. If your APFS partition was first, it would work. I wrote down the steps for people who may come across this thread and who have the APFS partition first.
 
  • Like
Reactions: DuncanGarp
Continuing with my container merge issue.
  • Did the backup of my two container internal SSD on Mojave.
  • Booted up into an external SSD with Sierra.
  • Used Disk Utility to erase my 2 containers on Mojave.
  • Now my internal SSD only has 1 container (formatted as APFS).
  • Restored my latest TM backup into my internal SSD that is now merged.
  • Now I can't boot into that drive (Mommy.SSD.256gb.
Please review my screenshots:
Screen Shot 2019-05-27 at 12.58.11 PM.png
Screen Shot 2019-05-27 at 12.58.51 PM.png
Screen Shot 2019-05-27 at 1.05.58 PM.png

Any help or suggestion is appreciated.
 
Continuing with my container merge issue.
  • Did the backup of my two container internal SSD on Mojave.
  • Booted up into an external SSD with Sierra.
  • Used Disk Utility to erase my 2 containers on Mojave.
  • Now my internal SSD only has 1 container (formatted as APFS).
  • Restored my latest TM backup into my internal SSD that is now merged.
  • Now I can't boot into that drive (Mommy.SSD.256gb.
Please review my screenshots:
View attachment 839253
View attachment 839254
View attachment 839255

Any help or suggestion is appreciated.

It looks like what happened is that when you did the Time Machine restore, it did not take the proper steps to create a bootable disk. If you notice your green screenshot, it only has 1 volume in the synthesized partition vs. 4 in your original screenshot. What you would need to do is
1) Boot up the machine in High Sierra from the external SSD (you said Sierra, but it must have been High Sierra since it formatted the internal SSD to APFS).
2) Download the Mojave installer if you don't already have one - you might have one in the Applications folder called "Install macOS Mojave". If you don't have it, go into the App Store and download it there. You might want to copy the Installer to a separate disk to have it for future use since it tends to get deleted after you install Mojave.
3) I don't know how the Installer would handle your situation. If it would try to use what you've already restored or if it will delete it or if it will get confused. So it would be your choice - either re-erase the partition and create a new APFS partition or leave it and hope for the best. I would just erase the partition.
4) Run the Install application targeting the internal SSD. If your internal SSD isn't shown as a selectable install target, there should be a button that says "Show all disks" or something to that effect - press that button and select the internal SSD. As part of the install, it will ask if you want to transfer data. If you didn't keep your existing container then as part of the install, then say yes and tell it to transfer data from your Time Machine backup. If you decided to keep your existing container, then after the install finished, check to see if your data is there.
5) Hopefully the install works properly. Once it's done, I always like to turn the machine off and re-start as sometimes if that isn't done (for me, at least), it acts a bit wonky.
6) If you tried to keep your original container and the installer deleted it, run the Migration Assistant app (in the Application/Utilities folder) and it can restore from your Time Machine backup.
 
Last edited:
  • Like
Reactions: DuncanGarp
Finally accomplished what I intended. Now my SSD has a single partition.

Screen Shot 2019-05-27 at 9.39.28 PM.png

I'm just wondering what the "VM" signifies. No big deal but it occupies 1.1 GB.

Thanks @Weaselboy, @haralds and @treekram for the tips.
 
Finally accomplished what I intended. Now my SSD has a single partition.

View attachment 839299

I'm just wondering what the "VM" signifies. No big deal but it occupies 1.1 GB.

Thanks @Weaselboy, @haralds and @treekram for the tips.

With APFS, Apple has seen fit to allocate a volume ("VM") to the /var/vm directory, which is only supposed to be used by the OS. If there are files in this directory, it's usually swap files (when the system runs out of RAM) and the sleepimage file (most often used on laptops to prolong battery life). On my main system (not a laptop), the /var/vm/sleepimage file is 2GB (as is the case with at least a couple of my other Macs). This file supposedly shouldn't be created since I have set hibernatemode=0, but I think I've deleted the file (you have to have SIP disabled to do this) and tried one of the suggestions to to try to prevent it's creation but it comes back so I've ignore it - maybe I'll need to try some of the other suggestions.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.