Перейти к содержимому

Configure AutoFS To Auto Mount The File-System (NFS Share) in Linux (RHEL 7) | On Demand Mounting

Nehra Classes

0:00 / 0:00

Configure AutoFS To Auto Mount The File-System (NFS Share) in Linux (RHEL 7) | On Demand Mounting

18 626 просмотров · 6 лет назад
Nehra Classes
64,9 тыс. подписчиков
18 626 просмотров · 6 лет назад
Automount (AutoFS) NFS share using autofs in Linux: =========================================== Autofs is a service in Linux like operating system which automatically mounts the file system and remote shares when it is accessed. Main advantage of autofs is that you don’t need to mount file system at all time, file system is only mounted when it is in demand. Server Configuration (192.168.1.109): ------------------------------------------------------------ yum repolist Configure YUM in RHEL 7:    • Configure Local Yum Repository in RHEL 7 (...   yum install -y nfs* mkdir /public mkdir /private chmod 777 /public touch /public/calpublic.txt chmod 777 /private touch /private/calprivate.txt vim /etc/exports /public 192.168.1.110(ro,sync) /private 192.168.1.110(rw,sync) exportfs -arvf firewall-cmd --permanent --add-service=nfs firewall-cmd --permanent --add-service=rpc-bind firewall-cmd --permanent --add-service=mountd firewall-cmd --reload systemctl start nfs-server systemctl enable nfs-server systemctl status nfs-server systemctl start rpcbind systemctl enable rpcbind ------------------------------------------ Client Configuration (192.168.1.110): yum repolist yum install autofs -y rpm -qi autofs mkdir /automount mkdir -p /automount/private mkdir -p /automount/public vim /etc/auto.master /automount /etc/automount.txt --timeout=60 vim /etc/automount.txt public -ro,sync 192.168.1.109:/public private -rw,sync 192.168.1.109:/private systemctl start autofs systemctl enable autofs systemctl status autofs systemctl start rpcbind systemctl enable rpcbind ---------------------------------- Test AutoFS: Login on Client Machine and check the mount point details, here you won't see any NFS Share. df -hT cd /automount/ cd private Again Check the mount point details, here you will see the private NFS Share. df -hT cd .. ; cd public Again Check the mount point details, here you will see the public NFS Share. df -hT Now go inside both the directories one by one & try to create and remove some files, here you will find that only RW filesystem allows you to do that not the RO Filesystem. Now come out of NFS Shares and wait for more than one min, again \ Check the mount point details, here you won't see any NFS Share. Beacuse both NFS shares got unmounted automatically themself due to AutoFS Service. You are done. ================ Thanks for watching the video. Please like our videos, share with your friends and feel free to ask anything, post your queries in comments section. We will be glad to answer your queries. Don't forget to subscribe the channel & turn on the bell notifications. =============== Our Some Popular Videos: NAVIC:    • NAVIC: The Indian GPS | INRSS (Indian Regi...   Learn Linux Fundamentals:    • Learn Linux Fundamentals (Linux Basics) Se...   Concept of All RAID Levels:    • Session-31 | Concept of RAID & Different R...   Configure RAID-0 in Linux:    • Live Linux Training (RHCSA+RHCE) For Membe...   Configure RAID-1 in Linux:    • Live Linux Training (RHCSA+RHCE) For Membe...   Configure RAID-5 in Linux:    • Live Linux Training (RHCSA+RHCE) For Membe...   Configure RAID-6 in Linux:    • Live Linux Training (RHCSA+RHCE) For Membe...   Configure RAID-10 in Linux:    • Live Linux Training (RHCSA+RHCE) For Membe...   LVM Snapshot:    • Session-30 | Logical Volume (LVM) Snapshot...   ==================================================== Contact Us: To Follow Vikas Nehra's Twitter Handle:👇 http://bit.ly/VikasNehraTwitterHandle For Registration:👇 http://bit.ly/NehraClassesRegForm To Follow Our Twitter Handle:👇 http://bit.ly/NehraClassesTwiiterHandle To Visit Our Facebook Page:👇 www.facebook.com/nehraclasses To Follow Nehra Classes on Instagram:👇   / nehraclasses   To Our Visit Our Webpage:👇 http://bit.ly/NehraClassesWebpage Join Us on Telegram App: 👇 https://t.me/NehraClasses WhatsApp Us: 👇 https://bit.ly/2Kpqp5z Email Us:👇 Email: nehraclasses@gmail.com ============ ©COPYRIGHT. ALL RIGHTS RESERVED.