4

I have an external hard drive that is connected to my computer by a SATA/eSATA cable. Diskutility recognizes the hard drive as two separate drives as shown in the following two images:

mac_screenshot_1

mac_screenshot_2

I can't seem to merge the two partitions (MacBackup & MacBackup2) together because the "Partition" option is greyed out. How do I fix this?

  • 2
    In Terminal, what it the output of diskutil list disk2? Please add the results to the question. – user3439894 Dec 10 '17 at 22:14
  • 1
    This can be solved by using the diskutil mergePartitions ... command. The whole command depends on additional details like diskutil list disk2 and sudo gpt -r show disk2. The output of the commands should be added to your question. – klanomath Dec 11 '17 at 0:21
2

To elaborate the answer by @klanomath this is what you must do step-by-step:

  1. get the disk identifier for both disks you want to merge by "diskutil list [disk name]". Choose any of the two disk names, like:

     diskutil list MacBackup
    

This returns something like

   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *320.1 GB   disk3
   1:                 DOS_FAT_32 MULTIMEDIA              160.0 GB   disk3s1
   2:                  Apple_HFS TIMEMACHINE             160.0 GB   disk3s2

In the IDENTIFIER column, get the disk identifiers for both disks, here: disk3s1 and disk3s2

  1. merge the two disk partitions by "mergePartitions [format] [new disk name][disk identifier 1] [disk identifier 2]". If you want to use the "MacBackup3", you would then enter:

    diskutil mergePartitions JHFS+ MyMedia disk3s1 disk3s2
    

The first disk [disk identifier 1] is the only one that diskutil tries to preserve the data for. If it can't because the disk has no resizable data format, it will give a warning message:

The chosen disk does not support resizing.
Do you wish to format instead? (y/N)

Caution! If you enter "y", your data on [disk identifier 1] will be deleted. This is the last chance to abort by "N". If you have backed up the data, you can go on with "y" - your disk partitions will be merged.

You must log in to answer this question.

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