vmware / photon

Minimal Linux container host
https://vmware.github.io/photon
Other
3.01k stars 700 forks source link

NFS server on photon OS #843

Open CondormanFr opened 5 years ago

CondormanFr commented 5 years ago

I didn't find how to setup and start a NFS server on photon OS. (to allow remote computer to mount a photon os local folder)

Nfs-client is working well but I can't find how to setup an NFS server.

Thanks

dbarkelew commented 5 years ago

This is what I did for a quick little lab that needed a nfs server.

  1. Install nfs utils. "tdnf install -y nfs-utils"
  2. edit the file /etc/exports and added what I wanted to export my case was "/opt/sfw/ *(rw,sync,no_root_squash,subtree_check)"
  3. exportfs -ra
  4. systemctl start nfs-server.service

I probably didn't need to run the exportfs command since the server service wasn't running yet.

VFrontDe commented 5 years ago

I tried exactly this and for me the service startup fails with the message "A dependency job for nfs-server.service failed. See 'journalctl -xe' for details."

journalctl further reveals this: -- Unit rpc-statd.service has begun starting up. Aug 13 08:30:44 xxx mount[3987]: mount: /var/lib/nfs/rpc_pipefs: unknown filesystem type 'rpc_pipefs'. Aug 13 08:30:44 xxx systemd[1]: var-lib-nfs-rpc_pipefs.mount: Mount process exited, code=exited status=32 Aug 13 08:30:44 xxx systemd[1]: var-lib-nfs-rpc_pipefs.mount: Failed with result 'exit-code'. Aug 13 08:30:44 xxx systemd[1]: Failed to mount RPC Pipe File System. -- Subject: Unit var-lib-nfs-rpc_pipefs.mount has failed

This is Photon 3.0 with the latest updates.

suezzelur commented 5 years ago

Are you able to manually mount mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs

VFrontDe commented 5 years ago

No. However, this issue was resolved by rebooting the machine. Looks like some earlier dependency was needed, but not automatically executed.