0

How can I merge the 300 GB Container disk5 with Container disk6 without losing data on disk6? This is a 4TB external drive with two equal-sized volumes, namely EXTERNAL for my personal files and TIME to backup my MacBook.

/dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.0 TB     disk4
   1:                 Apple_APFS ⁨Container disk5⁩         300.0 GB   disk4s1
   2:                 Apple_APFS ⁨Container disk6⁩         3.7 TB     disk4s2

/dev/disk5 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +300.0 GB   disk5
                                 Physical Store disk4s1

/dev/disk6 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +3.7 TB     disk6
                                 Physical Store disk4s2
   1:                APFS Volume ⁨EXTERNAL⁩                215.6 GB   disk6s1
   2:                APFS Volume ⁨TIME⁩                    933.9 KB   disk6s2
1
  • 1
    Please replace the screenshot with the output from diskutil list. Currently none of the partitioning and filesystem details are clear enough. Sep 29, 2022 at 14:08

1 Answer 1

1

This is a tricky one.

So, to summarise, you wish to use all of the available space on the external drive to be used by the disk6 container. One would imagine this can be done by deleting disk5 and expanding the disk6 container. However this isn't possible, and it's due to the underlying physical partitioning structure and its sequence. A container disk is analogous to a physical partition.

Note also that although you state EXTERNAL and TIME are the same size, they are sharing the free space in disk6. As TIME only reports a size of 933k, it leads me to think you may not have used it yet, which bodes well for the following procedure.

Because disk5 is sequenced before disk6 in the GPT, even if you were to delete disk5, you cannot extend the start point of a partition backwards to claim free space. If it were the other way round you could extend the end of the partition you keep into the free space to the end of the disk.

A solution would depend on how much data you have already backed up in your Time Machine volume (see above), because I suspect that will need to be sacrificed to make this work. eg:

  • Create an APFS volume EXT-COPY on disk5
  • Copy the data from EXTERNAL to this new volume EXT-COPY. This is possible because there is enough free space in disk5 (300GB free > 215GB used)
  • Delete EXTERNAL and TIME
  • Delete the container disk6
  • Extend the disk5 partition to use all the space
  • Create a new APFS volume TIME on disk5, and assign as your Time Machine device
  • Rename EXT-COPY to EXTERNAL

Bear in mind that you could copy any existing data from your TM backup to yet another external disk of comparable size, and then restore later. But it's not guaranteed that it would survive the process and that TM would use it. This is because TM backups are treated quite especially and are generally read-only. I have no experience on doing this but you might need to do a disk image copy. Perhaps someone else could provide guidance on that.

Note, I have not tested this, but it might be worthwhile to setup a small scale equivalent partitioning structure on another external disk to thoroughly test my suggestion. It need not be very big, and doesn't need to contain much, if any, data. All you are testing is the workflow of managing the partitions.

1
  • 1
    Thank you for this comprehensive response. I've been able to accomplish what I needed.
    – misaligar
    Oct 2, 2022 at 14:30

You must log in to answer this question.

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