NFS since 28 March2020 does not transfer one partition

Asked by ealthuis

NFS setup of one server and three clients, as of 28 March transfers only 3 of 4 partitions, reason being the missing partition on the client appears to be owned by root:root, while the others are owned by ea:ea. That root ownership cannot be changed by this command:

ea@darter:~$ sudo chown ea:ea /media/mass
[sudo] password for ea:
chown: changing ownership of '/media/mass': Operation not permitted
ea@darter:~$

On 28 March a change was made to nfs-kernel-server:

Start-Date: 2020-03-28 13:15:42
Commandline: apt-get install rpcbind nfs-kernel-server
Requested-By: ea (1000)
Install: libtirpc-common:amd64 (1.1.4-0.4, automatic), nfs-kernel-server:amd64 (1:1.3.4-2.5ubuntu2), libtirpc3:amd64 (1.1.4-0.4, automatic), libevent-2.1-6:amd64 (2.1.8-stable-4build1, automatic), rpcbind:amd64 (1.2.5-6), nfs-common:amd64 (1:1.3.4-2.5ubuntu2, automatic), libnfsidmap2:amd64 (0.25-5.1ubuntu1, automatic)
End-Date: 2020-03-28 13:16:43

The above as a result of this command:
sudo apt update && sudo apt dist-upgrade

A fix would be appreciated.

:

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
ealthuis
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

mount; lsb_release -a; uname -a

Thanks

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Also, how are you mounting the remote storage?

Thanks

Revision history for this message
ealthuis (ealthuis) said :
#3

last question first:

MOUNTOPTS="-o rw,hard,intr,tcp,actimeo=3"

Proto =tcp,port=2049

MOUNTS=( "/mass|/media/mass" "/mass0|/media/mass0" "/mass1|/media/mass1" "/mass2|/media/mass2" )

and the output of the command:

ea@discovery:~$ mount; lsb_release -a; uname -a
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=3969100k,nr_inodes=992275,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=802864k,mode=755)
/dev/sda3 on / type ext4 (rw,noatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=17670)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/sda3 on /export/users type ext4 (rw,noatime,errors=remount-ro)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sdc1 on /mass1 type ext4 (rw,relatime)
/dev/sdb1 on /mass0 type ext4 (rw,relatime)
/dev/sdc3 on /mass2 type ext4 (rw,relatime)
/dev/sda2 on /recovery type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sdb4 on /mass type ext4 (rw,relatime)
tmpfs on /run/user/120 type tmpfs (rw,nosuid,nodev,relatime,size=802864k,mode=700,uid=120,gid=127)
gvfsd-fuse on /run/user/120/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=120,group_id=127)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=802864k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/fuse on /run/user/1000/doc type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
No LSB modules are available.
Distributor ID: Pop
Description: Pop!_OS 20.04 LTS
Release: 20.04
Codename: focal
Linux discovery 5.4.0-7626-generic #30~1588169883~20.04~bbe668a-Ubuntu SMP Wed Apr 29 21:00:02 UTC x86_64 x86_64 x86_64 GNU/Linux
ea@discovery:~$

Revision history for this message
ealthuis (ealthuis) said :
#4

Also, the mount commands from a client, the terminal output from the server

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

We need the mount options used by the client. Can you please give the output of:

mount

on the client

Revision history for this message
ealthuis (ealthuis) said :
#6

This is the mount on the other desktop right beside the "server", the laptops are available if wanted:

ea@seanix:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=1935956k,nr_inodes=483989,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=396236k,mode=755)
/dev/sdb1 on / type ext4 (rw,noatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=16432)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/120 type tmpfs (rw,nosuid,nodev,relatime,size=396232k,mode=700,uid=120,gid=127)
gvfsd-fuse on /run/user/120/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=120,group_id=127)
192.168.0.104:/mass on /media/mass type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.0.107,local_lock=none,addr=192.168.0.104)
192.168.0.104:/mass0 on /media/mass0 type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.104,mountvers=3,mountport=47596,mountproto=udp,local_lock=none,addr=192.168.0.104)
192.168.0.104:/mass1 on /media/mass1 type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.104,mountvers=3,mountport=47596,mountproto=udp,local_lock=none,addr=192.168.0.104)
192.168.0.104:/mass2 on /media/mass2 type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.104,mountvers=3,mountport=47596,mountproto=udp,local_lock=none,addr=192.168.0.104)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=396232k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
ea@seanix:~$

Revision history for this message
ealthuis (ealthuis) said :
#7

Going over the mount output I see that mass, the one that is root owned, has a clientaddress in the mount where the others do not, that is masso,mass1,mass2, they have mountaddress.

This is also the case on the other clients

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

What are the lines in /etc/fstab related to the nfs mounts?

Revision history for this message
ealthuis (ealthuis) said :
#9

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
PARTUUID=549f3f5f-b7b6-491a-9a60-7ad9341db7ec /boot/efi vfat umask=0077 0 0
PARTUUID=31b6153e-fb32-415a-bdc4-f6a782f7cbd9 /recovery vfat umask=0077 0 0
UUID=d1aaf2de-d463-477e-af6f-edc472bac730 / ext4 noatime,errors=remount-ro 0 0
/dev/mapper/cryptswap none swap defaults 0 0
/home/users /export/users none bind 0 0
# /media/mass was on /dev/sdb4 during installation
UUID=7ac75ee5-c563-4762-9e2e-32c99a1482a8 /mass ext4 defaults 0 2
# /media/mass0 was on /dev/sdb1 during installation
UUID=62f31fb9-82cd-4109-a7f7-40ff3add85ea /mass0 ext4 defaults 0 2
# /media/mass1 was on /dev/sdc1 during installation
UUID=969edbb0-0009-4e9c-8686-b158f2d65cf1 /mass1 ext4 defaults 0 2
# /media/mass2 was on /dev/sdc3 during installation
UUID=fbafbdd1-d48a-4d15-8fab-70b756830502 /mass2 ext4 defaults 0 2
#/dev/mapper/cryptswap1 none swap sw 0 0
/home/users /export/users none bind 0 0
#add export mass to /export/mass for access by NFS
#/mass /export/mass none bind 0 0
#add export mass1 to /export/mass1 for access by NFS
#but only if needed
#/mass0 /export/mass0 none bind 0 0
#add export mass2 to /export/mass2 for access by NFS
#but only if needed
#mass1 /export/mass1 none bind 0 0
#add export mass0 to /export/mass0 for access by NFS
#mass2 /export/mass2 none bind 0 0

Revision history for this message
ealthuis (ealthuis) said :
#10

Fstab was not changed in any way since the addition of /home/users.
The problem of mass being owned by root appeared after the 28 March update to nfs-kernel-server.

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

Sorry, I was not clear enough.
What are the /etc/fstab lines for the nfs mounts in the client?
(eventually obfiscate Information that should be kept secret)

Revision history for this message
ealthuis (ealthuis) said :
#12

There have never been any mount lines in the client's /etc/fstab.
The NFS installation instructions never indicated a need for that.
Also the other partitions , mass0, mass1 and mass2 mount without problem, as the mount command shows.
Furthermore the mounting setup has been this way since I started using NFS quite a few years ago.
I have moved files that I use all the time from mass to mass0 and they can be read and written from/to mass0.
But I can not change the ownership of /media/mass from root to ea, hence the transfer of data from ea owned source to root owned target fails.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#13

Add a line in fstab for the share and you can mount as you wish, giving your user access

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

If you look at the output of the mount command from the client, you can see that the mass partition is mounted in a very much different way than the other ones (removing all identical parts):

192.168.0.104:/mass on /media/mass type nfs4 vers=4.2,
clientaddr=192.168.0.107
192.168.0.104:/mass0 on /media/mass0 type nfs vers=3,
mountaddr=192.168.0.104,mountvers=3,mountport=47596,mountproto=udp

Apparently the three working mounts are done with nfs version 3, and the not working one with version 4

There must be a difference between the definitions for mass and mass0, either on server side or on client side. I recommend that you check.

Revision history for this message
ealthuis (ealthuis) said :
#15

Stubborn me, despite the advice given did the following:
I purged NFS4 from the "server" also the nfs-common from the client. Then I reinstalled both and didi the setup of all components. Of course it did not work: This is what I found on the client:

ea@seanix:~$ tail /var/log/syslog
May 21 06:43:18 seanix systemd[1]: Finished Preprocess NFS configuration.
May 21 06:43:18 seanix sm-notify[4150]: Version 1.3.3 starting
May 21 06:43:18 seanix systemd[1]: Starting Notify NFS peers of a restart...
May 21 06:43:18 seanix systemd[1]: Starting NFS status monitor for NFSv2/3 locking....
May 21 06:43:18 seanix systemd[1]: rpc-statd-notify.service: Succeeded.
May 21 06:43:18 seanix systemd[1]: Started Notify NFS peers of a restart.
May 21 06:43:18 seanix rpc.statd[4154]: Version 1.3.3 starting
May 21 06:43:18 seanix rpc.statd[4154]: Flags: TI-RPC
May 21 06:43:18 seanix systemd[1]: Started NFS status monitor for NFSv2/3 locking..
May 21 06:43:43 seanix autonfs.sh[947]: Fileserver is down.
ea@seanix:~$

Tis indicates that nfs-common is version 2/3, whereas the Server has v4.

So how to unlock the client, I have no documentation for NFS-common, where to find that|?

Revision history for this message
ealthuis (ealthuis) said :
#16

I did find the reason and the answer, just in case somebody else runs into such a pr5oblem, there was a syntax error in /etc/exports:

a@discovery:~$ systemctl status nfs-kernel-server
? 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 2020-05-22 05:53:00 PDT; 1h 5min ago
    Process: 1015 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)
    Process: 1022 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
    Process: 1023 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)

May 22 05:53:00 discovery exportfs[1015]: exportfs: /etc/exports:6: syntax error: bad option list
May 22 05:53:00 discovery systemd[1]: Starting NFS server and services...
May 22 05:53:00 discovery systemd[1]: nfs-server.service: Control process exited, code=exited, status=1/FAILURE
May 22 05:53:00 discovery systemd[1]: nfs-server.service: Failed with result 'exit-code'.
May 22 05:53:00 discovery systemd[1]: Stopped NFS server and services.
ea@discovery:~$ sudo gedit /etc/exports
[sudo] password for ea:

corrected the error and restarted NFS:

a@discovery:~$ systemctl enable nfs-server.service
ea@discovery:~$ systemctl start nfs-server.service
ea@discovery:~$ systemctl status nfs-kernel-server
? nfs-server.service - NFS server and services
     Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
     Active: active (exited) since Fri 2020-05-22 07:03:45 PDT; 24s ago
    Process: 3938 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
    Process: 3939 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
   Main PID: 3939 (code=exited, status=0/SUCCESS)

May 22 07:03:44 discovery systemd[1]: Starting NFS server and services...
May 22 07:03:45 discovery systemd[1]: Finished NFS server and services.
ea@discovery:~$

All four partitions mounted on the clients...

Again thanks for your help