NFS Client on Raspberry Pi

20 Sep 2013

Prerequisites

Mount folders on NAS

My goal is to share folders that are on my NAS which hostname is chezak.local and IP is 192.168.0.13. So first:

  • create a pi user/group on the NAS with the sames uids as on the pi: 1000/1000
  • setup NFS permissions on shared directories on the NAS via the web interface

It seems that rpcbin is a necessary dependency:

$ sudo apt-get install rpcbind
$ sudo update-rc.d rpcbind enable
$ sudo /etc/init.d/rpcbind start

Create folders:

$ sudo mkdir /mnt/incoming
$ sudo mkdir /mnt/music
$ sudo mkdir /mnt/video

Mount folders:

$ sudo mount chezak.local:/volume1/incoming /mnt/incoming
$ sudo mount chezak.local:/volume1/music /mnt/music
$ sudo mount chezak.local:/volume1/video /mnt/video

Test:

$ showmount -e chezak.local

Persist mounts:

$ sudo emacs /etc/fstab

Add those lines:

192.168.0.13:/volume1/incoming /mnt/incoming nfs rw,hard,intr 0 0
192.168.0.13:/volume1/music /mnt/music nfs ro,hard,intr 0 0
192.168.0.13:/volume1/video /mnt/video nfs ro,hard,intr 0 0

External References:

Mount folder on Freebox v6

First, enable windows share on freebox with user/pass and CHEZAK workgroup.

Freebox's hostname is mafreebox.freebox.fr.

Test:

$ smbclient -L mafreebox.freebox.fr -N | grep "Disk" | cut -c -17

Create folder:

$ sudo mkdir /mnt/freebox

Setup mount:

$ sudo emacs /etc/fstab

Add that line:

//mafreebox.freebox.fr/Disque\040dur /mnt/freebox cifs _netdev,rw,users,iocharset=utf8,user=freebox,password=PASSWORD, uid=1000,sec=none,file_mode=0777,dir_mode=0777 0 0

Mount folder:

$ sudo mount /mnt/freebox

External References: