Often when something like that happens, it's because there is I/O activity on the partition you are trying to unmount. Make sure nothing is running and check with listing the open files. Code: sudo lsof | grep <write_partition_here> If anything is open, kill it and try again. Good luck!
sudo lsof | grep <write_partition_here>