How to mounting nfs file system to centos 7
Mount the file system by running following command
[root@myserver ~]# mount -t nfs 192.168.50.182:/var/nfsshare/ /nfsshare
Open the fstab
[root@myserver ~]# vi /etc/fstab
# Created by anaconda on Mon Sep 3 22:39:59 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/rhel-root / xfs defaults 0 0
UUID=9d3006f6-4a18-495a-be4a-79f1cd638744 /boot xfs defaults 0 0
/dev/mapper/rhel-home /home xfs defaults 0 0
/dev/mapper/rhel-swap swap swap defaults 0 0
[root@myserver ~]#
Add the nfs path to fstab configuration file
[root@myserver ~]# tail /etc/fstab
# Created by anaconda on Mon Sep 3 22:39:59 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/rhel-root / xfs defaults 0 0
UUID=9d3006f6-4a18-495a-be4a-79f1cd638744 /boot xfs defaults 0 0
/dev/mapper/rhel-home /home xfs defaults 0 0
/dev/mapper/rhel-swap swap swap defaults 0 0
192.168.50.182:/var/nfsshare/ /nfsshare nfs defaults 0 0
[root@myserver ~]#
Tidak ada komentar :
Posting Komentar