Resizing a partition to increase into space before itself

apfsdisk-utilityhfs+high sierrapartition

Simple Explanation:

enter image description here

Expanded Explanation:
All I want to do is delete disk0s9 and have disk0s4 resize and take up the empty space.

I want to

  1. Delete container disk4 (disk0s9).
  2. I don't want the either volume in partitions disk0s2 or disk0s8 to absorb the space.
  3. I want the volume (disk0s4) after it to increase in size, appropriately.

ISSUE:
Every time I attempt to delete / resize using the Diskutil in High Sierra (I miss Yosemite's), the internal disk preceding the disk gets the space 🙁

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS High Sierra             70.0 GB    disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s8
   4:                 Apple_APFS Container disk4         19.9 GB    disk0s9
   5:                 Apple_APFS Container disk1         159.5 GB   disk0s4
   6:                 Apple_Boot Boot OS X               650.0 MB   disk0s7

ACTIONS ATTEMPTED:
Every time I try and resize the partition / remove it, disk0s2 gets the additional space.

ASK:
How do I resize the last portion, while maintain data and not doing a backup / recreate mess?

I know there has gotta be a good way to resize the partitions without having to back everything up and remake from scratch. I just can't seem to master the new Diskutil when it comes to resizing partitions non-standard ways.

Thanks in advance!

Best Answer

You can not do what you have proposed by using the tools provided by macOS. Partitions can grow and shrink, but the start of the partition must remain fixed. There are exceptions to this, but none apply in this case. There are third party tools that can move a partition. For example, Paragon offers a Hard Disk Manager for Mac application which makes the following claim.

Enables to move the left or right border of the selected partition, thus not only resizing but moving it on the disk

The time required to move all but the smallest partitions is usually quite lengthly. I suppose this might be one reason Apple does not provide this type of tool. An exception would be when resizing a Apple HFS partition. The Disk Utility application and the diskutil command will move any Apple_Boot partition that is the next partition stored on the drive. Usually, this partition and is small in size (under 1 GB) and therefore can be moved fairly quickly. With the introduction of APFS, Apple eliminated the need for partitions of this type.