Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

NFS Server stopped working

Thu Sep 20, 2018 12:25 am

I just did an apt-get update ect. Now my picam will no longer mount my archives onto my seperate Pi NFS server?

DirkS
Posts: 9038
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: NFS Server stopped working

Thu Sep 20, 2018 7:13 am

What OS + version do you use?
How do you try to mount the share (manually, fstab, ...)? Please share the exact command you use
Do you get any error messages when you try to mount the share?

Are you sure the NFS server is up and running correctly?

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Fri Sep 21, 2018 8:31 pm

NFS service will not start, i get

See "systemctl status nfs-server.service" and "journalctl -xe" for details.

no idea how to see them

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Fri Sep 21, 2018 8:32 pm

My nfs service will not start

service nfs-kernel-server start
Job for nfs-server.service failed because the control process exited with error code.
See "systemctl status nfs-server.service" and "journalctl -xe" for details.

User avatar
rpdom
Posts: 12806
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: NFS Server stopped working

Fri Sep 21, 2018 8:46 pm

Rasilon wrote:
Fri Sep 21, 2018 8:32 pm
See "systemctl status nfs-server.service" and "journalctl -xe" for details.
Type those two commands into a terminal window on your Pi (you may need to put "sudo " in front of each command).

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Fri Sep 21, 2018 9:58 pm

[email protected]:~ $ sudo systemctl status nfs-server.service
* nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor prese
Active: failed (Result: exit-code) since Fri 2018-09-21 20:26:43 UTC; 1h 26mi
Process: 7323 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILUR

Sep 21 20:26:43 ArchivePi systemd[1]: Starting NFS server and services...
Sep 21 20:26:43 ArchivePi exportfs[7323]: exportfs: Failed to stat /mnt/nfs: No
Sep 21 20:26:43 ArchivePi systemd[1]: nfs-server.service: Control process exited
Sep 21 20:26:43 ArchivePi systemd[1]: Failed to start NFS server and services.
Sep 21 20:26:43 ArchivePi systemd[1]: nfs-server.service: Unit entered failed st Sep 21 20:26:43 ArchivePi systemd[1]: nfs-server.service: Failed with result 'ex
lines 1-11/11 (END)
* nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-09-21 20:26:43 UTC; 1h 26min ago
Process: 7323 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)

Sep 21 20:26:43 ArchivePi systemd[1]: Starting NFS server and services...
Sep 21 20:26:43 ArchivePi exportfs[7323]: exportfs: Failed to stat /mnt/nfs: No such file or directory
Sep 21 20:26:43 ArchivePi systemd[1]: nfs-server.service: Control process exited, code=exited status=1
Sep 21 20:26:43 ArchivePi systemd[1]: Failed to start NFS server and services.
Sep 21 20:26:43 ArchivePi systemd[1]: nfs-server.service: Unit entered failed state.
Sep 21 20:26:43 ArchivePi systemd[1]: nfs-server.service: Failed with result 'exit-code'.

----------------------------------------------




[email protected]:~ $ sudo journalctl -xe
--
-- A session with the ID c6 has been terminated.
Sep 21 21:55:04 ArchivePi sshd[31401]: Accepted password for pi from 192.168.0.1
Sep 21 21:55:04 ArchivePi sshd[31401]: pam_unix(sshd:session): session opened fo
Sep 21 21:55:04 ArchivePi systemd[1]: Started Session c7 of user pi.
-- Subject: Unit session-c7.scope has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit session-c7.scope has finished starting up.
--
-- The start-up result is done.
Sep 21 21:55:04 ArchivePi systemd-logind[330]: New session c7 of user pi.
-- Subject: A new session c7 has been created for user pi
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- Documentation: http://www.freedesktop.org/wiki/Softwar ... /multiseat
--
-- A new session with the ID c7 has been created for the user pi.
--
-- The leading process of the session is 31401.
Sep 21 21:55:35 ArchivePi sudo[31592]: pi : TTY=pts/0 ; PWD=/home/pi ; USE
Sep 21 21:55:35 ArchivePi sudo[31592]: pam_unix(sudo:session): session opened fo
lines 2297-2319/2319 (END)
--
-- A session with the ID c6 has been terminated.
Sep 21 21:55:04 ArchivePi sshd[31401]: Accepted password for pi from 192.168.0.10 port 58815 ssh2
Sep 21 21:55:04 ArchivePi sshd[31401]: pam_unix(sshd:session): session opened for user pi by (uid=0)
Sep 21 21:55:04 ArchivePi systemd[1]: Started Session c7 of user pi.
-- Subject: Unit session-c7.scope has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit session-c7.scope has finished starting up.
--
-- The start-up result is done.
Sep 21 21:55:04 ArchivePi systemd-logind[330]: New session c7 of user pi.
-- Subject: A new session c7 has been created for user pi
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- Documentation: http://www.freedesktop.org/wiki/Softwar ... /multiseat
--
-- A new session with the ID c7 has been created for the user pi.
--
-- The leading process of the session is 31401.
Sep 21 21:55:35 ArchivePi sudo[31592]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xe
Sep 21 21:55:35 ArchivePi sudo[31592]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
lines 2297-2319/2319 (END)
--
-- A session with the ID c6 has been terminated.
Sep 21 21:55:04 ArchivePi sshd[31401]: Accepted password for pi from 192.168.0.10 port 58815 ssh2
Sep 21 21:55:04 ArchivePi sshd[31401]: pam_unix(sshd:session): session opened for user pi by (uid=0)
Sep 21 21:55:04 ArchivePi systemd[1]: Started Session c7 of user pi.
-- Subject: Unit session-c7.scope has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit session-c7.scope has finished starting up.
--
-- The start-up result is done.
Sep 21 21:55:04 ArchivePi systemd-logind[330]: New session c7 of user pi.
-- Subject: A new session c7 has been created for user pi
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- Documentation: http://www.freedesktop.org/wiki/Softwar ... /multiseat
--
-- A new session with the ID c7 has been created for the user pi.
--
-- The leading process of the session is 31401.
Sep 21 21:55:35 ArchivePi sudo[31592]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xe
Sep 21 21:55:35 ArchivePi sudo[31592]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
~

User avatar
rpdom
Posts: 12806
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: NFS Server stopped working

Sat Sep 22, 2018 4:27 am

Sep 21 20:26:43 ArchivePi exportfs[7323]: exportfs: Failed to stat /mnt/nfs: No
That's your problem. Presumably you have /mnt/nfs in your list of exports, but /mnt/nfs doesn't exist (yet).

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Sat Sep 22, 2018 5:36 am

I reinstalled the whole OS and started again.

The server seems to be working, the server is on etho 192.168.0.21

the contents of the exports file

Code: Select all

# /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_sub$
#
# 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)
#
/mnt/nfsserver 192.168.0.15(rw,fsid=0,insecure,no_subtree_check,sync)

My client is on Wlan 192.168.0.15

contents of fstab

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=e76f6c79-01  /boot           vfat    defaults          0       2
PARTUUID=e76f6c79-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
192.168.0.21:/mnt/nfsserver   /mnt/nfs   nfs    rw  0  0 
I get the following error when I

Code: Select all

sudo mount 192.168.0.21:/mnt/nfsserver /mnt/nfs

Code: Select all

mount.nfs: mount to NFS server '192.168.0.21:/mnt/nfsserver' failed: RPC Error: Unable to receive.

Ernst
Posts: 676
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: NFS Server stopped working

Sat Sep 22, 2018 5:56 am

Rasilon wrote:
Sat Sep 22, 2018 5:36 am
I reinstalled the whole OS and started again.

The server seems to be working, the server is on etho 192.168.0.21

the contents of the exports file

Code: Select all

# /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_sub$
#
# 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)
#
/mnt/nfsserver 192.168.0.15(rw,fsid=0,insecure,no_subtree_check,sync)
According to the exports file on 192.168.0.21 you are exporting a disk volume mounted on the mount point "nfsserver" in the directory "/mnt".
- does this mount point exist ? you can do "ls /mnt" to see the mount points
- is a disk volume mounted "/mnt/nfsserver" ?
- is there an entry in "/etc/fstab" to mount a disk volume on "/mnt/nfsserver" ?

The reason for asking is that with your original problem the nfs server did not start because of a missing mount point "/mnt/nfs". See the second line below:

Code: Select all

Sep 21 20:26:43 ArchivePi systemd[1]: Starting NFS server and services...
Sep 21 20:26:43 ArchivePi exportfs[7323]: exportfs: Failed to stat /mnt/nfs: No such file or directory
Sep 21 20:26:43 ArchivePi systemd[1]: nfs-server.service: Control process exited, code=exited status=1
Sep 21 20:26:43 ArchivePi systemd[1]: Failed to start NFS server and services.
Sep 21 20:26:43 ArchivePi systemd[1]: nfs-server.service: Unit entered failed state.
Sep 21 20:26:43 ArchivePi systemd[1]: nfs-server.service: Failed with result 'exit-code
My first computer was an ICT1500, my first "personal" computer was the Science of Cambridge Mk14, followed by a TRS-80 Model I later

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Sat Sep 22, 2018 6:10 am

Now I am completely lost. I will try again tomorrow. thanx for the help btw..

User avatar
rpdom
Posts: 12806
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: NFS Server stopped working

Sat Sep 22, 2018 7:37 am

Is the rpc service running? I remember having problems with that one at some point. The rpc daemon was trying to start before the network was accessible and I had to do something to get it starting up correctly.

I'm fairly certain that issue has been fixed now.

Maybe it isn't installed? It seems unlikely.

DirkS
Posts: 9038
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: NFS Server stopped working

Sat Sep 22, 2018 9:39 am

Rasilon wrote:
Sat Sep 22, 2018 6:10 am
Now I am completely lost.
It looks to me you're confusing the client and server.

Code: Select all

/mnt/nfsserver 192.168.0.15(rw,fsid=0,insecure,no_subtree_check,sync)
The first entry is what you want to share and that's probably not /mnt/nfsserver but something like /home/pi (if you want to share the home directory).
If you want to share a mounted harddisk then you would use the mount point for that drive

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Sat Sep 22, 2018 9:35 pm

I restarted all over again.

Server is 192.168.0.21 the directory i want to use is /home/pi/secam

My Exports file

Code: Select all

# /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_sub$
#
# 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)
#
/home/pi/secam 192.168.0.15(rw,fsid=0,sync,no_subtree_check,no_root_squash)
when i run showmount -e showmount -e 192.168.0.15 i get

Code: Select all

clnt_create: RPC: Unknown host

on my client 192.168.0.15 the folder i want to put on the server is /mnt/nfs/media

this is my fstab

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=e76f6c79-01  /boot           vfat    defaults          0       2
PARTUUID=e76f6c79-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
192.168.0.21:/home/pi/secam   /mnt/nfs/   nfs    rw  0  0

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Sun Sep 23, 2018 3:18 am

Ok I guess i am out of luck until someone can write a tutorial that works, until then I will have to find another way of sharing on Raspbian because NFS ain't working.

Ernst
Posts: 676
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: NFS Server stopped working

Sun Sep 23, 2018 6:26 am

Rasilon wrote:
Sat Sep 22, 2018 9:35 pm

when i run showmount -e showmount -e 192.168.0.15 i get

Code: Select all

clnt_create: RPC: Unknown host
please look at

Code: Select all

man showmount
showmount queries the mount daemon on a remote host for information
about the state of the NFS server on that machine. With no options
showmount lists the set of clients who are mounting from that host.
What this means is that you asked showmount to query the client (.15) and not the server (.21).
The best approach is to ignore the client (.15) at this point and to concentrate on the server.

Serious question: are you sure that you did not have any typing mistake in the IP address ? see below where I have a "," instead of a "." in the address:

Code: Select all

[email protected]:~ $ showmount -e 192.168.0.249
clnt_create: RPC: Program not registered
[email protected]:~ $ showmount -e 192.168.0,249
clnt_create: RPC: Unknown host
[email protected]:~ $
My first computer was an ICT1500, my first "personal" computer was the Science of Cambridge Mk14, followed by a TRS-80 Model I later

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Sun Sep 23, 2018 5:12 pm

Right know I cannot get past the /ect/exports file

/home/pi/secam 192.168.0.15/24(rw,nohide,no_subtree_check,no_root_squash)

/home/pi/secam is the directory i want to use

192.168.0.15 is my client


when I use
sudo exportfs -ra I get

exportfs: /home/pi/secam requires fsid= for NFS export

Ernst
Posts: 676
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: NFS Server stopped working

Sun Sep 23, 2018 5:29 pm

Code: Select all

man exports
/fsid=num
My first computer was an ICT1500, my first "personal" computer was the Science of Cambridge Mk14, followed by a TRS-80 Model I later

DirkS
Posts: 9038
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: NFS Server stopped working

Sun Sep 23, 2018 5:37 pm

Is /home/pi/secam a normal directory or is it a mount point for a local (USB) drive?

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Sun Sep 23, 2018 6:50 pm

it is a normal directory. I have raspbian installed on the WD pidrive.

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Mon Sep 24, 2018 7:03 pm

I have latest updated raspbian installed on a PIdrive that mounted to pi with berryboot.

How do I set up my NFS exports file?


I have

Code: Select all

/home/pi/secam 192.168.0.15(rw,nohide,no_subtree_check,no_root_squash)
when I use exportfs -ra, it returns

Code: Select all

/home/pi/secam requires fsid= for NFS export

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Tue Sep 25, 2018 2:36 am

NFS is a very good system, but it is completely useless because no one can assist me in setting the thing up. Wasted my money buying the pi with pidrive.

DirkS
Posts: 9038
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: NFS Server stopped working

Tue Sep 25, 2018 6:32 am

Rasilon wrote:
Tue Sep 25, 2018 2:36 am
NFS is a very good system, but it is completely useless because no one can assist me in setting the thing up. Wasted my money buying the pi with pidrive.
That's complete and utter rubbish.
It's the easiest to set up. I have done it several times.

I have no idea why you get the error, I had never seen it before. Try googling for 'nfs fsid=' or the error message itself.
It will show you need to add the fsid=<somevalue> option. I have not delved into it myself and I feel no urge to do so now.

Goodbye.

BTW: try adding fsid=0 nd see what hapens

mfa298
Posts: 1301
Joined: Tue Apr 22, 2014 11:18 am

Re: NFS Server stopped working

Tue Sep 25, 2018 2:59 pm

Rasilon wrote:
Mon Sep 24, 2018 7:03 pm
when I use exportfs -ra, it returns

Code: Select all

/home/pi/secam requires fsid= for NFS export
If you had read and followed the earlier comment by Ernst:
Ernst wrote:
Sun Sep 23, 2018 5:29 pm

Code: Select all

man exports
/fsid=num
You would read
fsid=num|root|uuid
NFS needs to be able to identify each filesystem that it exports. Normally it will use a UUID for the filesystem (if the filesystem has
such a thing) or the device number of the device holding the filesystem (if the filesystem is stored on the device).

As not all filesystems are stored on devices, and not all filesystems have UUIDs, it is sometimes necessary to explicitly tell NFS how to
identify a filesystem. This is done with the fsid= option.

For NFSv4, there is a distinguished filesystem which is the root of all exported filesystem. This is specified with fsid=root or fsid=0
both of which mean exactly the same thing.

Other filesystems can be identified with a small integer, or a UUID which should contain 32 hex digits and arbitrary punctuation.

Linux kernels version 2.6.20 and earlier do not understand the UUID setting so a small integer must be used if an fsid option needs to be
set for such kernels. Setting both a small number and a UUID is supported so the same configuration can be made to work on old and new ker‐
nels alike.
I would also suggest as DirkS has suggested:
DirkS wrote:
Tue Sep 25, 2018 6:32 am
BTW: try adding fsid=0 nd see what hapens
My previous experience of NFS on Linux is it's pretty robust and just works (if you follow what the error messages say). These days I mostly only use NFS clients on Linux (it's been some years since I setup a Linux NFS server as I prefer other platforms for that).

Rasilon
Posts: 77
Joined: Wed Mar 11, 2015 7:30 pm

Re: NFS Server stopped working

Tue Sep 25, 2018 6:52 pm

I went with the nuclear option, I formatted pidrive and reinstalled raspbian on the pidrive using the latest noobs.

I get no error messages now but my secam folder is empty after rebooting each pi,



Etho pidrive server
Directory /home/pi/secam properties group pi[1000] owner pi[1000] 0755

Contents of ect/exports

Code: Select all

# /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_sub$
#
# 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)
#
/home/pi/secam  192.168.0.15(rw,sync,no_subtree_check)



Wlan pi with camera

directory /mnt/nfs properties group pi[1000] owner pi[1000] 0777

contents of /ect/fstab

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=e76f6c79-01  /boot           vfat    defaults          0       2
PARTUUID=e76f6c79-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
192.168.0.21:/home/pi/secam   /mnt   nfs  rw  0  0

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 49 guests