disk utility unmount volume

Discussion in 'macOS' started by richard.mac, Jun 28, 2007.

  1. richard.mac macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #1
    what command or script does disk utility use when it unmounts a volume? its mighty fast. ive currently got this apple script to unmount my vista partition on login:

    Code:
    do shell script "hdiutil unmount /dev/disk0s3"
    but this is excruciatingly slow. what command or script can i use on login to unmount my windows partition as fast as disk utility does?

    thanks
     
  2. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #2
    You can try substituting the diskutil command (same syntax for unmount) to see if that gives you quicker results.
     
  3. richard.mac thread starter macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #3
    cheers for the fast reply! i just tried diskutil rather than hdiutil but their both the exactly the same speed. i want it to be instant like in disk utility so my login speed is acceptable... sorry if this is too much to ask
     
  4. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #4
    diskutil calls the disk management API to do its thing, that should be what the GUI version of Disk Utility is using also.

    Are you sure that this command is what causes your slowdown? Applescript is excruciatingly slow all by itself.
     
  5. richard.mac thread starter macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #5
    oh ok! yeh i think apple script is just slow ay. is there any other way i can unmount a volume on login without using apple script?
    i want to unmount my vista partition on login so spotlight stops showing worthless windows results. ive tried a lot of things and this seems the best idea. macfuse/ntfs3g was ok and seemed to stop the results (made it writable so i could add it to spotlighgt privacy) but made restarts take over a minute for some reason.
     
  6. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #6
    Huh. You can run a shell script directly as a login item, but even that will want to open Terminal which takes a little time to start up.

    It's a little more complicated to set up, but you can use loginwindow hooks to run things like this with less overhead.
     
  7. richard.mac thread starter macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662

Share This Page