You are not logged in.

#1 2012-05-10 16:47:17

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,616
Website

systemd and nfs exports [solved]

I recently switched my server over to systemd and now I cannot connect to the NFS share that it is exporting.

Here is the entry in the /etc/fstab on the server:

/dev/sdb1 /media/media 	ext4	defaults,noatime	0	1
/media/media /nfs4exports/media none	rw,bind	0	0

Here is the /etc/systemd/system/media-media.mount :

[Unit]
Description=media
Wants=network.target rpc-statd.service
After=network.target rpc-statd.service

[Mount]
What=/media/media
Where=/nfs4exports/media
Type=nfs
StandardOutput=syslog
StandardError=syslog

When I connect it from my workstation, the mount command just hangs:

# mount -t nfs mars:/media  /media/media

Help smile

Last edited by graysky (2012-05-10 17:01:08)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2012-05-10 17:02:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,616
Website

Re: systemd and nfs exports [solved]

The solution is NOT to create this file at all.  Apparently, exports from the server do not require them.  If I remove it and reboot the server, I am able to connect from my workstation with no issues.  For reference:

$ ls -l /etc/systemd/system/multi-user.target.wants/
total 0
lrwxrwxrwx 1 root root 40 May 10 10:58 cpupower.service -> /usr/lib/systemd/system/cpupower.service
lrwxrwxrwx 1 root root 38 May 10 10:58 cronie.service -> /usr/lib/systemd/system/cronie.service
lrwxrwxrwx 1 root root 40 May 10 12:10 exportfs.service -> /usr/lib/systemd/system/exportfs.service
lrwxrwxrwx 1 root root 42 May 10 10:59 lm_sensors.service -> /usr/lib/systemd/system/lm_sensors.service
lrwxrwxrwx 1 root root 35 Apr 30 15:15 network.service -> /etc/systemd/system/network.service
lrwxrwxrwx 1 root root 36 May 10 10:59 ntpd.service -> /usr/lib/systemd/system/ntpd.service
lrwxrwxrwx 1 root root 36 May 10 11:33 rc-local.service -> /etc/systemd/system/rc-local.service
lrwxrwxrwx 1 root root 40 May  2 22:37 remote-fs.target -> /usr/lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 39 May 10 10:58 rpcbind.service -> /usr/lib/systemd/system/rpcbind.service
lrwxrwxrwx 1 root root 42 May 10 12:10 rpc-mountd.service -> /usr/lib/systemd/system/rpc-mountd.service
lrwxrwxrwx 1 root root 41 May 10 12:10 rpc-statd.service -> /usr/lib/systemd/system/rpc-statd.service
lrwxrwxrwx 1 root root 43 May 10 10:58 sshdgenkeys.service -> /usr/lib/systemd/system/sshdgenkeys.service
lrwxrwxrwx 1 root root 36 May 10 10:58 sshd.service -> /usr/lib/systemd/system/sshd.service
lrwxrwxrwx 1 root root 41 May 10 11:06 syslog-ng.service -> /usr/lib/systemd/system/syslog-ng.service
lrwxrwxrwx 1 root root 35 May 10 10:57 ufw.service -> /usr/lib/systemd/system/ufw.service

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB