How can I prevent an exFAT volume from mounting on OS X? I have two partitions, one is HFS+ and the other is exFAT.

I'm used to opening the /etc/fstab file, and inserting this line:

UUID=NUMBER none hfs rw,noauto


Note: The "hfs" stands for HFS+.

Now I want to automatically unmount the exFAT volume. I tried this:

UUID=NUMBER none msdos rw,noauto


So, my question is; which keyword should I use for unmounting an
exFAT volume/partition?
As a test, I formatted and external USB drive as exFAT (wrongly shown as ExFAT in Disk Utility) and then ascertained its UUID. Then ejected and unplugged the disk.

I then added the following to my /etc/fstab file:

UUID=402894E4-03EE-3CF7-80D2-A4EC74048C2F none exfat rw,noauto



Note: Use the UUID assigned to the exFAT partition on your device.


These methods also work:

LABEL=VolumeName none exfat rw,noauto


If the volume name has space characters, then in place of any space put: \040

LABEL=Volume\040Name none exfat rw,noauto


When I plugged the USB drive back in it did not mount, as expected, and was available in Disk Utility to mount when wanted.

This should also work with an exFAT partition on an internal disk as well.