You can also unmount (the reverse of mounting) a filesystem. As you may have guessed, unmounting refers to the process of detaching a filesystem or a storage device. To unmount a filesystem, you can use umount as follows:
umount filesystem
Change to the /games directory and try to unmount the /dev/sdb1 filesystem:
root@ubuntu-linux:/games# umount /dev/sdb1
umount: /games: target is busy.
Oops! It is saying that the target is busy! That's because I am inside the mount point /games; I will back up one directory and then try again:
root@ubuntu-linux:/games# cd ..
root@ubuntu-linux:/# umount /dev/sdb1
This time it worked! You have to be careful and never unmount a filesystem or any storage device while it is actively being used; otherwise, you may lose data!
Now let's verify the filesystem /dev/sdb1 is indeed unmounted:
root@ubuntu-linux:/# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
| sda1 8:1 0 20G 0 part /
sdb ...