Quantcast
Channel: Sameer Shaik. B.E,M.S,M.B.A,P.M.P,C.S.M
Viewing all articles
Browse latest Browse all 191

Create a new local NFS mount

$
0
0

Below I will creating a new NFS file system named /nfs


[oracle@collabn1 ~]$ df -Ph
Filesystem                       Size  Used Avail Use% Mounted on
/dev/mapper/vg_collabn1-lv_root   31G   20G   11G  66% /
tmpfs                            1.8G  758M  1.1G  43% /dev/shm
/dev/sda1                        477M   66M  382M  15% /boot
stage                            465G  280G  186G  61% /media/sf_stage
/dev/asm/shared-162              1.0G   79M  946M   8% /shared


[root@collabn1 ~]# cd /


[root@collabn1 /]# mkdir localfs nfs


Add the below lines in the fstab

[root@collabn1 ~]# vi /etc/fstab

# create an NFS mount on nfs which points back to localfs
localhost:/localfs /nfs nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,noac

Add the below line to the exports file

[root@collabn1 ~]# cat /etc/exports
/nfs *(rw,no_root_squash,sync)

stop/start the nfs service:

[root@collabn1 /]# chkconfig nfs on

[root@collabn1 /]# service nfs stop
Shutting down NFS daemon:                                  [  OK  ]
Shutting down NFS mountd:                                  [  OK  ]
Shutting down NFS quotas:                                  [  OK  ]
Shutting down NFS services:                                [  OK  ]
Shutting down RPC idmapd:                                  [  OK  ]

[root@collabn1 /]# service nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting RPC idmapd:                                       [  OK  ]


[root@collabn1 /]# mount /nfs

[root@collabn1 /]# df -Ph
Filesystem                       Size  Used Avail Use% Mounted on
/dev/mapper/vg_collabn1-lv_root   31G   20G   11G  66% /
tmpfs                            1.8G  758M  1.1G  43% /dev/shm
/dev/sda1                        477M   66M  382M  15% /boot
stage                            465G  280G  186G  61% /media/sf_stage
/dev/asm/shared-162              1.0G   79M  946M   8% /shared
localhost:/localfs                31G   20G   11G  66% /nfs

huray….. /nfs is mounted and available for use.

 [root@collabn1 /]# ls -ld /nfs
drwxr-xr-x 2 root root 4096 Sep 12 18:49 /nfs
 
[root@collabn1 /]# chown oracle:dba /nfs
 
[root@collabn1 /]# ls -ld /nfs
drwxr-xr-x 2 oracle dba 4096 Sep 12 18:49 /nfs


[oracle@collabn1 nfs]$ pwd
/nfs
 
[oracle@collabn1 nfs]$ mkdir test
 
[oracle@collabn1 nfs]$ ls -lrt
total 4
drwxr-xr-x 2 oracle oinstall 4096 Sep 12 18:59 test

 


Viewing all articles
Browse latest Browse all 191

Trending Articles