In case you ever forget to eject your external hard drive after a time machine backup and in case you are also using a partitioned drive with exfat but then it goes unmounted/missing, here is how to fix it.
What I saw after unplugging and plugging the drive back in, is only the TIMEMACHINE icon on my desktop, not the normal EXFAT and TIMEMACHINE like below:
I opened my terminal and ran:
sudo diskutil list
Entered my password and saw something like:
sudo fsck_exfat /dev/disk2
fsck_exfat: Opened /dev/rdisk2 read-only
** Checking volume.
** Checking main boot region.
Main boot region is invalid. Trying alternate boot region.
** Checking alternate boot region.
Alternate boot region is invalid.
** The volume could not be verified completely.
In hindsight, I think I was supposed to use the actual identifier for exfat, so I maybe should have ran:
sudo fsck_exfat disk2s2
What I tried instead was go into
Disk Utility , at the time I only saw TIMEMACHINE, so I clicked on it so I can perform
First Aid on it:
Before the disk utility even finished first aid, my EXFAT appeared again and mounted, I was able to access my files.
First Aid on TIMEMACHINE may take a while, at least 30–40 minutes.