We recently set up a Raspberrry pi as a local fileserver. The Pi is connected to a powered USB hub and a number of hard drives. We use this to backup our systems overnight - the Pi is not the fastest, but the entire system draws less power than a lightbulb.
To work properly, the connected drives need to be mounted at boot, and this guide outlines how to achieve this.
You could follow the same procedure for adding drives to any Debian based distro.
Set Up Drives
Use the Disks utility to format and label drives.
Ext4 is a good choice for a filesystem format if the disk is intended for Linux use only.
Mount Points
To mount disk drives, first create a mount point(s) and set permissions:
Find Drives
There are many ways to determine the drives available to the system:
Disk drives are distinguished by a UUID(universally unique identifier) - we’ll use this number to mount the disks rather than the assigned device name (e.g. /dev/sda1), since the latter might change and the UUID will not.
Manual Mount
To mount a drive manually:
This won’t be persistent - when the system reboots, the drive will no longer be available.
Auto Mount on Boot
Amend /etc/fstab by adding a line for each required disk. For example:
Save, reboot and disks will be mounted automatically on the defined mount points.