Check the list of disks attached and locate the disk
sudo fdisk -l
Get the UUID of the Drive
sudo blkid
Create a directory as mount point
sudo mkdir /driveE
Create a user group with permission to manage the mounted folde, otherwise will be default to root
sudo groupadd drivemanage
sudo usermod -aG drivemanage USERNAME
(Where USERNAME is the name of the user to be added)
Add folder to the driver management group
sudo chown -R :drivemanage /driveE
Create and enter FSTAB (filesystem table) entry
sudo nano /etc/fstab
Enter in the below format
UUID=$deviceuuidhere /driveE auto nosuid,nodev,nofail,x-gvfs-show 0 0
- UUID=$deviceuuidhere - is the UUID of the drive. You don't have to use the UUID here. You could just use /dev/sdj, but it's always safer to use the UUID as that will never change (whereas the device name could).
- /driveE - is the mount point for the device.
- auto - automatically determine the file system
- nosuid - specifies that the filesystem cannot contain set userid files. This prevents root escalation and other security issues.
- nodev - specifies that the filesystem cannot contain special devices (to prevent access to random device hardware).
- nofail - removes the errorcheck.
- x-gvfs-show - show the mount option in the file manager. If this is on a GUI-less server, this option won't be necessary.
- 0 - determines which filesystems need to be dumped (0 is the default).
- 0 - determine the order in which filesystem checks are done at boot time (0 is the default).
sudo mount -a