Difference between revisions of "Software projects/OS/Slackware/Advanced usage/NFS"

From Pandora Wiki
Jump to: navigation, search
(Created page with "= NFS = * NFS is the most impressive *NIX networked file server. Accessing a file over the network is as fast as you've had it on your local drive. * The standard configuration i...")
 
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
= Server side =
 
= Server side =
 
* Let's say the IP adress of the server is 10.0.0.250, and the IP of the client is 10.0.0.5 .
 
* Let's say the IP adress of the server is 10.0.0.250, and the IP of the client is 10.0.0.5 .
* I already secured the connections. To know how, just look /etc/hosts.deny .
+
* I already secured the default SL4P connections. To know how, just look /etc/hosts.deny .
 
* So you have to allow hosts or networks. Do do this, edit /etc/hosts.allow .
 
* So you have to allow hosts or networks. Do do this, edit /etc/hosts.allow .
 
* Now you have to set up your exports. Edit /etc/exports . Be really careful here, because:
 
* Now you have to set up your exports. Edit /etc/exports . Be really careful here, because:
/home/lswat/videos 10.0.0.5(sync,ro)
+
/home/lswat/videos 10.0.0.5(sync,ro)
 
will work, but
 
will work, but
/home/lswat/videos 10.0.0.5 (sync,ro)
+
/home/lswat/videos 10.0.0.5 (sync,ro)
 
will not work. See the space ?
 
will not work. See the space ?
  
Line 32: Line 32:
 
You may have to specify the file system type:
 
You may have to specify the file system type:
 
  mount -t nfs 10.0.0.250:/home/lswat/videos /mnt/nfs/video-killed-the-radio-star
 
  mount -t nfs 10.0.0.250:/home/lswat/videos /mnt/nfs/video-killed-the-radio-star
 +
 +
[[Category:Network]]
 +
[[Category:Slackware]]
 +
[[Category:System]]

Latest revision as of 13:14, 6 May 2012

NFS

  • NFS is the most impressive *NIX networked file server. Accessing a file over the network is as fast as you've had it on your local drive.
  • The standard configuration is pretty simple.
  • If you plan to use it on a bloated network, use tcp connections instead of udp.
  • By default, NFS protocol IS NOT ENCRYPTED. It was designed for LAN. There are methods to use it over internet but i won't describe them here. SSHFS may also be considered instead.

Server side

  • Let's say the IP adress of the server is 10.0.0.250, and the IP of the client is 10.0.0.5 .
  • I already secured the default SL4P connections. To know how, just look /etc/hosts.deny .
  • So you have to allow hosts or networks. Do do this, edit /etc/hosts.allow .
  • Now you have to set up your exports. Edit /etc/exports . Be really careful here, because:
/home/lswat/videos 10.0.0.5(sync,ro)

will work, but

/home/lswat/videos 10.0.0.5 (sync,ro)

will not work. See the space ?

  • And finally activate and run the port mapper:
chmod +x /etc/rc.d/rc.rpc
/etc/rc.d/rc.rpc start

then the NFS server

chmod +x /etc/rc.d/rc.nfsd
/etc/rc.d/rc.nfsd start
  • Those changes are now permanent, so the NFS server will work at next restart.

Client side

  • Create a mount point, ie.:
mkdir -p /mnt/nfs/video-killed-the-radio-star
  • And mount:
mount 10.0.0.250:/home/lswat/videos /mnt/nfs/video-killed-the-radio-star

You may have to specify the file system type:

mount -t nfs 10.0.0.250:/home/lswat/videos /mnt/nfs/video-killed-the-radio-star