Unmount usb from shell

Does anyone know how to unmount a usb drive from the shell?

umount /dev/sdb

But most likely to fail even with force switch -f if the drive is in use i.e. samba. Use lsof /dev/sdb to determine.