You are not logged in.

#1 2022-07-04 19:07:11

turbochamp
Member
Registered: 2021-11-05
Posts: 23

Confused on how to export external USB drives as NFS shares

I followed the wiki to the best of my ability, but I can't seem to get this going. I have multiple USB drives that I use for a media server (all is working without NFS), and I'd like to set them up as NFS shares. Steps I've done:

- Drives already mounted in /etc/fstab
- mkdir -p /srv/nfs/mydrive /mnt/mydrive
- mount --bind /mnt/mydrive /srv/nfs/mydrive

- Edit /etc/exports and added "/srv/nfs/mydrive   192.168.4.52(rw,sync,subtree_check,fsid=0)"
- exportfs -arv
- systemctl restart nfs-server.service

When I first ran exports -arv I got "exportfs: /mnt/mydrive does not support NFS export", it is a ext4 formatted.

Then I ran systemctl restart nfs-server.service again and it seemed to crash the drive.

For the client I mounted with "mount 192.168.4.52:/ /mnt/mydrive".

So I'm not totally sure what I'm doing wrong.

Last edited by turbochamp (2022-07-04 19:11:52)

Offline

#2 2022-07-04 20:49:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,556

Re: Confused on how to export external USB drives as NFS shares

Try adding crossmnt to the export options - also start w/ no_subtree_check and enable the check when things work.
Don't forget to re-export after editing the exports

Offline

Board footer

Powered by FluxBB