MacOS – osx corrupts usb (exFAT) on restart

hard drivemacosusb

So I have this problem with OS X, when I restart my system and it has the USB drive connected (I forgot to unplug it because I know what OS X causes), it corrupts the drive (i.e., on next restart it can't read/mount the USB drive), now my solutions is go to a friend computer with windows and use "repair tool"… but this time seems like it won't work again… so how apple pays for >500Gb of information? (well just kidding I know they will not), so my questions are

  1. How I stop OS X from being badass with USB disk (i.e. not corrupting them so that I need to remember to unplug it first).
  2. How I recover/repair my files, this time my friend Windows seems not able to recover it.

BY the way, this corruption also happened if I disconnect directly the USB (which work on windows AFAIK).

Best Answer

I've also posted your question 1 here. If your disk is HFS formatted, here's a rumour here that you can just kill the process fsck_hfs and the disk reappears immediately (FSCK=file system consistency check). Next time I have a scan, I'll be looking for a fsck_exfat equivalent process to kill. Disabling the write cache would reduce risk, but not prevent the scan - it doesn't on Windows, and there's still the risk the disk was disconnected during a non-cached write.

For your question 2, leave the disk connected to your Mac for a while. OS X runs the same repair process, it just does it silently. (Someone answered my identical question here.)

In my experience disconnection almost never actually causes corruption (Windows tells you if it finds an error, and I've never, ever seen it find one) - but a flag File System State is set on the drive prompting the repair scan. On Debian, Ubuntu or Linux Mint, this can be disabled in /etc/default/rcS, on CentOS, /etc/sysconfig/autofsck - we need the OS X version..anyone?

Update: klanomath answered question two here - I'll report back once tested.