External Hard Disk Problem - doesn't mount / can't first aid / can't erase using disk utility
The following error appears if disk has GUID partition table and doesn't have EFI system partition (or it is less than 200 Mb):

Error: -5344: MediaKit reports not enough space on device for requested operation


Even if you are not planning to use this external HDD for booting, Mac OS's Disk Utility requires this partition to exist.

You can create it with gdisk (GUID fdisk):

(First leave some unpartitioned space in start of the disk by moving partitions or backing up data)

Command (? for help): n
Partition number (1-128, default 1):
First sector (34-1953525133, default = 40) or {+-}size{KMGTP}:
Last sector (40-1172342001, default = 1172342001) or {+-}size{KMGTP}: 512M
Current type is 'Apple HFS/HFS+'
Hex code or GUID (L to show codes, Enter = AF00): EF00
Changed type of partition to 'EFI System'


I created it with size of 512 Mb to be sure (200 is enough) and its hex code is EF00.

I'm not sure if it is required for Disk Utility, but it's better to format it with FAT32:

sudo newfs_msdos -F 32 &lt;your partition device, i.e. /dev/disk1s1&gt;


Additional information:


https://wiki.gentoo.org/wiki/EFI_System_Partition Gentoo Wiki, includes information how to create it with gdisk
https://wiki.archlinux.org/index.php/EFI_System_Partition Arch Linux Wiki