How to mount an external drive on a Raspberry Pi

Create a directory to mount the external drive to and change the directory permissions

sudo mkdir -p /media/USB_Drive
sudo chmod 755 /media/USB_Drive

Display the data sources attached to the Raspberry Pi

sudo blkid

For your external hard drive make a note of both the uuid and the file system type

/dev/sda1: LABEL="KINGSTON" "UUID=9EAA1FFFAA1FD29F" TYPE="ntfs" PARTUUID="04030201-01"

Edit the fstab file

sudo nano /etc/fstab

Add your external drive information to the end of the file

UUID=9EAA1FFFAA1FD29F  /media/USB_Drive   ntfs    defaults      0     0

Save changes and exit the file

press control x
press y
press return

If your file system type is ntfs then you may need to install the ntfs-3g support package

sudo apt-get install ntfs-3g

The external drive will now be available from the /media directory