Network Attached Storage

Things I want to store

  • personal / family photos & videos
  • music (stuff that isn’t available on Spotify)
  • favorite movies

Samba share

With a freshly formatted drive plugged into the Raspberry Pi:

  1. sudo mkfs.ext4 /dev/sda1 (sudo fdisk -l to check of sda1 is correct location)
  2. format partition: sudo mkfs.ext4 /dev/sda1
  3. label partition: sudo e2label /dev/sda1 LABEL
  4. sudo chown -R pi /media/<path to partition> - give permission to modify drive
  5. Add samba:
sudo apt update
sudo apt upgrade
sudo apt install samba samba-common
  1. say yes to ‘use WINS settings from DHCP’, then sudo nano /etc/samba/smb.conf
[SHARE_NAME]
path = /media/PATH_TO_DRIVE
writeable = yes
create mask = 0775
directory mask = 0775
public=no
  1. add samba usersudo smbpasswd -a pi