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

riptideMBP

macrumors 6502
May 29, 2011
260
0
After having had an optibay for over a year, I've tended to let the sleep timer take care of things in most cases. If I'm really conserving battery I have "applications" that i made using applescript which will unmount/remount the disk. The only reason I didn't combine them into a "toggle" function is that the drive always spins up after waking from sleep, and I haven't found a way around that.

Scripts:

In terminal type: "diskutil list"
On the left side it shows how the disks are numbered... mine is "/dev/disk1" so my scripts use the number 1

Spindown/eject
In applescript editor, write: "do shell script "hdiutil eject disk1"
This spins down the disk and essentially prevents it from being unintentionally spun up.

Spinup/mount
In a different applescript window, write: "do shell script "diskutil mountDisk disk1"

Each applescript can be saved as an application. I also added custom icons so my dock would look better.
 

ahdickter

macrumors 6502
Original poster
Jun 12, 2011
293
0
Pittsburgh, Pennsylvania
After having had an optibay for over a year, I've tended to let the sleep timer take care of things in most cases. If I'm really conserving battery I have "applications" that i made using applescript which will unmount/remount the disk. The only reason I didn't combine them into a "toggle" function is that the drive always spins up after waking from sleep, and I haven't found a way around that.

Scripts:

In terminal type: "diskutil list"
On the left side it shows how the disks are numbered... mine is "/dev/disk1" so my scripts use the number 1

Spindown/eject
In applescript editor, write: "do shell script "hdiutil eject disk1"
This spins down the disk and essentially prevents it from being unintentionally spun up.

Spinup/mount
In a different applescript window, write: "do shell script "diskutil mountDisk disk1"

Each applescript can be saved as an application. I also added custom icons so my dock would look better.

Thank you!!
 

ahdickter

macrumors 6502
Original poster
Jun 12, 2011
293
0
Pittsburgh, Pennsylvania
After having had an optibay for over a year, I've tended to let the sleep timer take care of things in most cases. If I'm really conserving battery I have "applications" that i made using applescript which will unmount/remount the disk. The only reason I didn't combine them into a "toggle" function is that the drive always spins up after waking from sleep, and I haven't found a way around that.

Scripts:

In terminal type: "diskutil list"
On the left side it shows how the disks are numbered... mine is "/dev/disk1" so my scripts use the number 1

Spindown/eject
In applescript editor, write: "do shell script "hdiutil eject disk1"
This spins down the disk and essentially prevents it from being unintentionally spun up.

Spinup/mount
In a different applescript window, write: "do shell script "diskutil mountDisk disk1"

Each applescript can be saved as an application. I also added custom icons so my dock would look better.

After restarting my MacBook Pro and trying to run the AppleScript I get the following error: "error "hdiutil: couldn't unmount \"disk1\" - Resource busy" number 16"

Any ideas?
 

riptideMBP

macrumors 6502
May 29, 2011
260
0
After restarting my MacBook Pro and trying to run the AppleScript I get the following error: "error "hdiutil: couldn't unmount \"disk1\" - Resource busy" number 16"

Any ideas?

When it says busy, it means exactly that- something is currently accessing the drive you want to spin down... for me, that usually means i have itunes or steam running (off my hard drive). Having to quit apps is another reason I usually let things take care of themselves (sleeptimer) rather than forcing it
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.