You are not logged in.

#1 2017-06-11 01:18:26

mattseaton
Member
Registered: 2017-04-17
Posts: 12

[Solved] Cannot start nfs-server.service with unionfs share

I'm trying to mount a unionfs fused folder as an NFS mount point, but it won't let me.

Here's my /etc/exports:

/home/htpc/Videos	192.168.1.198(rw,no_root_squash,no_subtree_check)
[htpc@MediaServer ~]$ systemctl start nfs-server
Failed to start nfs-server.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status nfs-server.service' for details.
[htpc@MediaServer ~]$ sudo systemctl start nfs-server
[sudo] password for htpc: 
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.
[htpc@MediaServer ~]$ systemctl status nfs-server
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2017-06-10 21:16:49 EDT; 8s ago
  Process: 1460 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)

Jun 10 21:16:49 MediaServer systemd[1]: Starting NFS server and services...
Jun 10 21:16:49 MediaServer exportfs[1460]: exportfs: Failed to stat /home/htpc/Videos: Permission denied
Jun 10 21:16:49 MediaServer systemd[1]: nfs-server.service: Control process exited, code=exited status=1
Jun 10 21:16:49 MediaServer systemd[1]: Failed to start NFS server and services.
Jun 10 21:16:49 MediaServer systemd[1]: nfs-server.service: Unit entered failed state.
Jun 10 21:16:49 MediaServer systemd[1]: nfs-server.service: Failed with result 'exit-code'.
[htpc@MediaServer ~]$ journalctl -xe
-- 
-- Unit rpc-statd-notify.service has begun starting up.
Jun 10 21:16:49 MediaServer sm-notify[1462]: Version 2.1.1 starting
Jun 10 21:16:49 MediaServer sm-notify[1462]: Already notifying clients; Exiting!
Jun 10 21:16:49 MediaServer rpc.mountd[1457]: Caught signal 15, un-registering and exiting.
Jun 10 21:16:49 MediaServer systemd[1]: Stopped NFS Mount Daemon.
-- Subject: Unit nfs-mountd.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nfs-mountd.service has finished shutting down.
Jun 10 21:16:49 MediaServer sudo[1452]: pam_unix(sudo:session): session closed for user root
Jun 10 21:16:49 MediaServer systemd[1]: Started Notify NFS peers of a restart.
-- Subject: Unit rpc-statd-notify.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit rpc-statd-notify.service has finished starting up.
-- 
-- The start-up result is done.
Jun 10 21:16:49 MediaServer systemd[1]: Stopped NFSv4 ID-name mapping service.
-- Subject: Unit nfs-idmapd.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nfs-idmapd.service has finished shutting down.

Any help?

Last edited by mattseaton (2017-06-11 16:36:29)

Offline

#2 2017-06-11 01:56:55

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Cannot start nfs-server.service with unionfs share

The error message is pretty clear... What are the perms on that directory?




Moving to NC.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-06-11 02:03:51

mattseaton
Member
Registered: 2017-04-17
Posts: 12

Re: [Solved] Cannot start nfs-server.service with unionfs share

[htpc@MediaServer ~]$ ls -l
total 8
drwxr-xr-x 7 htpc wheel 4096 Jun 10 20:09 Downloads
drwxrwxrwx 1 htpc wheel 4096 Jun 10 20:42 Videos

It is owned by my account and everything in it is owned by my account.  I don't see why it matters though.  Root should be able to NFS mount anything it wants, no?

I successfully mounted the individual directories, so it looks like it's a problem combining unionfs and nfs.  Does anyone know how to do this successfully?  I read people on other forums saying that it is possible to do, but they didn't mention any problems.

Last edited by mattseaton (2017-06-11 02:11:56)

Offline

#4 2017-06-11 16:34:57

mattseaton
Member
Registered: 2017-04-17
Posts: 12

Re: [Solved] Cannot start nfs-server.service with unionfs share

I think I have solved the issue.  exportfs will not work on a unionfs mount point unless you have an fsid specified.  I added the option fsid=42 to /etc/exports and exportfs and the nfs service start without issue now.

Offline

Board footer

Powered by FluxBB