Is it possible to disable write caching on a USB mass storage device on Mac OS X?

14

7

On Windows, there's a setting for removable drives called "optimize for quick removal", which disables write caching so you can just unplug your removable drive without causing filesystem corruption.

I've googled a lot, but I can't find any information on whether the same setting exists for OS X. Is it possible to change this?

The specific problem here is that my wife is a teacher, and her students use SD card readers for some class projects. Of course they don't ever eject the drive before removal, resulting in random disk corruption.

Ted Mielczarek

Posted 2010-02-24T19:03:30.727

Reputation: 243

If they have Internet access, free DropBox accounts may solve the problem. Or not... – Dan Rosenstark – 2010-03-03T07:49:02.260

4No, they're using the SD cards in digital cameras. Offering suggestions completely unrelated to the question at hand is not useful. – Ted Mielczarek – 2010-03-03T11:55:34.800

Answers

5

This should be possible by manually mounting the drive via the terminal. You'll have to eject the drive when you plug it in and then remount it in the terminal using the noasync option.

The best way to go about this would be to run mount in the terminal and take down the device so you know what to remount. Then umount /dev/disk1s1 (where disk1s1 is the device name) then mount -o noasync /dev/disk1s1. This method would also apply to most linux distros.

As you can see, it's easier to just remember to eject.

More info on mount available here: http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man8/mount.8.html

Andrew Marshall

Posted 2010-02-24T19:03:30.727

Reputation: 368

Thanks! It might be a pain to actually use this in practice, but it's good to know that it's at least possible. (Of course getting high school students to follow directions is always harder.) – Ted Mielczarek – 2010-03-03T11:57:05.777

2Too bad, there is no automatic way to do this. I recently connected an SD card via a reader and it turned out that the cable had a loose connection, so the drive appeared for a second and it was gone with the warning message from osx that the drive was removed without ejecting it first. Guess what, it became unusable to the point that I couldn't even format it on windows. I am now scared of connecting any external drives to a mac. – haridsv – 2011-06-23T20:42:05.220

0

After reading this thread, I don't think it's possible to do so. If it's worth anything, I've never had a problem not ejecting. It seems to be at least partially based on whatever file system the drive or media is formatted in.

Perhaps a big sign above the SD card readers reminding students to properly eject before removal?

Josh K

Posted 2010-02-24T19:03:30.727

Reputation: 11 754