Hi ashfame
The umount command will refuse to unmount a "device" if its filesystem is in use:
1. If you open a file with an editor or the less command, that filesystem is in use.
2. If you execute cd /mnt/mmcblk0p2 in a terminal, that filesystem is in use.
3. If you are using a file manager to look at a directory, that filesystem is in use.
If you try to unmount a filesystem that is in use, you will receive a target is busy error message.
That brings us to umount and sync. You don't need sync. The umount command waits for writes to complete. I put together a little
slideshow to demonstrate. Each image contains 2 terminals. The top terminal monitors whether the device is busy (1) or not (0).
The bottom terminal shows the commands as I executed them.
Start: The device is not busy (0). No commands have been given yet.
Copy: We copy a large file (~100 Mbytes) to a USB thumb drive. The device is busy (1). Notice the command prompt has returned
even though the copy command has not completed.
Unmount: We issue a umount command. The device is still busy (1) because it is still being written to. Notice the command prompt
has
NOT returned because the umount command has not completed. It will be blocked until all pending writes are
completed.
Done: The device is no longer busy (0) and the umount command completes.