0

I am trying to create a data partition for my user account so as if I need to re-install my computer, I do not lose any data that is on the other partition.

If I had the following layout on my 512GB SSD:

  • macOS partition formatted as APFS + APFS container named MacData - 100GB
  • Shared Data partition formatted as ExFAT - 362GB
  • Bootcamp partition formatted as NTFS - 50GB

If I were to format and reinstall the OS on the partition called macOS, would I lose data on my MacData volume? This is if I erased the macOS container rather than the partition it self?

  • you can select it during instllation what partion to use. But it is a bit weird – Lars Nielsen Mar 13 at 11:41
  • @LarsNielsen Im talking about erasing the macOS partition when the MacData container is created. Also, as I said, I am doing this so as I can erase my computer without losing as much data. – iProgram Mar 13 at 11:46
  • @LarsNielsen Plus this also means when the macOS beta comes out, I can create a new container and have both the stable and the beta side by side while having the same user data. – iProgram Mar 13 at 11:47
  • ahhhh!!!! yes you would lose the data if it is in the same partition you need to place it in your shared Data partition if you want to avoid losing data – Lars Nielsen Mar 13 at 11:48
  • @LarsNielsen So you are meaning that my MacData container will or will not exist if I erase the macOS APFS? – iProgram Mar 13 at 11:50
1

When Mojave is installed, you need to choose a APFS volume. However, the operating system is not just installed to this volume. Additionally, three other hidden APFS volumes (Preboot, Recovery and VM) are created, if they do not already exist. The preboot files are placed in a folder in the Preboot APFS volume and the recovery files are place in a folder in the Recovery APFS volume. In both cases, the name of the folder is the same as the UUID assigned to the APFS volume you chose when installing Mojave. The VM volume is used to store the sleep image and the swap file.

If you create a new APFS volume and install Mojave to this volume, then the three hidden volumes are reused. Again the preboot and recovery files are placed in a folders with a name the same as the UUID of the new APFS volume.

If you delete a APFS volume that was chosen for a Mojave installation, only this volume is removed. The three hidden volumes remain and still contain and the same files. To remove the folders containing the preboot and recovery files, you have to manually mount the volumes and remove the folders. (For example, use the diskutil mount command to manually mount each volume.) Since the space taken up by these folders and their contents is fairly small, most users will probably elect to just leave the folders intact on these hidden volumes.

This is a long way of saying: The removal of Mojave by deleting a APFS volume does not alter any other APFS volumes.

What I wrote above also applies to High Sierra when installing to a APFS volume.

0

It seems to be that no matter what container is removed in a APFS partition, all other volumes will be unaffected.

To test this, I created a new APFS partition as the following:

  • Shared data - 100GB
    • Container 1
    • Container 2

Even if I deleted Shared data, both Container 1 and Container 2 were both unaffected. If I then removed Container 1, Container 2 would still exist. It is only if the actual partition is erased rather than the container being erased, formatted or removed, that the others are unaffected.

  • When you refer to a container, do you mean a APFS partition or a APFS volume? – David Anderson Mar 13 at 14:38
  • @DavidAnderson Volume. – iProgram Mar 13 at 14:38
  • I asked because the man page for diskutil defines the APFS container as the holder of the APFS volumes. – David Anderson Mar 13 at 14:50

You must log in to answer this question.

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