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,


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 (rw,sync,no_subtree_check,crossmnt,fsid=0)
/srv/nfs4/partition1 (rw,sync,no_subtree_check)
/srv/nfs4/partition2 (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
     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

English Edit question
Ubuntu nfs-utils Edit question
No assignee Edit question
Last query:
Last reply:
Launchpad Janitor (janitor) said : #1

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