D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] systemd and NFS shares

 

On 01/09/2021 10:28, Julian Hall wrote:
On 01/09/2021 10:12, Julian Hall wrote:
On 31/08/2021 20:57, Michael Everitt wrote:
On 31/08/2021 20:38, Julian Hall wrote:
On 29/08/2021 17:47, comrade meowski wrote:
On 29/08/2021 17:03, Julian Hall wrote:

Rebooted nothing mounted, as you said it's on /access/. So I went to the mount point media/julian/DEMETER to access it, and it's empty - shouldn't that mount as
I /am/ accessing it, and then show me the files?
That's right - what's your exact line from fstab?
192.168.1.3:/volume1/DEMETER    /media/julian/DEMETER   nfs
_netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=10,timeo=14,x-systemd.idle-timeout=1min
0 0
Can you manually force the mount with:

sudo mount /media/julian/DEMETER
ls -alh /media/julian/DEMETER
Mounts but permission denied to list files unless I use sudo
Check that remote-fs.target is active:

systemctl status remote-fs.target
julian@Cerce:~$ sudo systemctl status remote-fs.target
[sudo] password for julian:
● remote-fs.target - Remote File Systems
    Loaded: loaded (/lib/systemd/system/remote-fs.target; enabled; vendor preset:
    Active: active since Tue 2021-08-31 20:17:25 BST; 8min ago
      Docs: man:systemd.special(7)

Aug 31 20:17:25 Cerce systemd[1]: Reached target Remote File Systems.
lines 1-6/6 (END)
If I remember rightly - no offence -
none taken :)
your NAS is a bit of a piece of crap. Do we need to specify NFSv3 perhaps, or some
other esoteric option?
Synology DS216j. NFS in use is v3 but unknown if we need to specify it. One forum claimed 'sudo systemctl daemon-reload && systemctl start documents.automount' works where 'documents' was the mount point so given mine is nested I tried 'sudo systemctl daemon-reload && systemctl start media/julian/DEMETER.automount' which didn't work either - no error messages just no change in behaviour. In a nutshell the fstab tells it what to mount and where and systemd allegedly tells it to automount the share, and it knows that now, but won't automount and manually
mounting it won't let me view the files.

Julian

These days NFS will start at the highest available/working version (ie 4) and work
downwards. I had to specify for some time nfsvers=3 on my shares.

It also sounds like you have a permissions issue .. either with the folder you're
mounting to (yes, this happens!) and/or authentication to the NAS.

mount -vvv <etc> may splatter you with some extra debug info. to figure out what's going wrong where ... (theoretically) .. but since meowski knows systemdee I'll let
him tackle that side of things. Me, I prefer manual control :D

sudo mount -vvv - after manually mounting the share (I initially ran it before mounting the share) with 'sudo mount /media/julian/DEMETER' - gave me the following additional line;

192.168.1.3:/volume1/DEMETER on /media/julian/DEMETER type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=14,retrans=2,sec=sys,mountaddr=192.168.1.3,mountvers=3,mountport=892,mountproto=udp,local_lock=none,addr=192.168.1.3,_netdev)

Given that it does say vers=3 I'll try adding that option to the fstab and report back. I think you're right about permissions though.

Julian

nfsvers=3 added to mount options in fstab with no change. fstab line now reads:

192.168.1.3:/volume1/DEMETER    /media/julian/DEMETER   nfs nfsvers=3,_netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=10,timeo=14,x-systemd.idle-timeout=1min 0 0

Is the mount timeout too short or the idle timeout?

If it is a permissions issue should I chmod the shares to the current user?

Julian

As a test I commented out that line and tried '192.168.1.3:/volume1/DEMETER    /DEMETER   nfs x-systemd.automount   0   0' after creating DEMETER in the root. No change, still insists I use sudo to access the directory, so back to fstab line in last email.

Julian

--
“The great tragedy of Science — the slaying of a beautiful hypothesis by an ugly 
fact.”

― Thomas Henry Huxley


--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dcglug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq