Raspberry Pi – how to mount a new drive

  bash, linux, raspberry-pi
# make the dir
mkdir /mnt/mount1

# list the drives
ls -l /dev/disk/by-uuid/


total 0
lrwxrwxrwx 1 root root 15 May  6  2015 13d368bf-6dbf-4751-8ba1-88bed06bef77 -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 15 May  6  2015 15CD-3B79 -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 10 Dec  6 22:22 ba20caf8-6ef0-42e7-9e45-4187bfa8e543 -> ../../sda1


# get the ID, ex: ba20caf8-6ef0-42e7-9e45-4187bfa8e543


# edit fstab
nano /etc/fstab
 
# add the lines:

# My external drive
UUID=ba20caf8-6ef0-42e7-9e45-4187bfa8e543 /mnt/mount1 auto defaults 0 2

# automount it all
mount -a


# check
df -h /mnt/mount1


Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       459G  436G     0 100% /mnt/mount1