NFS share doesn't work after reboot

Asked by devynu on 2021-01-08

Ubuntu 20.04.01
(Using non-root account for login)

Below explain how did i set-up it prior say about problem,

NFS-Server

1. sudo mkdir -p /srv/nfs4/partition1 and sudo mkdir -p /srv/nfs4/partition2 (Create the export filesystem)

2. sudo mount --bind /media/user/disk1 /srv/nfs4/partition1 and sudo mount --bind /media/user/disk2 /srv/nfs4/partition2

3. sudo nano /etc/fstab
/media/user/disk1 /srv/nfs4/partition1 none bind 0 0
/media/user/disk2 /srv/nfs4/partition2 none bind 0 0

4. sudo nano /etc/exports
/srv/nfs4 192.168.8.15 (rw,sync,no_subtree_check,crossmnt,fsid=0)
/srv/nfs4/partition1 192.168.8.15 (rw,sync,no_subtree_check)
/srv/nfs4/partition2 192.168.8.15 (rw,sync,no_subtree_check)

5. sudo exportfs -ra

I configured the client as necessary and it's working.
(I also tested about start/ stop NFS server using systemctl restart nfs-kernel-server and still working.

also, Now if go to /srv/nfs4/ in **server and open certain folder then we can see those partitions files then i dont go to explain about how did i configured the client.

The problem,
After that, restart NFS server machine, "nfs-kernel-server" start automatically

sudo systemctl status nfs-kernel-server
● nfs-server.service - NFS server and services
     Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor pr>
    Drop-In: /run/systemd/generator/nfs-server.service.d
             └─order-with-mounts.conf
     Active: active (exited) since Thu 2021-01-09 02:11:57 WIB; 7min ago
    Process: 6085 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUC>
    Process: 6086 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, statu>
   Main PID: 6086 (code=exited, status=0/SUCCESS)

But NFS shares doesn't work, even if i opened folders in /srv/nfs4 directory in server, empty

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu nfs-utils Edit question
Assignee:
No assignee Edit question
Last query:
2021-01-08
Last reply:
2021-01-24
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.