Thursday, December 4, 2014

macos - Disable automatic fsck_exfat on dirty volume mount in Mac OSX

I've several large hard disks formatted in exFAT to keep clean compatibility between Win7/Bootcamp and Snow Leopard.


Here's the problem: fsck_exfat needs something like 6-8gb of RAM to complete on a large disk. (windows' chkdsk works fine, btw). If OSX detects a volume as dirty, it appears to automatically try to fsck the volume... but I am discovering that it doesn't actually fix any problems. During this automatic scan, OSX has to page nearly everything else to swap. I use several external drives when I am at my desk at home, and if an exFAT volume is dirty then it might be 10+ minutes before the laptop is usable per drive, and this is after Finder loads.


Before you suggest using an alternate file system:



  • FAT32 - 4gb file limit is a problem for me, and I have at least one 3tb drive. Considering formatting back to this for the smaller drives

  • NTFS - Every OSX NTFS driver I have tried sucks. ntfs3g is wildly
    inefficient with CPU time and for some reason frequently freezes the
    whole system for seconds at a time during heavy I/O. Tuxera NTFS is
    better, but still crappy for heavy use. Things like Finder generating thumbnails for a large folder of images, or basic usage of Songbird on a managed library of 300+gb, become extremely unpleasant (and rickety).

  • HFS+ - The HFS driver I use in Windows (Paragon bundled with a Seagate drive) has corrupted at least one important folder and I refuse to touch it again


Worse, I was trying to run this laptop without swap as I am getting pissed off with OSX' swap behavior (basically, it pages inactive stuff to disk regardless of available RAM). The performance increase from having the swap file disabled was very nice. BUT! Whenever fsck starts, automatically, the laptop would freeze soon thereafter due to running out of RAM.


This of course threw me into a loop: start laptop, OSX sees dirty exFAT, automatically fscks them, laptop freezes, drives marked dirty because of bad shutdown, lather, rinse, repeat... not pleasant. Booting into Win7 and running chkdsk (and shutting down cleanly) breaks out of this loop. Swap is re-enabled for now :-(


The best part is I still have to manually fix the dirty volumes, because for whatever reason they mount as read-only! I can only undo that after I fsck them myself!


This is most frustrating. So... how does one disable the automatic fsck_exfat that runs on a dirty exFAT mount? Or do you have any alternative solutions? I don't mind OSX mounting the drives RO if it means I keep control of my computer (and can fsck the drives later, at my leisure).

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...