Dienstag, 20. Dezember 2011

Shutdown a second harddisk in Mac OS after suspend

I recenctly replaced the main harddisk in my MBP wit an SDD (a Crucial M4, 256GB - runs perfect). As i wanted to have my photo library with me and also wanted more space media data and virtual machines in that device, i also replace the optical multidrive with a magnetic 1 TB disk mounted in a special adapter. All worked very nice, execep one thing: whenever the macbook woke up after a suspend, it would spin up the magnetic disk and keep it on all the time. Most of the time i dont need the additional HDD, so this was annoying. Tuning the energy options did not help, it was constantly running, wasting battery capacity and being noisy rotating. As i got tired of ejecting the disk manually in the diskutility, i eventually managed to put the disk to shutdown immediatly after the system wakes up. First ist installed sleepwatcher http://www.bernhard-baehr.de/ - you can download it as a .tgz there and install it as described in the readme file. After all components were placed at their locations in the filesystme (you need to use "sudo" for most copy operations) i installed two small shellskripts in my home directory: ".sleep" and ".wakeup". The .sleep file is completely empty, the .wakeup contains basically one statement:
/usr/sbin/diskutil eject /dev/disk1
Problem solved!

Keine Kommentare:

Kommentar veröffentlichen