What is NFS Server:
Network File System, is a server-client protocol for sharing files system between computers on a common network. NFS enables you to mount a file system on a remote computer as if it were local to your own system. You can then directly access any of the files on that SSH / Telnet / remote file system. The server and client do not have to use the same operating system. The client system just needs to be running an NFS client compatible with the NFS server.
For example:
NFS server could be a Linux system and Unix could be a client. But it can’t be a window system because window is not NFS compatible. The NFS server exports one or more directories to the client systems, and the client systems mount one or more of the shared directories to local directories called mount points. After the share is mounted, all I/O operations are written back to the server, and all clients notice the change as if it occurred on the local filesystem.
A manual refresh is not needed because the client accesses the remote filesystem as if it were local.because access is granted by IP address, a username and password are not required. However, there are security risks to consider because the NFS server knows nothing about the users on the client system.
Therefore NFS System is the best System in the world . it is very easy , or very best system than windows system .
Network configuration in Linux
Now check nfs, portmap, xinetd service in system service it should be on
Now restart xinetd and portmap service
To keep on these services after reboot on then via chkconfig command
After reboot verify their status. It must be in running condition
now create a /data directory and grant full permission to it
now open /etc/exports file
share data folder for the network of 192.168.0.254/24 with read and write access
save file with :wq and exit
now restart the nfs service and also on it with chkconfig
also restart nfs daemons with expotfs
verify with showmount command that you have successfully shared data folder
When issued manually, the /usr/sbin/exportfs command allows the root user to selectively export or unexport directories without restarting the NFS service. When given the proper options, the /usr/sbin/exportfs command writes the exported file systems to /var/lib/nfs/xtab. Since rpc.mountd refers to the xtab file when deciding access privileges to a file system, changes to the list of exported file systems take effect immediately.
The following is a list of commonly used options available for /usr/sbin/exportfs:
now mount this share folder on mnt mount point. To test this share folder change directory to mnt and create a test file
After use you should always unmount from mnt mount point
In this way you can use shared folder. But this share folder will be available till system is up. It will not be available after reboot. To keep it available after reboot make its entry in fstab
create a mount point, by making a directory
now open /etc/fstab file
make entry for nfs shared directory and define /temp to mount point
save the with :wq and exit reboot the system with reboot -f command
after reboot check /temp directory it should show all the shared data
For more information:
www.linux.org/
Network File System, is a server-client protocol for sharing files system between computers on a common network. NFS enables you to mount a file system on a remote computer as if it were local to your own system. You can then directly access any of the files on that SSH / Telnet / remote file system. The server and client do not have to use the same operating system. The client system just needs to be running an NFS client compatible with the NFS server.
For example:
NFS server could be a Linux system and Unix could be a client. But it can’t be a window system because window is not NFS compatible. The NFS server exports one or more directories to the client systems, and the client systems mount one or more of the shared directories to local directories called mount points. After the share is mounted, all I/O operations are written back to the server, and all clients notice the change as if it occurred on the local filesystem.
A manual refresh is not needed because the client accesses the remote filesystem as if it were local.because access is granted by IP address, a username and password are not required. However, there are security risks to consider because the NFS server knows nothing about the users on the client system.
Therefore NFS System is the best System in the world . it is very easy , or very best system than windows system .
Network configuration in Linux
- A linux server with ip address 192.168.0.254 and hostname Server
- A linux client with ip address 192.168.0.1 and hostname Client1
- Updated /etc/hosts file on both linux system
- Running portmap and xinetd services
- Firewall should be off on server
Now check nfs, portmap, xinetd service in system service it should be on
#setup
Select System service
from list
[*]portmap [*]xinetd [*]nfs
To keep on these services after reboot on then via chkconfig command
After reboot verify their status. It must be in running condition
now create a /data directory and grant full permission to it
now open /etc/exports file
share data folder for the network of 192.168.0.254/24 with read and write access
save file with :wq and exit
now restart the nfs service and also on it with chkconfig
also restart nfs daemons with expotfs
verify with showmount command that you have successfully shared data folder
Or apply this system:
Every file system being exported to remote users via NFS, as well as the access level for those file systems, are listed in the /etc/exports file. When the nfs service starts, the /usr/sbin/exportfs command launches and reads this file, passes control to rpc.mountd (if NFSv2 or NFSv3) for the actual mounting process, then to rpc.nfsd where the file systems are then available to remote users.When issued manually, the /usr/sbin/exportfs command allows the root user to selectively export or unexport directories without restarting the NFS service. When given the proper options, the /usr/sbin/exportfs command writes the exported file systems to /var/lib/nfs/xtab. Since rpc.mountd refers to the xtab file when deciding access privileges to a file system, changes to the list of exported file systems take effect immediately.
The following is a list of commonly used options available for /usr/sbin/exportfs:
configure client system
ping form nfs server and check the share foldernow mount this share folder on mnt mount point. To test this share folder change directory to mnt and create a test file
After use you should always unmount from mnt mount point
In this way you can use shared folder. But this share folder will be available till system is up. It will not be available after reboot. To keep it available after reboot make its entry in fstab
create a mount point, by making a directory
now open /etc/fstab file
make entry for nfs shared directory and define /temp to mount point
#reboot -f
For more information:
www.linux.org/
Post a Comment