Simple mounting question I can't seem to find the answer to.
Hi all,
I frequently mount an external hard drive using 'sudo mount /dev/...' and occasionally it (the drive) gets physically disconnected for whatever reason. Ok, so let's say it was mounted using /dev/sda1 for example. lsblk now says, upon reconnecting the device, that is in /dev/sdb1. How can I free up /dev/sda1 again without having to restart the computer?
Posted Apr 16, 2015, 9:32 PM UTC
u/shortbaldman is almost right, but you don't want to be using the mount command with a UUID, at least I don't.
What you do want is to add it into /etc/fstab. You still have to get the UUID ( use blkid )
Now, create a line is fstab that looks something like this ( using my example above )
What we are saying is for the device with this UUID, it mounts to /home/username/terabyte, users are allowed to mount it, do not try to mount at boot or when a mount -a is issued, the filetype is ext4 ( in this example ), and the last two numbers indicate whether it should be dumped ( no ) and whether fsck will try to check it at boot ( no )
Now, in order to mount it, all you have to do is plug it in and type mount ~/terabyte.
This goes a little off of exactly what you were asking, but u/NicroHobak already answered your exact question. I think this is a cleaner way to do it.
Great, thank you for the suggestions. The result of all the help is my problem is now fixed and I've learned some new stuff about mounting. I'm satisfied.