Last active
June 18, 2023 17:10
-
-
Save jaybuidl/a9fc52130a972e88775d109843806fbe to your computer and use it in GitHub Desktop.
APFS volume group creation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lookup your existing disks and volumes | |
diskutil apfs list | |
# We will modify diskX | |
disk=diskX | |
# Assuming that the volume diskXs1 already exist, we need to mark it as a data volume before adding it to a group. | |
diskutil apfs chrole ${disk}s1 D | |
# The volume group cannot be created directly. It will be created during the creation of the 2nd volume. | |
diskutil apfs addvolume ${disk} "Case-sensitive APFS" MyVolumeName -groupWith ${disk}s1 -role D | |
# (to create a system disk instead, set `-role S` in the above command) | |
# Now the volume group should show up | |
diskutil apfs listGroups | |
# Note: the Disk Utility desktop app does not always refresh correctly. Restarting the app or unmounting/reconnecting should help. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment