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

  Рет қаралды 16,364

Nehra Classes

Nehra Classes

Күн бұрын

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 Re...
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 ...
Learn Linux Fundamentals:
• Learn Linux Fundamenta...
Concept of All RAID Levels:
• Session-31 | Concept o...
Configure RAID-0 in Linux:
• Live Linux Training (R...
Configure RAID-1 in Linux:
• Live Linux Training (R...
Configure RAID-5 in Linux:
• Live Linux Training (R...
Configure RAID-6 in Linux:
• Live Linux Training (R...
Configure RAID-10 in Linux:
• Live Linux Training (R...
LVM Snapshot:
• Session-30 | Logical V...
====================================================
Contact Us:
To Follow Vikas Nehra's Twitter Handle:👇
bit.ly/VikasNeh...
For Registration:👇
bit.ly/NehraCla...
To Follow Our Twitter Handle:👇
bit.ly/NehraCla...
To Visit Our Facebook Page:👇
nehraclasses
To Follow Nehra Classes on Instagram:👇
/ nehraclasses
To Our Visit Our Webpage:👇
bit.ly/NehraCla...
Join Us on Telegram App: 👇
t.me/NehraClasses
WhatsApp Us: 👇
bit.ly/2Kpqp5z
Email Us:👇
Email: nehraclasses@gmail.com
============
©COPYRIGHT. ALL RIGHTS RESERVED.

Пікірлер: 45
@iHKG0
@iHKG0 3 жыл бұрын
This is by far the clearest explanation of autofs, thank you. Really helpful for preparing for RHSA exam.
@NehraClasses
@NehraClasses 3 жыл бұрын
Thank you 🙏
@handsomevillian
@handsomevillian Жыл бұрын
sir your method of teaching quite simple and to the point
@ravigoodsongs4352
@ravigoodsongs4352 2 жыл бұрын
Excellent thank you for the explanation. Till the time I have lot of doubts about how the storage volumes getting shared. Great explanation, now I have cleared my doubts and got clear picture.
@NehraClasses
@NehraClasses 2 жыл бұрын
Glad it was helpful!
@MrSurfing4ever
@MrSurfing4ever 10 ай бұрын
Optimal explanation, thank you so much !!!
@handsomevillian
@handsomevillian Жыл бұрын
thank you sir its quite helpfull and simple to understand ... love and respect form ❤❤
@lilylawer
@lilylawer 3 жыл бұрын
Great Concept, welcome back as normal from crona
@grgnickdaily
@grgnickdaily 4 жыл бұрын
the video is really nice.. thanks for uploading
@NehraClasses
@NehraClasses 4 жыл бұрын
Thanks a lot 🙏
@paramveersingh5122
@paramveersingh5122 3 жыл бұрын
count=2 you've helped in two pracs now
@NehraClasses
@NehraClasses 3 жыл бұрын
Thanks
@praveen6155
@praveen6155 2 жыл бұрын
good sir on efforts
@mostafabanaei2832
@mostafabanaei2832 2 жыл бұрын
You are the best and thanks a lot for this video
@NehraClasses
@NehraClasses 2 жыл бұрын
Thank You
@vaibhavrajnathchauhan5340
@vaibhavrajnathchauhan5340 4 жыл бұрын
thank you sir for this video
@kasturisudarshan56
@kasturisudarshan56 3 жыл бұрын
Well Explained
@pradeepjha1245
@pradeepjha1245 3 жыл бұрын
Thanq sir
@ravindraveeradhi3100
@ravindraveeradhi3100 3 жыл бұрын
Could you please explain nfs daemons in a separate video..anyway the way you explained is very good
@NehraClasses
@NehraClasses 3 жыл бұрын
Thanks, will upload soon
@matruprasadsahoo231
@matruprasadsahoo231 3 жыл бұрын
Very interesting session... Thank you
@ashweenijadhav3998
@ashweenijadhav3998 3 жыл бұрын
Helpful
@NehraClasses
@NehraClasses 3 жыл бұрын
Thanks
@ravigoodsongs4352
@ravigoodsongs4352 2 жыл бұрын
If it is NAS or SAN volume by using NFS protocol we can share the mount point and can access from Client machines where Autofs installed is that correct. Please clarify.
@rohitkodali5415
@rohitkodali5415 3 жыл бұрын
Really useful session. BUT I want to know How to create a user and group in NFS and operate in client location . CAN you please explain how to do it
@rohitkodali5415
@rohitkodali5415 3 жыл бұрын
can you share a link if it is available or can you reply how to do and what are the commands
@NehraClasses
@NehraClasses 3 жыл бұрын
kzbin.info/www/bejne/kICXdayIl5Jogas
@rohitkodali5415
@rohitkodali5415 3 жыл бұрын
sir I already saw these link .I want to share the user using NFS not with LDAP. Is there anything like that ?
@ShankarEarapolu
@ShankarEarapolu 3 ай бұрын
how to list all autofs mount points in command line
@NehraClasses
@NehraClasses 3 ай бұрын
cat /etc/auto.master
@bhim960
@bhim960 Жыл бұрын
In the client machine when I am running mkdir -p /automount/public ; mkdir -p /automount/private I am getting permission denied error . Nehra Sir can u help ,me on this issue
@UnknownSend3r
@UnknownSend3r 3 жыл бұрын
In both auto.master and automount.txt you didn't specify the -fstype=nfs so how does it have nfsV4 in the 'df -h' output, how did it know that it was an NFS filesystem. Thanks for making the video btw, helped alot..
@NehraClasses
@NehraClasses 3 жыл бұрын
That's because, I have installed all the required packages for NFS4. There is no rocket science in it, you can follow the same steps and verify the same. If you face any issues, feel free to ask me. Thanks
@UnknownSend3r
@UnknownSend3r 3 жыл бұрын
@@NehraClasses thanks appreciate it. And I know NFS4 comes with rpcbind unlike nfs3, I just wanted to know if in NFS4, when you're mounting either in fstab or with the mount command, do you no longer need to specify the fstype (NFS) And also did you include NFS in your firewall or is that not needed aswell, thanks in advance.
@nitinpatel7960
@nitinpatel7960 3 жыл бұрын
hello sir... after complete client said process my public and private folder not show
@nitinpatel7960
@nitinpatel7960 3 жыл бұрын
and no create file and folder in /automount folder
@NehraClasses
@NehraClasses 3 жыл бұрын
Please provide us more details in telegram channel
@shaikmansoorali
@shaikmansoorali Жыл бұрын
How to give access to n number of clients in nfs server with out entering client ip in export file
@NehraClasses
@NehraClasses Жыл бұрын
You can define the entire subnet there or you can mention * for all the machines.
@AmandeepSingh-dr7bd
@AmandeepSingh-dr7bd 4 жыл бұрын
please make depth tutorial on zabbix server and client side configuration, thanks
@NehraClasses
@NehraClasses 4 жыл бұрын
Sure, please give me some time. I will try to upload video next week.🙏
@AmandeepSingh-dr7bd
@AmandeepSingh-dr7bd 4 жыл бұрын
@@NehraClasses Sure Sir, Thanks
@NehraClasses
@NehraClasses 4 жыл бұрын
Please watch the video, here it is. kzbin.info/www/bejne/mJy7kqR5fseGmK8
@samirgozalov4797
@samirgozalov4797 Жыл бұрын
systemctl enable autofs --now (one command to start and enable autofs)
@NehraClasses
@NehraClasses Жыл бұрын
We have already explained all this stuff in our RHCSA playlist.
Linux File Permissions in 5 Minutes | MUST Know!
6:03
Travis Media
Рет қаралды 70 М.
АЗАРТНИК 4 |СЕЗОН 1 Серия
40:47
Inter Production
Рет қаралды 1,2 МЛН
configure Autofs or Automounter in rhel8.
15:10
Linux R
Рет қаралды 6 М.
Linux Crash Course - The /etc/fstab file
30:29
Learn Linux TV
Рет қаралды 104 М.
Using AutoFS - RHCSA v9 Review
9:36
beanologi
Рет қаралды 9 М.
How to Install and Configure an NFS Linux Server and Client
32:08
Akamai Developer
Рет қаралды 44 М.
Linux File System Explained!
5:16
ByteByteGo
Рет қаралды 186 М.
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 4,1 МЛН
How to Set Up an NFS Server on Ubuntu (Complete with AutoFS!)
36:30
Learn Linux TV
Рет қаралды 57 М.