Raspberry Pi usually runs Linux (raspbian oder raspbmc). Linux allows to mount various external data sources. Following protocols are used commonly: SAMBA: smbfs/cifs, NFS: nfs, SSH: sshfs, FTP: cupsftp and Cloudspace: webdav/davfs. Following article explains with sample config files how to get access to these different datasourecs on the Raspberry Pi.
Following services rsp protocols are described:
- SAMBA: smb/cifs - Windows protokoll. Should be used locally only
- NFS: nfs - Unix Protokoll. Requires Unix and is much faster than smb
- SSH: sshfs - Protokoll which reuired an ssh daemon on the server side
- FTP: cupsftp - Protokoll which requires an ftp server on the server side
- Cloudspace: webdav/davfs - Protokoll whis is used by owncloud, seafile and various other applications
Following configuration line have to be added in /etc/fstab and adapted the local environment.
SAMBA
This sample configuration connects to a samba server serverix and directory Serverix and is mounted on /remote/serverix
//serverix/Serverix /remote/serverix cifs noauto,rw,noserverino,credentials=/etc/samba/auth.192.168.0.1.ftpuser 0 0
/etc/samba/auth.192.168.0.1.ftpuser defines the access credentials
username=sambaLogonUserid
password=sambaLogonUseridPassword
NFS
This sample configuration connects to a nfs drive called home on server obelix and will be mounted on /remote/obelix.
obelix:/home /remote/obelix nfs rsize=8192,wsize=8192,intr,noauto,timeo=14 0 0
FTP
This sample configuration connects to a FTP server called www.my-server.de and will be mounted on /remote/server.
curlftpfs#www.my-server.de /remote/server fuse noauto,uid=1000,gid=1000,umask=0022,allow_other 0 0
.netrc defines the access credentials
machine www.my-server.de
login myserverFtpLogonUserid
password myserverFtpLogonUseridPassword
SSH
This sample configuration connects to a ssh server called obelix and remote directory /home/pi and will be mounted on /remote/obelix. An id_rsa file generated with ssh-keygen is used for authentication and the public key id_rsa.pub has to be added to the ssh server in the authorized_keys with ssh-copy-id.
sshfs#remoteUser@obelix:/home /remote/obelix fuse user,_netdev,reconnect,uid=1000,gid=1000,idmap=user,identityfile=/home/localUser/.ssh/id_rsa,allow_other 0
CLOUDSPACE/webdav
This sample configuration connects to a server called sd2dav.1und1.de and will be mounted on /remote/1und1.
https://sd2dav.1und1.de /remote/1und1 davfs rw,noauto,user 0 0
.davfs2/secrets defines the access credentials
https://sd2dav.1und1.de serverUserid serverPassword
Detailed description for other webdav providers: How to use webdav on Linux

