Sunday, March 26, 2017

RHEL7 - NFS server/client set up

[root@bishal ~]# vi /etc/exports
[root@bishal ~]# exportfs -r
[root@bishal ~]# exportfs
/opt/app1       <world>
[root@bishal ~]# cat /etc/exports
/opt/app1       *(rw,sync)
[root@bishal ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2017-03-26 08:09:11 EDT; 3h 55min ago
 Main PID: 897 (firewalld)
   CGroup: /system.slice/firewalld.service
           └─897 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

Mar 26 08:07:57 bishal.expanor.local systemd[1]: Starting firewalld - dynamic firewall.....
Mar 26 08:09:11 bishal.expanor.local systemd[1]: Started firewalld - dynamic firewall ...n.
Hint: Some lines were ellipsized, use -l to show in full.
[root@bishal ~]# systemctl stop firewalld
[root@bishal ~]# pwd
/root
[root@bishal ~]# cd /opt/app1
[root@bishal app1]# ls
beautiful  is  life
[root@bishal app1]# mkdir prema bishal pradip
[root@bishal app1]# ls -ld /opt/app1
drwxr-xr-x. 8 root root 80 Mar 26 12:06 /opt/app1
[root@bishal app1]# chmod 777 /opt/app1
[root@bishal app1]# ls
beautiful  bishal  is  life  pradip  prema  test
[root@bishal app1]#



go to client

[root@makku ~]# showmount -e 192.168.10.6
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
[root@makku ~]# mkdir /opt/app1
[root@makku ~]# mount 192.168.10.6:/opt/app1 /opt/app1

^C
[root@makku ~]# mount 192.168.10.6:/opt/app1 /opt/app1
[root@makku ~]# df -h /opt/app1
Filesystem              Size  Used Avail Use% Mounted on
192.168.10.6:/opt/app1 1014M   32M  982M   4% /opt/app1
[root@makku ~]# cd /opt/app1
[root@makku app1]# ls
beautiful  is  life
[root@makku app1]# pwd
/opt/app1
[root@makku app1]# ls
beautiful  bishal  is  life  pradip  prema
[root@makku app1]# mkdir test
mkdir: cannot create directory ‘test’: Permission denied
[root@makku app1]# mkdir test
[root@makku app1]#


No comments:

Post a Comment