1. On Server
If the folder is not existing, make directory like below.
$mkdir -p /VIS/backup
2. Check the rpms intalled for NFS services, if not installe the rpms required below.
[root@visap13 ~]# rpm -qa nfs*
nfs-utils-lib-1.0.8-7.6.el5
nfs-utils-1.0.9-50.el5
[root@visap13 ~]#
[root@visap13 ~]# rpm -qa portmap*
portmap-4.0-65.2.2.1
[root@visap13 ~]#
[root@visap13 ~]# rpm -qa xinetd*
xinetd-2.3.14-10.el5
[root@visap13 ~]#
3. edit the /etc/exports as below.
/VIS/backup 192.168.1.1(rw,sync)
Note: the ip should be client ip here.
4. Start portmap service.
[root@visap13 ~]# service portmap start
Starting portmap: [ OK ]
5. Restart NFS
[root@visap13 ~]# service nfs restart
Shutting down NFS mountd: [FAILED]
Shutting down NFS daemon: [FAILED]
Shutting down NFS quotas: [FAILED]
Shutting down NFS services: [FAILED]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
If the folder is not existing, make directory like below.
$mkdir -p /VIS/backup
2. Check the rpms intalled for NFS services, if not installe the rpms required below.
[root@visap13 ~]# rpm -qa nfs*
nfs-utils-lib-1.0.8-7.6.el5
nfs-utils-1.0.9-50.el5
[root@visap13 ~]#
[root@visap13 ~]# rpm -qa portmap*
portmap-4.0-65.2.2.1
[root@visap13 ~]#
[root@visap13 ~]# rpm -qa xinetd*
xinetd-2.3.14-10.el5
[root@visap13 ~]#
/VIS/backup 192.168.1.1(rw,sync)
Note: the ip should be client ip here.
4. Start portmap service.
[root@visap13 ~]# service portmap start
Starting portmap: [ OK ]
[root@visap13 ~]# service nfs restart
Shutting down NFS mountd: [FAILED]
Shutting down NFS daemon: [FAILED]
Shutting down NFS quotas: [FAILED]
Shutting down NFS services: [FAILED]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
On Client.
1. Make the directory for shared folder.
[root@visap13 ~]#mkdir -p /VIS/backup
Note: In this case I am using the names of the folder as same, here we can give any name for the folders.
2. Change the owner of the folder.
[root@visap13 ~]#chown 777 /VIS/backup
3. Mount the folder.
[root@visap13 ~]# mount -t nfs 192.168.1.1:/VIS/backup/ /VIS/backup
[root@visap13 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 355G 299G 38G 89% /
/dev/sda1 99M 13M 82M 14% /boot
tmpfs 3.9G 0 3.9G 0% /dev/shm
10.176.112.249:/VIS/backup/
896G 461G 390G 55% /VIS/backup
[root@visap13 ~]# cd /VIS/backup/
5. Edit /etc/fstab
For auto mount.
[root@visap13 ~]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
### added for USB floppy Automount
/dev/sda /mnt/floppy1 auto noauto,owner, 0 0
10.176.112.249:/VIS/backup/ /VIS/backup nfs defaults 0 0
#10.176.112.249:/VIS/backup/ /VIS/backup nfs user,rw,noauto 0 0
For mount manually everytime when required.
[root@visap13 ~]# cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda3 swap swap defaults 0 0
### added for USB floppy Automount
/dev/sda /mnt/floppy1 auto noauto,owner, 0 0
#192.168.1.1:/VIS/backup/ /VIS/backup nfs defaults 0 0
192.168.1.1:/VIS/backup/ /VIS/backup nfs user,rw,noauto 0 0
No comments:
Post a Comment