To unmount a named drive from the command line I wrote a bash function which just tells the Finder via AppleScript to eject the drive:
eject () { osascript -e "tell application \"Finder\" to eject disk \"$1\"" ; }
However I'd like to also find a way to subsequently re-mount that drive (by name), but this seems to be somewhat more complicated, perhaps requiring the use of diskutil
?