- Posts: 88
- Thank you received: 0
NFS Server & Client in FreeBSD
17 years 8 months ago #20223
by SmartDude
Share the Knowledge, make a master being a Master...
Best Regards,
SmartDude
NFS Server & Client in FreeBSD was created by SmartDude
NFS refers to Network File System and as the name suggests allows any system to share a filesystem over the network.
NFS server configuration
NFS server is the system that allows other systems to mount it's filesystem as their own. The main daemons that need to be running are nfsd, mountd and rpcbind. Nfsd daemon services request from the clients and passes the requests to the mountd daemon. Mountd carries out the requests from nfsd. Rpcbind allows nfs clients to identify the ports that any RPC based service is running
Server side
[code:1]vi /etc/rc.conf
nfs_server_enable="YES"
rpcbind_enable="YES"
mountd_flags="-r"
#if nfs client as well
nfs_client_enable="YES"[/code:1]
The filesystems to be exported are specified in /etc/exports
[code:1]vi /etc/exports
#filesystem options remotesystems
#eg
/home -maproot=0:0 192.168.0.1
/home2 -ro 192.168.0.2[/code:1]
For various options see exportfs man page
The -maproot=root flag allows the root user on the remote system to write data on the exported file system as root. If the -maproot=root flag is not specified, then even if a user has root access on the remote system, he will not be able to modify files on the exported file system.
A remote host can only be specified once per file system, and may only have one default entry. For example, assume that /usr is a single file system. The following /etc/exports would be invalid:
[code:1]# Invalid when /usr is one file system
/usr/src client
/usr/ports client[/code:1]
After changing /etc/exports reload nfsd server or mountd daemon
[code:1]# /etc/rc.d/mountd onereload[/code:1]
Starting services on nfs server
[code:1]/etc/rc.d/nfsd start
/etc/rc.d/rpcbind start
mountd -r[/code:1]
See exports
[code:1]showmount -e
showmount -e "hostname"[/code:1]
Locking
[code:1]rpc_lockd_enable="YES"
rpc_statd_enable="YES"[/code:1]
NFS server configuration
NFS server is the system that allows other systems to mount it's filesystem as their own. The main daemons that need to be running are nfsd, mountd and rpcbind. Nfsd daemon services request from the clients and passes the requests to the mountd daemon. Mountd carries out the requests from nfsd. Rpcbind allows nfs clients to identify the ports that any RPC based service is running
Server side
[code:1]vi /etc/rc.conf
nfs_server_enable="YES"
rpcbind_enable="YES"
mountd_flags="-r"
#if nfs client as well
nfs_client_enable="YES"[/code:1]
The filesystems to be exported are specified in /etc/exports
[code:1]vi /etc/exports
#filesystem options remotesystems
#eg
/home -maproot=0:0 192.168.0.1
/home2 -ro 192.168.0.2[/code:1]
For various options see exportfs man page
The -maproot=root flag allows the root user on the remote system to write data on the exported file system as root. If the -maproot=root flag is not specified, then even if a user has root access on the remote system, he will not be able to modify files on the exported file system.
A remote host can only be specified once per file system, and may only have one default entry. For example, assume that /usr is a single file system. The following /etc/exports would be invalid:
[code:1]# Invalid when /usr is one file system
/usr/src client
/usr/ports client[/code:1]
After changing /etc/exports reload nfsd server or mountd daemon
[code:1]# /etc/rc.d/mountd onereload[/code:1]
Starting services on nfs server
[code:1]/etc/rc.d/nfsd start
/etc/rc.d/rpcbind start
mountd -r[/code:1]
See exports
[code:1]showmount -e
showmount -e "hostname"[/code:1]
Locking
[code:1]rpc_lockd_enable="YES"
rpc_statd_enable="YES"[/code:1]
Share the Knowledge, make a master being a Master...
Best Regards,
SmartDude
17 years 8 months ago #20305
by SmartDude
Share the Knowledge, make a master being a Master...
Best Regards,
SmartDude
Replied by SmartDude on topic Re: NFS Server & Client in FreeBSD
I don't see any comments on my post, Did i miss something on my post friends ?
Share the Knowledge, make a master being a Master...
Best Regards,
SmartDude
Time to create page: 0.112 seconds