Skip to content

How to Mount a Network Share

Claude Pageau edited this page Dec 13, 2016 · 18 revisions

###How to Mount a Network Share

Make sure you have the IP address of the network computer that has a share with read/write permissions. I am assuming this is a windows PC in the example. Change the items in bold to match the user login and share on the network computer. Note the windows user will need to have read and write permissions on the network share or you can set share access to everyone read/write if you don't want a password.

Login to Raspberry pi via SSH or terminal session and perform the following. Note you can change the name netdrive to anything you like.

cd ~/pi-timolo
mkdir netdrive
sudo mount -t cifs -o username=loginname,password=password  //serverIP/sharename ./netdrive

This should mount the remote drive share to the netdrive folder. Check that the share is successful by typing ls netdrive You should see the directory structure of the remote share if the share connected OK.

To make the change permanent put an entry at the end of the /etc/fstab file

sudo nano /etc/fstab

Add the following to the end of the fstab file

//serverIP/sharename /home/pi/pi-timolo/netdrive cifs username=loginname,password=password 0 0

cntrl-x y to save changes

You should reboot and check to see if the network drive mounted OK.

If it mounted OK then I would create a motion folder on the remote share

cd ~/pi-timolo
mkdir netdrive/motion

Now just change the config.py file to point to the network share mount

cd~/pi-timolo
nano config.py

Change the appropriate motion or timelapse directory locations eg.

motionDir = "netdrive/motion"

Restart pi-timolo and check that new files are being written to the remote network share.

Clone this wiki locally