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:

  1. SAMBA: smb/cifs - Windows protokoll. Should be used locally only
  2. NFS: nfs - Unix Protokoll. Requires Unix and is much faster than smb
  3. SSH: sshfs - Protokoll which reuired an ssh daemon on the server side
  4. FTP: cupsftp - Protokoll which requires an ftp server on the server side
  5. 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

Add comment

Spam Kommentare sind sinnlos !
Vor der Publizierung wird jeder Beitrag auf Spam geprüft. Leider dauert es deswegen bis ein Kommentar sichtbar wird. Dafür erhält aber kein Subscriber Spam eMails.
Die eMail ist optional und nicht öffentlich sichtbar. Sie ist notwendig um eMail Benachrichtigungen zu Antworten auf Kommentare zu erhalten. Sie wird auch u.U. auch vom Seitenbetreiber genutzt um offline Kontakt aufzunehmen.

Spam comments are useless !
Any comment will be reviewed first and checked for spam. Unfortunately this delays the publishing of comments but will protect subscribers from spam.
eMail is optional and hidden and is required to get update notifications for any comments. In addition your eMail may be used by the website owner to get in contact with you offline.