Discussion on Catalina and Volume Groups

New Contributor III

I've been looking into how Catalina separates the partitions into System and Data partitions. Just as an experiment and trying to figure out how that all fits together I was trying to see if I could create an APFS Volume Group on my own using the command line.

I see there are new verbs in the diskutil apfs command lists to do this. They have new Role letters as well in the catalina version of diskutil S = System D = Data so I was able to make the APFS volumes for System and Data, but I"m not sure how to put them together into a Volume Group. I saw a setting under addVolume (I don't have my mac with me to check exactly right now) Something like "Group{with} | sibling" but I wasn't sure how to read the man pages to get a working example out of that.

Does anybody know how to build the Volume Group and populate with a System and Data Partition using the command line?

I was able to get a Preboot and Recovery Partition created without any issue.


New Contributor III

OK, I think I figured it out.. you have to make the “data” drive first and then group the System drive to the data drive when creating the system drive.

Couple things that seem to be broken (or maybe by design).. after a volume is created you can’t assign it the role of System. Seems like it can only be done when the drive is created. Also If you create the system drive first and then create the data drive trying to group them it seems like it doesn’t work that way.

Here is the process I ended up using:
diskutil apfs addVolume disk1 apfs “Test-Data” -role D
diskuitl apfs addVolume disk1 apfs “Test” -role S -groupwith disk1s[X]
diskutil apfs listvolumegroups

Would be nice if there was a way to group existing drives together without having to do it on creation. And also assign the role of System after a volume has been created - seems like you can assign any other role without issue.