I am trying to add lines /etc/exports
and not quite understanding what we should replace /export with
this is what i added
/export (insecure,no_subtree_check,rw,nohide,fsid=0)
/export/rurat (insecure,no_subtree_check,rw,nohide)
this is the error i have gotten
* Exporting directories for NFS kernel daemon...
exportfs: No host name given with /export (insecure,no_subtree_check,rw,nohide,fsid=0), suggest *(insecure,no_subtree_check,rw,nohide,fsid=0) to avoid warning
exportfs: No host name given with /export/rurat (insecure,no_subtree_check,rw,nohide), suggest *(insecure,no_subtree_check,rw,nohide) to avoid warning
[ OK ]
* Starting NFS kernel daemon [ OK ]
please Help
Configure NFS Server
-
- Member
- Posts: 6
- Joined: January 9th, 2014, 7:15 pm
Re: Configure NFS Server
Well -- if I'm reading your question correctly, you need to know what to replace 'export' with. Based upon the fsid=0, you're reading NFSv4 documentation. I know Ubuntu uses v4.RuRat wrote: /export (insecure,no_subtree_check,rw,nohide,fsid=0)
/export/rurat (insecure,no_subtree_check,rw,nohide)
You can replace 'export' with whatever you'd like. There is one other issue though.
Your /etc/exports line will be set in this way:
/dir/to/export http://www.xxx.yyy.zzz [options]
So, you have your directory to export, then you can have individual IP's or a range connect to it (secure).
As far as export being anything --
Three Scenarios:
/mnt/Music <-- Sharing with everyone but on a higher port number
/home/torrents <-- Share with everyone on standard port numbers
/home/rurat <-- only available for your desktop
/var/www <-- share with only three computers
If you want everything centrally located, you can create directories in a central location (/export) and bind the two directories. I'm not sure if this is absolutely necessary for NFSv4. I have NFSv4 installed, but nothing is bound together. I believe this is considered NFSv3 conention.
Mount Bind steps:
Code: Select all
mkdir -p /export/music /expot/torrents /export/rurat /export/www
[as root]
mount --bind /mnt/music /export/music
mount --bind /home/torrents /export/torrents
mount --bind /mnt/rurat /export/rurat
mount --bind /var/www /export/www
vi /etc/fstab [as root]
Code: Select all
/mnt/music /export/music none bind 0 0
/home/torrents /export/torrents none bind 0 0
/home/rurat /export/rurat none bind 0 0
/var/www /export/www none bind 0 0
Finally, your /etc/exports
Code: Select all
/export/music 192.168.1.0/24(insecure,no_subtree_check,rw,nohide,fsid=0)
/export/torrents 192.168.1.0/24(no_subtree_check,rw,nohide,fsid=0)
/export/rurat 192.168.1.100(rw,fsid=0,no_subtree_check,sync)
/export/www 192.168.1.101(rw,fsid=0,no_subtree_check,sync) 192.168.1.102(ro,fsid=0,no_subtree_check,sync) 192.168.1.140(ro,fsid=0,no_subtree_check,sync)
And just for completeness, this is my /etc/exports. As I've said before, I believe mine is actually NFSv3 conventions even though I have NFSv4 on my server.
Code: Select all
/var/lib/mythtv/recordings *(rw,async,no_root_squash,no_subtree_check)
/var/lib/mythtv/videos *(rw,async,no_root_squash,no_subtree_check)
/var/lib/mythtv/music *(rw,async,no_root_squash,no_subtree_check)
/var/lib/mythtv/pictures *(rw,async,no_root_squash,no_subtree_check)
/mnt/tvsvr *(rw,async,no_root_squash,no_subtree_check)
/mnt/tvs *(rw,async,no_root_squash,no_subtree_check)
/mnt/transfer *(rw,async,no_root_squash,no_subtree_check)
/mnt/music *(rw,async,no_root_squash,no_subtree_check)