Hey, thank you. I would recommend using the dropping directory instead. /etc/auto.master.d/ with individual configurations per master mapping file. This helps with segmentation which helps with maintenance, automation, etc.
Thank you for an excellent guide! Initially i couldn't get it working, but then I realized that I didn't have nfs-common (nfs-utils) installed. After installing that and mounting manually at first, all went well.
There is something extremely magical about the "in-direct" type: data is only present when we access it intentionally, otherwise we just see an empty directory.
Nice question! I will try my best to answer it. In general, you would use a direct map when you have a small number of resources to mount and a clear idea of where you want each resource to be mounted to (like a CDROM drive going to /mycd). You would use an indirect map when you have many resources and you want to organize their mount points under a central directory dynamically (like account subdirectories in /home). With indirect maps, you benefit from being able to use wildcard features to mount more remote locations that follow a pattern, without having to specify it directly in the configuration file. I hope that helps. Thanks for coming to the channel.
@@rpgworldofficial4693there is no hard rule about which one to do, it is up to your best judgement which one will solve the problem in the most straightforward way. I cannot speak to which is better for the exam but I can tell you that red hat evaluates whether the problem was addressed, the particular method is not the primary scoring factor. I hope that helps you 👍
Hey, thanks a lot for the video... I follow up the steps exactly same but fails on the indirect map.... the wired thing is dir "/mnt/nfs/" exits, but "fun" sub-dir is gone after mounting... any idea which step is wrong?
Hi, sorry you had that issue. When you say the indirect map failed, do you mean the autofs service wouldn't start or is the issue more to do with accessing the share in the filesystem? If it is the second case, have you tried directly changing your directory into /mnt/nfs/fun? The automounter creates the directories on demand so you may not always see them. Please let me know if that helped or if we need to dig deeper.
Hi there, hoping I understood correctly. NFS doesn't use usernames and passwords for authentication but it does support kerberos though. SMB/CIFS remote file shares do use usernames and passwords and in autofs you would specify them in the mount options like "username=myuser,password=thepassword". Maybe I can revisit the topic of autofs in the future since it seems to gather interest.
This is actually an awful video for someone learning this, just keep it simple. Use the material from whatever booked you used and simply translate it without adding too much
hi, I'm trying to use autofs to mount automatically a folder path /mnt/sdb2 to a partition /dev/sdb2 (which is formatted by ext4), but it doesn't work so far. Could you please review my way is correct or not? # vi /etc/auto.master /mnt/sdb2 /ect/auto.sdb2 # vi /etc/auto.sdb2 sdb2 -fstype=ext4 :/dev/sdb2 # systemctl restart auto fs I've checked with cmd 'df' but it doesn't show any item 'sdb2'. And when I created a file test inside the /mnt/sdb2, it shows error "Permission denied" Did I do it wrong?
Hi, thanks for asking! What you have shown will work, but not in the way you might expect. If you want the mapping to mount, you would need to attempt to access or write a file in the /mnt/sdb2/sdb2/ directory. This is because you have sdb2 written twice in your auto.master and auto.sdb2. Then it will show up in df and will last until the mapping automatically expires and unmounts again (which takes a few minutes of inactivity). The permission denied error means you were were in the special automounter directory instead of where the device actually got mounted at which is in /mnt/sdb2/sdb2 Another way to handle an indirect mapping in the /mnt directory would be like the following: _In /etc/auto.master_ /mnt /etc/auto.mnt _In /etc/auto.mnt_ sdb1 -fstype=xfs :/dev/sdb1 sdb2 -fstype=ext4 :/dev/sdb2 Restart autofs and then attempt to access the /mnt/sdb2 directory and it will work. I hope this helps you, take care.
@@beanologi thank you so much, you've helped me a lot. I asked ChatGPT that how to mount and it instruct me an above solution in my comment. That is definitely a wrong way :))
Hey, thank you. I would recommend using the dropping directory instead. /etc/auto.master.d/ with individual configurations per master mapping file. This helps with segmentation which helps with maintenance, automation, etc.
Absolutely, great point! I will pin your comment so more folks can be informed about that.
Thank you for an excellent guide! Initially i couldn't get it working, but then I realized that I didn't have nfs-common (nfs-utils) installed. After installing that and mounting manually at first, all went well.
There is something extremely magical about the "in-direct" type: data is only present when we access it intentionally, otherwise we just see an empty directory.
Very handy, thank you!
Interesting, maybe someday it will come handy. Subbed.
Awesome, thanks for your support!
Hi. Are u doing this on the server or client or both ?
Hi, could you plz make a small video on mounting the user's home directory on the remote host with autofs and then change user password.
Hi, I will add that to my list of planned videos. Thanks for your suggestion
I am requesting if you could !! Plz thanks
@@mohammadwaqas7070 ruclips.net/video/0Q8QDWyioE8/видео.html
Can you explain when I should do a direct and indirect map?
Nice question! I will try my best to answer it. In general, you would use a direct map when you have a small number of resources to mount and a clear idea of where you want each resource to be mounted to (like a CDROM drive going to /mycd). You would use an indirect map when you have many resources and you want to organize their mount points under a central directory dynamically (like account subdirectories in /home). With indirect maps, you benefit from being able to use wildcard features to mount more remote locations that follow a pattern, without having to specify it directly in the configuration file. I hope that helps. Thanks for coming to the channel.
for the exam tho, you should config the export dir as indirect , right?@@beanologi
@@rpgworldofficial4693there is no hard rule about which one to do, it is up to your best judgement which one will solve the problem in the most straightforward way. I cannot speak to which is better for the exam but I can tell you that red hat evaluates whether the problem was addressed, the particular method is not the primary scoring factor. I hope that helps you 👍
Thank you!
Best. Thanks
You are awesome!!!
Thanks! You are awesome too!! 😎
Hey, thanks a lot for the video... I follow up the steps exactly same but fails on the indirect map.... the wired thing is dir "/mnt/nfs/" exits, but "fun" sub-dir is gone after mounting... any idea which step is wrong?
Hi, sorry you had that issue. When you say the indirect map failed, do you mean the autofs service wouldn't start or is the issue more to do with accessing the share in the filesystem? If it is the second case, have you tried directly changing your directory into /mnt/nfs/fun? The automounter creates the directories on demand so you may not always see them. Please let me know if that helped or if we need to dig deeper.
@@beanologi Hi Thanks for replying... I figure it out... all good now!
Hi, can you do a tutorial to explain how to configure autofs to automount a remote directory with user and password?
Hi there, hoping I understood correctly. NFS doesn't use usernames and passwords for authentication but it does support kerberos though. SMB/CIFS remote file shares do use usernames and passwords and in autofs you would specify them in the mount options like "username=myuser,password=thepassword". Maybe I can revisit the topic of autofs in the future since it seems to gather interest.
You did a great job of explaining but I still absolutely hate autofs.
whoever decided this needed to be on the exam......
This is actually an awful video for someone learning this, just keep it simple. Use the material from whatever booked you used and simply translate it without adding too much
hi, I'm trying to use autofs to mount automatically a folder path /mnt/sdb2 to a partition /dev/sdb2 (which is formatted by ext4), but it doesn't work so far. Could you please review my way is correct or not?
# vi /etc/auto.master
/mnt/sdb2 /ect/auto.sdb2
# vi /etc/auto.sdb2
sdb2 -fstype=ext4 :/dev/sdb2
# systemctl restart auto fs
I've checked with cmd 'df' but it doesn't show any item 'sdb2'.
And when I created a file test inside the /mnt/sdb2, it shows error "Permission denied"
Did I do it wrong?
Hi, thanks for asking! What you have shown will work, but not in the way you might expect. If you want the mapping to mount, you would need to attempt to access or write a file in the /mnt/sdb2/sdb2/ directory. This is because you have sdb2 written twice in your auto.master and auto.sdb2. Then it will show up in df and will last until the mapping automatically expires and unmounts again (which takes a few minutes of inactivity).
The permission denied error means you were were in the special automounter directory instead of where the device actually got mounted at which is in /mnt/sdb2/sdb2
Another way to handle an indirect mapping in the /mnt directory would be like the following:
_In /etc/auto.master_
/mnt /etc/auto.mnt
_In /etc/auto.mnt_
sdb1 -fstype=xfs :/dev/sdb1
sdb2 -fstype=ext4 :/dev/sdb2
Restart autofs and then attempt to access the /mnt/sdb2 directory and it will work.
I hope this helps you, take care.
@@beanologi thank you so much, you've helped me a lot. I asked ChatGPT that how to mount and it instruct me an above solution in my comment. That is definitely a wrong way :))
@@davidnth cool, you’re welcome!