I needed to ignore an USB storage device, or at least disable the automount feature for it, because I wanted the USB device to be available for VirtualBox.
There does not seem to be an device-specific ignore functionality, but in my case it was enough to temporarily unload the USB storage kext:
sudo kextunload /System/Library/Extensions/IOUSBMassStorageClass.kext
This will disable all USB storage media temporarily!
When you are finished using the USB storage device in VirtualBox, shut it down, and then do a
sudo kextload /System/Library/Extensions/IOUSBMassStorageClass.kext
to restore the USB storage functionality.
Is there a way to disable automounting of USB volumes from the get go (without knowing volume name or UUID) ?
The reason is that I want to NOT have OS X write any .Trash and .Whatever files onto a certain disk which I’m only going to use for reading (this is useful when trying to extract data from a broken disk where any writes will likely cause more trouble)
You could try using http://github.com/aburgh/Disk-Arbitrator/ which should do exactly what you need:
“Disk Arbitrator is Mac OS X forensic utility designed to help the user ensure correct forensic procedures are followed during imaging of a disk device.”
Found Disk-Arbitrator right after I posted the above and was going to come back to update, but didn’t get around to it. It’s perfect! Exactly what I wanted.
Cheers!
This might be a good solution for anyone still looking how to do this: https://discussions.apple.com/docs/DOC-7942