To elaborate the answer by @klanomath this is what you must do step-by-step:
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
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.
diskutil list disk2
? Please add the results to the question.diskutil mergePartitions ...
command. The whole command depends on additional details likediskutil list disk2
andsudo gpt -r show disk2
. The output of the commands should be added to your question.