NFS
(Network file share)
Description:-
The network file system is surtaintly one of the most widly
use network services.
NFS is run on the basis pf RPC (remote processor call).if allow
the client to auto mount & There for transperntaly access the
remote file system on the network. It is used to share disk or
folder one linux system to another linux system.
Server side :-
- Package nfs*
- Service nfs
- Port listen 2049
- Config file /etc/exports
Cleint side :-
Showmount –e
<server ip> to search
exports list
Fstab &
autofstab file system
mount in boths
/data *.example.com
(rw) or 192.168.0.0/255.255.255.0
(note: put entry in fstab or in autofstab to share data directory)
Server side
configuration
- Yum install nfs* -y (to install nfs pkgs by yum command)
- Mkdir /nfsshare (to create directory)
- Vim /etc/exports (make an entry share files)
/nfsshare *.example.com (rw,sync) or
/nfsshare 192.168.0.0/255.255.255.0 (rw,sync)
- Save & exit.
- Service nfs restart
- Chkconfig nfs on
- Cd /nfsshare (change working directory)
- Touch datafile (in /nfsshare create datafile using touch command)
- Chmod 777 –R /datafile (set full permission access to datafile)
- Showmount –e (by this command to check exports list)
Client side configuration
1.Auto mount method:-
- Mkdir –p /nfs/nfsdata (to create a mount piont)
- Yum install autofs* -y (require pkgs install)
- Vim /etc/auto.master
/misc /etc/auto.misc
/nfs /etc/auto.misc
- Save & exit.
- Vim /etc/fstab
/nfsdata -fstype=nfs desktop12.example.com:/nfsshare
- Save & exit
- Service autofs stop
- Service autofs start
- Service autofs reload
Reloading maps ……………
2. fstab
method
* Mkdir /data1
create a mount point
directory
* vim /etc/fstab
(make these entry)
192.168.0.12:/nfsshare
/data1 nfs defaults 00
* save &
exit.
* mount –a
(mount a directory)
No comments:
Post a Comment