lerner
Posts: 510
Joined: Sun Mar 29, 2015 12:12 am

nfs problem. Works on one machine and not on another.

Fri Oct 20, 2017 9:15 pm

(This came to light while working on my WAP problem and it has me confused.)

Quick overview of the "bigger" picture:
4 x RPI.
This; One to play Music; one as a WAP and NTP server; one as a pseudo tablet.

The NTP is an EARLY version, but is running Jessie.
NTP:

Code: Select all

[email protected]:~ $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
[email protected]:~ $ cat /etc/rpi-issue 
Raspberry Pi reference 2017-01-11
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 21a681692ac70e77d3ebe1dd2a76b31de1a72d89, stage4
[email protected]:~ $ 
Music:

Code: Select all

[email protected]:/var/run $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
[email protected]:/var/run $ cat /etc/rpi-issue 
Raspberry Pi reference 2017-01-11
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 21a681692ac70e77d3ebe1dd2a76b31de1a72d89, stage4
[email protected]:/var/run $ 
This:

Code: Select all

cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
[email protected]:~/TEMP $ cat /etc/rpi-issue 
Raspberry Pi reference 2015-11-21
Generated using Pi-gen, https://github.com/RPi-Distro/Pi-gen, jessie-stage4
[email protected]:~/TEMP $ 
Tablet:

Code: Select all

[email protected]:/var/run/wpa_supplicant $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
[email protected]:/var/run/wpa_supplicant $ cat /etc/rpi-issue 
Raspberry Pi reference 2017-01-11
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 21a681692ac70e77d3ebe1dd2a76b31de1a72d89, stage4


A while back I was wanting to set up SHARES between them.
Fun - NOT!
That's because I was using samba.
Then I discovered NFS! Woo hoo! Easy as - bro!

Code: Select all

sudo apt-get install nfs-kernel-server
sudo systemctl enable rpcbind
(edit /etc/exports)
and voila! It works!

And it does.

I often swap things between most of them.

While "shaving another YAK" I needed to copy a file from the tablet PI to PiFace.
Isn't gonna work.

Code: Select all

sudo systemctl enable rpcbind
Synchronizing state for rpcbind.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d rpcbind defaults
insserv: warning: script 'S02resize2fs_once' missing LSB tags and overrides
insserv: warning: script 'resize2fs_once' missing LSB tags and overrides
Executing /usr/sbin/update-rc.d rpcbind enable
insserv: warning: script 'S02resize2fs_once' missing LSB tags and overrides
insserv: warning: script 'resize2fs_once' missing LSB tags and overrides
Google that, and find:
https://raspberrypi.stackexchange.com/q ... ot-running

Go through their motions - even down to the point of
sudo apt-get purge rpcbind
sudo apt-get install nfs-kernel-server

Then restore your /etc/exports.
Still doesn't work. Same error.

Sorry, but it has me stumped.

All as the same O/S. All up to date. Give or take a week.
But I am 99% sure that when I did the tablet one, I tested it and it worked.

It works on 3 other machines with the same os.

What's going on?

Anyone?

Thanks again in advance.

User avatar
HawaiianPi
Posts: 5496
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: nfs problem. Works on one machine and not on another.

Fri Oct 20, 2017 9:39 pm

With Jessie I needed to use the -o nolock option to mount my NFS shares. Don't know why, and I was lazy and never bothered to troubleshoot it (sorry). I no longer seem to need that option with Stretch, so whatever it was, it's been fixed. Hope that helps you.

EDIT: And I suppose I should mention my file server is running NAS4Free on an x86 machine.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

lerner
Posts: 510
Joined: Sun Mar 29, 2015 12:12 am

Re: nfs problem. Works on one machine and not on another.

Fri Oct 20, 2017 9:54 pm

Thanks.

Where I get stuck is that on this machine I mount the TIME machine thus:
sudo mount -t nfs 192.168.0.99:/home/pi/Public /home/pi/MEDIA/OTHERPIES/Time/ -s -v -n -w -o nolock

and the tablet one thus:
sudo mount -t nfs 192.168.0.92:/home/pi/Public /home/pi/MEDIA/OTHERPIES/Porta/ -s -v -n -w -o nolock

But as it doesn't work, I went to that machine and found the problem - well: found. Identified is a better way of saying it.
Seems the problem is on that (or "the other") machine. The tablet one. (porta)

I don't get why it is complaining. I tried most of the suggestions on the link but it still complains.

lerner
Posts: 510
Joined: Sun Mar 29, 2015 12:12 am

Re: nfs problem. Works on one machine and not on another.

Fri Oct 20, 2017 11:22 pm

Continuing to try and get it working, and working down the page of what to do:

This has me stumped:
I am running Raspbian Jessie Lite (released on Mar 18, 2016), and got the same issue. Here is my steps to completely fix this issue, even if after a reboot.

Firstly have a look at the init file for /etc/init.d/nfs-kernel-server, you should notice its start runlevel is 2,3,4,5.

Also look at the following files' start runlevel, which is S only. I changed its runlevel to 2,3,4,5.

/etc/init.d/nfs-common
/etc/init.d/rpcbind

Then try to update-rc.d the changed init scripts with defaults. First try fails. The trick is to remove and add them again.

update-rc.d -f rpcbind remove

Code: Select all

sudo update-rc.d -f rpcbind remove
insserv: warning: script 'S02resize2fs_once' missing LSB tags and overrides
insserv: warning: script 'resize2fs_once' missing LSB tags and overrides
What does "resize2fs_once" have to do with rpcbind?

(of course it would also be nice(r) if the original part explained that you have to be in /usr/sbin to find the update-rc.d command....

Return to “Beginners”