PDA

View Full Version : Disk mounting / unmounting tool




smellalot
Jan 12, 2013, 06:18 PM
I'm looking for a little tool that sits in the menu bar to unmount / mount my internal HDD so my Mac can be nice and silent.

I googled but the two tools I tried did not work. Does anybody know a good tool that unmounts the drive and actually makes it stop spinning and then gives you the option to mount that drive again?



SlCKB0Y
Jan 12, 2013, 06:28 PM
I'm looking for a little tool that sits in the menu bar to unmount / mount my internal HDD so my Mac can be nice and silent.

I googled but the two tools I tried did not work. Does anybody know a good tool that unmounts the drive and actually makes it stop spinning and then gives you the option to mount that drive again?

Are you talking about your primary HD with your boot partition? If so, you can't.

Get yourself an SSD and not only will it be silent, you'll see massive performance gains.

smellalot
Jan 12, 2013, 06:30 PM
Are you talking about your primary HD with your boot partition? If so, you can't.

Get yourself an SSD and not only will it be silent, you'll see massive performance gains.

Look at my signature.

Edit: Thank you still. , Didn't want to sound rude.

SlCKB0Y
Jan 12, 2013, 06:37 PM
Look at my signature.

Didn't notice that!

What applications did you try? Was the problem when mounting, unmounting, or both? Did the application report any errors to you?

Any application you are trying to use will probably be using either mount/umount or diskutil from the command line.

Maybe manually run one of these commands and see if it still fails and if so, you might get some more info as to why.

The most common reason for umount failing is that a file on the partition being unmounted is still in use.

smellalot
Jan 12, 2013, 06:54 PM
Didn't notice that!

What applications did you try? Was the problem when mounting, unmounting, or both? Did the application report any errors to you?

Any application you are trying to use will probably be using either mount/umount or diskutil from the command line.

Maybe manually run one of these commands and see if it still fails and if so, you might get some more info as to why.

The most common reason for umount failing is that a file on the partition being unmounted is still in use.

I tried Free Space Tab, which unmounts the drive fine and spins it down immediately. But it can't mount drives so I'd still need to go to disk utility for that.

Semulov is another tool I tried. It unmounts the drive but the disk keeps spinning. On the other hand it shows unmounted drives.

None of the tools gave me an error. But I was hoping someone knows an app that combines the good feature of these two ;)

Fishrrman
Jan 13, 2013, 09:38 AM
Back in the days of the Classic Mac OS, there was a very nifty tool called "SCSI Probe" which would scan the SCSI bus and mount drives that it found.

Too bad there is no modern-day equivalent with which to "probe" the USB and firewire buses to do the same thing...

misko
Jan 13, 2013, 06:38 PM
i use applescript with alfred :
set myVolumeLabel to "OptiBay"

tell application "Finder"
set diskDev to do shell script "diskutil list | grep \"" & myVolumeLabel & "\" | grep -o 'disk[0-9]*' "
if not (disk myVolumeLabel exists) then
do shell script "diskutil mountDisk " & diskDev
else
do shell script "diskutil unmountDisk " & diskDev
end if
end tell

smellalot
Jan 25, 2013, 04:24 AM
i use applescript with alfred :
set myVolumeLabel to "OptiBay"

tell application "Finder"
set diskDev to do shell script "diskutil list | grep \"" & myVolumeLabel & "\" | grep -o 'disk[0-9]*' "
if not (disk myVolumeLabel exists) then
do shell script "diskutil mountDisk " & diskDev
else
do shell script "diskutil unmountDisk " & diskDev
end if
end tell

OK, thank you for your help. Unfortunately my disk keeps spinning. I tried to modify your script by using the record feature of apple script editor. I recorded the CMD+E command in Finder and replaced the unmount routine in your script. Unfortunately it doesn't work. Do you have an idea why? Here's my script:

set myVolumeLabel to "HDD"

tell application "Finder"
set diskDev to do shell script "diskutil list | grep \"" & myVolumeLabel & "\" | grep -o 'disk[0-9]*' "
if not (disk myVolumeLabel exists) then
do shell script "diskutil mountDisk " & diskDev
else
tell application "Finder"
activate
eject disk myVolumeLabel
end tell
end if
end tell


Any help will be greatly appreciated since I really like my Mac quiet!

smellalot
Jan 25, 2013, 05:22 PM
I found it! For anyone else having this problem:

Use the command eject instead of unmountDisk. See the correct code below.

set myVolumeLabel to "HDD"

tell application "Finder"
set diskDev to do shell script "diskutil list | grep \"" & myVolumeLabel & "\" | grep -o 'disk[0-9]*' "
if not (disk myVolumeLabel exists) then
do shell script "diskutil mountDisk " & diskDev
else
do shell script "diskutil eject " & diskDev
end if
end tell

misko
Jan 26, 2013, 06:03 PM
For me on MBP 13" 2011 work ok with "diskutil unmountDisk" but You found solution for your problem - It is important. Sorry for my bad English :)

Xe89
Jan 27, 2013, 04:56 AM
I use Quicksilver to show mounted volumes with cmd shift V, then I eject with cmd shift E. It works very well as shown here:

http://www.youtube.com/watch?v=tXnENOomjFk

maestrpotvin
Feb 2, 2013, 11:01 AM
I just found a little utility called Mountain which I believe will suit your exact needs.
http://appgineers.de/mountain/