Copy macOS installation to second partition I am running macOS Sierra 10.12.5 on the 4th partition of my HDD. The partitions in order: 


  Partition 1, 280 MB: EFI
  Partition 2, 22 GB: Storage 1
  Partition 3, 186 GB: Storage 2
  Partition 4, 110 GB: Macintosh HD
  Partition 5, 600 MB: Recovery HD


Storage 2 has 102 GB available, and Macintosh HD only has 66 GB used, so space is not a problem. I need to copy my macOS installation from Macintosh HD to Storage 2, so that I can delete Macintosh HD, and expand Storage 2 to include the now free 110 GB. The catch is that I need to preserve all the data on both partitions while copying the installation. User data, system preferences, my command line package managers, everything. Plus in doing so I need Storage 2 to become a bootable volume. Neither reinstalling macOS, wiping Storage 2 for a restore from Macintosh HD, or wiping and repartitioning the whole disk are options here (I don't have a spare drive large enough to store all that data on.). 

I have tried a simple sudo cp -R / /Volumes/Storage\ 2/ (from in-OS that is), but some files have read/copy permissions denied even to the root user, and that's with SIP off. So... anyone have any ideas? I'm not partial to either the GUI or command line, so long as it gets the job done. Thanks in advance!
Well, I managed to achieve what I needed using the following procedure:


  1.) sudo -i
  Enter root shell
  
  2.) mkdir /Volumes/Storage\ 2/Data/ &amp;&amp; mv /Volumes/Storage\ 2/* /Volumes/Storage\ 2/Data/ &amp;&amp; mv /Volumes/Storage\ 2/.* /Volumes/Storage\ 2/Data/
  This relocated all my data on the target volume to a separate folder
  
  3.) ditto -X -V --nocache / /Volumes/Storage\ 2/
  This copied all files and symlinks from my boot volume to the volume "Storage 2", and made "Storage 2" bootable in the process.
  
  4.) reboot > Storage 2
  Booted into Storage 2
  
  5.) diskutil eraseVolume "Free Space" Macintosh\ HD disk0s4
  Deleting the old boot volume, and leaving free space in its place
  
  6.) diskutil resizeVolume disk0s3 296G
  Expand the new boot volume to include the free space I just made
  
  7.) diskutil rename disk0s3 Macintosh\ HD
  Renamed new boot volume to match old one
  
  8.) diskutil eraseVolume "Free Space" Recovery\ HD disk0s5
  Delete faulty recovery partition
  
  9.) diskutil resizeVolume disk0s3 296.6G
  Expand new boot volume to include rest of free space


Since performing this half of my two-part project the partition scheme now looks like this:


  Partition 1, 210 MB: EFI
  Partition 2, 22 GB: Storage 1
  Partition 3, 297 GB: Macintosh HD  


Hopefully this will be helpful for anyone else who needs to move their macOS installation to another partition without losing any data, or anyone who needs to make a bootable backup of their system before performing a potentially dangerous operation.

Now that this part is done, I just need to figure out how to turn "Storage 1" into a bootable installer partition.