LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2015, 04:25 PM   #1
Fraludio
LQ Newbie
 
Registered: Apr 2015
Posts: 2

Rep: Reputation: Disabled
Problem with NFS Sharing between two raspberry pis


I have two raspberrys, one running OSMC and another running raspbian. The first one has two 1TB hard drives plugged in through a powered usb hub. I want to access to the osmc hard drives from the one running raspbian. They are both in the same local network, the osmc one has the ip 192.168.1.24 and the raspbian one has 192.168.1.28. Both are static ips.

These are the hard drives::
Code:
osmc@osmc:~$ ls /media/ -la
total 36
drwxr-xr-x  4 root root  4096 Mar 31 18:28 .
drwxr-xr-x 23 root root  4096 Mar 15 13:35 ..
drwx------  1 osmc osmc  8192 Mar 30 21:54 ELEMENTS
-rw-r--r--  1 root root   232 Mar  6 13:34 README
drwx------  1 osmc osmc 16384 Mar 30 15:22 TOURO
ELEMENTS and TOURO, two ntfs hard drives that work just fine.

I tried sharing the first one through nfs with the following config (i copied the parameters from a tutorial):
Code:
osmc@osmc:~$ cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/media/ELEMENTS/Pelis/ 192.168.1.0/24(rw,subtree_check,insecure,no_root_squash)
/media/TOURO/Series/ 192.168.1.0/24(rw,subtree_check,insecure,no_root_squash)
and from the pi running raspbian I have confirmed that I can see the drives being shared:
Code:
 /media $ showmount -e 192.168.1.24
Export list for 192.168.1.24:
/media/TOURO/Series/   192.168.1.0/24
/media/ELEMENTS/Pelis/ 192.168.1.0/24
Now, when I try to mount them, all works fine, but when I ls the folders nothing cames back. This is my fstab:
Code:
1cat /etc/fstab
proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, so no using swapon|off from here on, use  dphys-swapfile swap[on|off]  for that
UUID=fdff96e6-816c-d001-e05f-96e6816cd001 /media/hdd/ auto defaults,user 0 0 #external hdd

192.168.1.24:/media/ELEMENTS/Pelis /media/pelis nfs rsize=8192,wsize=8192,timeo=14,intr
192.168.1.24:/media/TOURO/Series /media/series nfs rsize=8192,wsize=8192,timeo=14,intr
Code:
apoc@raspbian ~ $ ls /media/pelis/
apoc@raspbian ~ $
The superweird thing is that they are mounted, as they show up if I run "df -h"

Code:
 df -h
S.ficheros                         Tamaño Usados  Disp Uso% Montado en
rootfs                               7,2G   2,6G  4,4G  37% /
/dev/root                            7,2G   2,6G  4,4G  37% /
devtmpfs                             484M      0  484M   0% /dev
tmpfs                                 98M   380K   98M   1% /run
tmpfs                                5,0M      0  5,0M   0% /run/lock
tmpfs                                195M      0  195M   0% /run/shm
/dev/mmcblk0p1                        56M    15M   42M  26% /boot
/dev/sda1                            219G   4,7G  202G   3% /media/hdd
192.168.1.24:/media/ELEMENTS/Pelis   932G   742G  191G  80% /media/pelis
192.168.1.24:/media/TOURO/Series     932G   813G  120G  88% /media/series
Code:
ls /media/ -la
total 808
drwxr-xr-x  5 root root   4096 abr  2 18:36 .
drwxr-xr-x 22 root root   4096 mar 25 16:14 ..
drwxr-xr-x  5 apoc apoc   4096 abr  2 13:12 hdd
drwx------  1 apoc pi   786432 mar 30 22:03 pelis
drwx------  1 apoc pi    28672 mar 29 16:09 series
Note that the group for the two folders is "pi", but if I umount the drives it becomes "apoc" (my nick and my personal group).
Code:
ls /media/ -la
total 20
drwxr-xr-x  5 root root 4096 abr  2 18:36 .
drwxr-xr-x 22 root root 4096 mar 25 16:14 ..
drwxr-xr-x  5 apoc apoc 4096 abr  2 13:12 hdd
drwxr-xr-x  2 apoc apoc 4096 abr  2 18:36 pelis
drwxr-xr-x  2 apoc apoc 4096 abr  2 18:36 series
Both users ("osmc" in the osmc pi and "apoc" in the raspbian one) have the same uid: 1000.

What am i doing wrong?
 
Old 04-03-2015, 08:32 PM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Welcome to LQ!

Try adding the 'nohide' option to the mounts in /etc/exports.
Code:
osmc@osmc:~$ cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
...
/media/ELEMENTS/Pelis/ 192.168.1.0/24(rw,subtree_check,insecure,no_root_squash,nohide)
/media/TOURO/Series/ 192.168.1.0/24(rw,subtree_check,insecure,no_root_squash,nohide)
See 'man exports' for further details.
 
Old 04-04-2015, 11:11 AM   #3
Fraludio
LQ Newbie
 
Registered: Apr 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
IT was the "/", I removed them in /etc/exports after the folders name and now everything works.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: HPL (High Performance Linpack): Benchmarking Raspberry PIs LXer Syndicated Linux News 0 02-13-2015 02:00 PM
LXer: Raspberry Pis Fedora becomes Pidora LXer Syndicated Linux News 0 05-23-2013 03:20 AM
LXer: Wanna Build a Supercomputer? You’ll Need Legos and Raspberry Pis… LXer Syndicated Linux News 0 09-14-2012 10:30 PM
NFS sharing problem madhanblore Linux - Networking 5 08-07-2009 01:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration