Win7-damaged Mac GPT partition map on 4TB external HDD
There is hope if Windows didn't write anything to disk (except the MBR). The steps below overwrite the bogus MBR and replaces it by a proper PMBR and a GUID partition table. All previous entries will be restored.


Attach the external drive to a Mac
Open Terminal and enter diskutil list and sudo gpt -r show /dev/diskX with X the disk identifier of the 4 TB drive (e.g. if you find that the disk identifier is disk1, replace in the commands above and below diskX by disk1).
Unmount the disk with diskutil umountDisk /dev/diskX
Enter sudo dd if=/dev/random of=/dev/diskX count=1 bs=512 to overwrite the MBR
Unmount the disk again with diskutil umountDisk /dev/diskX
Enter sudo gpt destroy /dev/diskX #just in case, this might fail
Then enter sudo gpt create /dev/diskX
if the last command fails you may overwrite the MBR again with  sudo dd if=/dev/random of=/dev/diskX count=1 bs=4096 and reenter the last command:  sudo gpt create /dev/diskX
Enter sudo gpt -r show /dev/diskX and check if PMBR and GUID partition header/table occupy the first six blocks (block0-block5). This is the case if the disk controller reports a block size of 4096 Bytes instead of 512 bytes.*

In case of a 4096 logical block size the GUID partition table should look like this now:

gpt show: /dev/diskX: Sec GPT at sector 976754644
      start       size  index  contents
          0          1         MBR
          1          1         Pri GPT header
          2          4         Pri GPT table
          6  976754634           
  976754640          4         Sec GPT table
  976754644          1         Sec GPT header

Then re-populate the GUID partition table with the above data (the type of the EFI partition is different though):

sudo gpt add -b 6 -i 1 -s 51200 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B /dev/diskX
sudo gpt add -b 51206 -i 2 -s 976670666 -t 48465300-0000-11AA-AA11-00306543ECAC /dev/diskX

Check the disk and the volume with

diskutil verifyDisk /dev/diskX
diskutil verifyVolume /dev/diskXs2





* Add a comment if you get a different list after the steps sudo gpt create /dev/diskX -> sudo gpt -r show /dev/diskX e.g the PMBR and the GUID partition table occupy the first 34 blocks (block0-block33). Then the disk controller reports a block size of 512 Bytes.