Skip to content

Instantly share code, notes, and snippets.

@deevis
Last active May 21, 2023 19:29
Show Gist options
  • Save deevis/f457eb9ed9d8f27e5c5b693ce6f78696 to your computer and use it in GitHub Desktop.
Save deevis/f457eb9ed9d8f27e5c5b693ce6f78696 to your computer and use it in GitHub Desktop.
Mount shared volume on linux (Raspberry Pi)
# on host (eg: 192.168.0.111)
sudo apt-get install samba samba-common-bin
sudo vi /etc/samba/smb.conf
# create directory with correct permissions that can be exposed via Samba
sudo mkdir -p /mnt/drive01
sudo chown -R pi:pi /mnt/drive01
# add sections within /etc/samba/smb.conf
[Pi Media Share]
path = /mnt/drive01/Media
writeable = yes
create mask = 0777
directory mask = 0777
public = yes
[PiBackups]
path = /mnt/drive01/backups
writeable = yes
create mask = 0777
directory mask = 0777
public = yes
# end sections within /etc/samba/smb.conf
# start Samba running on host
sudo systemctl start smbd
# check that Samba is running on host
sudo systemctl status smbd
################################################################################
# on client
# within /etc/fstab
# host IP and name of mount from host's /etc/samba/smb.conf section
//192.168.0.111/PiBackups /mnt/pi_plex_share cifs user=pi,pass=YESTHISISTHEACTUALPASSWORD 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment