Tuesday, May 27, 2008

a quick tip: the disk "name-here" is in use and could not be ejected

(permalink)
Under Leopard I seem to get this error relatively often when I'm trying to eject my external disks. Even after quitting all my applications, the error doesn't go away. I never want to disconnect my drive without unmounting it (maybe it's an OCD thing). Here's my solution:

First, get the device name of the drive: Disk utility > Select volume > Click Info > Then note the disk identifier.

Open up terminal to check which applications are using this drive (substitute your drive name):
lsof /dev/disk2s10


Quit (or kill) all the processes that are using the resource. If nothing is returned (as is frequently the case with me), then force umount the drive (substitute your drive mount point):
sudo umount -f /Volumes/Backup


I'm adding this because the man page on umount doesn't document the force (-f) option.

Labels: , ,

Thursday, February 21, 2008

Save 6-7 GB on Leopard

(permalink)
If you have a MacBook Air, this tip is especially helpful, given the tiny size of your hard drive.

Here are some quick steps you can follow to save 6-7 GB:

1. Open up terminal and type "rm -r /Library/Printers/*" to delete 3GB worth of printer drivers. Then use the Leopard install CD to reinstall drivers for the 1-2 printers you actually own.

2. Disable safe sleep and remove the sleeimage. To do this, open your terminal and type "sudo pmset -a hibernatemode 0; sudo rm /var/vm/sleepimage"

Note: After you do this your mac will take about 3 seconds to go to sleep, as opposed to ~15. However, if your battery is exhausted while the mac is sleeping, you will loose your session data.

To re-enable safe sleep, open your terminal and type "sudo pmset -a hibernatemode 0"

3. Delete your iWork '08 trial (if you're not using it):

Drag the iWork folder (in Applications) to the trash can.

You'll also want to delete:
library > receipts > iwork08trial.pkg
library > preferences > com.apple.iwork08.plist
youraccount > library > preferences > com.apple.iWork.Keynote.plist
youraccount > library > preferences > com.apple.iWork.Numbers.plist
youraccount > library > preferences > com.apple.iWork.Pages.plist

Labels: , , , ,