Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ancandis

macrumors member
Original poster
Nov 18, 2009
89
25
How can OS X mount and unmount a harddrive by its UUID (as displayed in disk utility)?


I know how to mount a volume by its disk identifier (e.g. disk0s3), but it may change after a reboot. Thus a wrong volume may be ejected.

I need a reliable method to mount/unmount a specific hard drive connected via USB.

Any hints? Thanks
 
I am not sure why you could not come up with the simple answer here:
Code:
diskutil unmount <uuid>
So I might be missing something. And if you are trying to make sure that it is never mounted then you are going to need to put something either in automounts, or in /etc/fstab (yes, it still works, and is documented). But creative people can get around that. I did work on a small program that would intercept mount requests and cancel them (or re-direct them), but I don't have a fully working version that I can share.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.