Mandriva small NFS server

by
Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0Pinterest0StumbleUpon0Digg

Network File System (NFS) is a network file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a network in a manner similar to how local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system. The Network File System is an open standard defined in RFCs, allowing anyone to implement the protocol.

lets   begin  to  intall  nfs  sercer on mandriva   (192.168.1.108)

First  install  the  packages  via  urpmi

 

urpmi nfs-server

Make  a  share   directory  like   /mandriva  and  give  ownership  for  nobody user  and  nogroup group

chown nobody:nogroup  /mandriva

 

Now  add  to  /etc/export the   the  directory  and  access  permission  like

 

/mandriva          192.168.1.101(rw,sync,no_root_squash,no_subtree_check)

this mean that this directory is just reachable from this ip , to make it reacerable from all mahines, remove the IP adress

After this you have to restart the nfs server



and don't forget to allow NFS services in the firewall



check nfs if ready with

[root@localhost ~]# rpcinfo  -p
program vers proto   port  service
100000    4   tcp    111  portmapper
100000    3   tcp    111  portmapper
100000    2   tcp    111  portmapper
100000    4   udp    111  portmapper
100000    3   udp    111  portmapper
100000    2   udp    111  portmapper

lets back to the Client is My Fedora 14

First make sure that nfs-cilent install on your system , andmake the mount direcotoy for nfs like /nfs-mandriva

mkdir /nfs-mandriva 


mount the nfs server to this diorectory


mount 192.168.1.108:/mandriva /nfs-mandriva

now check the file system now you can see that




[root@localhost ~]# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup-lv_root
35737240   5988816  27933080  18% /
tmpfs                  3062656      1308   3061348   1% /dev/shm
/dev/sda6               495844     68034    402210  15% /boot
/dev/mapper/VolGroup-lv_home
30060596   1665956  26867652   6% /home
/dev/sda3            512020476 309441248 202579228  61% /media/New Volume
/dev/sda5            307220476  49932848 257287628  17% /media/New Volume_
192.168.1.108:/mandriva 10776192   2342656   7886080  23% /nfs-mandriva


Check the directory files

[pirat9@localhost ~]$ ls -ltr  /nfs-mandriva/
total 4
-rw-r--r-- 1 root root 40 Dec 30  2010 sharefile

you can try with gui way




to add this partitton permanently to the /etc/fstab

192.168.1.108:/mandriva  /nfs-mandriva  nfs      rw,sync,hard,intr  0     0


save and exit reboot

Enjoy







For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0Pinterest0StumbleUpon0Digg