When using CMD-E to eject mounted disk images (e.g. DMGs), the volumes aren't actually ejected, but unmounted instead. This is fine for physical storage volumes, but not really necessary for disk images.
Alternative for "Command" menu, i.e. user choice:
(1) CMD-E and "Eject Volume" > true eject
(2) ALT-CMD-E and "Unmount Volume" > unmount
Disk images are unmounted instead of ejected [FIXED]
Re: Disk images are unmounted instead of ejected
Hi,
That's interesting, I've actually never thought about this difference.
Ok, I've added an eject call after successfully unmounting a volume, unconditionally for now.
Wondering - are there any situations when you don't want a media to be ejected after being unmounted?
I think that having two separate actions for this task is an overkill.
That's interesting, I've actually never thought about this difference.
Ok, I've added an eject call after successfully unmounting a volume, unconditionally for now.
Wondering - are there any situations when you don't want a media to be ejected after being unmounted?
I think that having two separate actions for this task is an overkill.
Re: Disk images are unmounted instead of ejected
Normally you would want all volumes to "go away", so to speak, i.e. true eject. Just unmounting volumes can be a security risk. E.g. you have an encrypted disk image, and if you only unmount it, it's still in the list, and you can remount it without password input, so anyone with access to your computer while you're away would have access to this encrypted content. On the other hand, unmounting instead of ejecting can also be an advantage, because you just need to run the mount command again on an unmounted volume, and you don't need to navigate through your filesystem to the DMG or sparsebundle to access the disk image file first. As for data safety, there is (to my knowledge) no difference between eject and unmount: after you've unmounted all volumes on an external drive, you can unplug the drive.
Code: Select all
diskutil info -all
Re: Disk images are unmounted instead of ejected
Alright then, ejecting will be always called after unmounting, done.