The best tutorial to use for mounting an external Hard Drive permanently on your rspberry pi is on raspberrypi.org documentation
-
List all the disk partitions
sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL
-
Identify the name of the disk partition (eg. sda1)
-
Install the relevant storage driver for your
FSTYPE
(eg. exfat-fuse or ntfs-3g) – usually already install on ubuntu server -
Get the location of the disk partition
sudo blkid
-
Create a folder to mount the device
sudo mkdir /mnt/mydisk
-
Mount the device to that folder
sudo mount /dev/sda1 /mnt/mydisk
-
Verify it is mounted
ls /mnt/mydisk
-
Get the UUID of the device
sudo blkid
-
Edit fstab – filesystem table
sudo vim /etc/fstab UUID=5C24-1453 /mnt/mydisk fstype defaults,auto,users,rw,nofail 0 0
replace
fstype
with the filesystem type. Add,umask=000
afternofail
if the silesystem is FAT or NTFS
-
Reboot
sudo reboot