Eject a Disk on Mac OS X from Command Line
diskutil info -all
Look for the disk: eg. disk3
diskutil unmountDisk disk3
Unmount of all volumes on disk3 was successful
diskutil info -all
Look for the disk: eg. disk3
diskutil unmountDisk disk3
Unmount of all volumes on disk3 was successful