hot to mount disk using volume UUID? (and unmount)

Discussion in 'macOS' started by Ancandis, Nov 17, 2010.

  1. Ancandis macrumors member


    Nov 18, 2009
    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
  2. larkost macrumors 6502a

    Oct 13, 2007
    I am not sure why you could not come up with the simple answer here:
    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.

Share This Page