RedHat RHCSA8 - EX200

MeAPAC

New Member
Joined
Aug 13, 2022
Messages
2
Reaction score
2
Credits
33
Hi Friends,

RedHat - RHCSA8 - EX200

I have a doubt related to the in RHCSA8 - EX200.

I feel like both of the below 2 questions are for mounting a remote server directory using 2 different methods.

Questions are separated as Q1 (a,b,c) and Q2 (a,b,c,d,e).

Kindly refer the below 2 questions and explain me the difference between Q1 (b,c) and Q2 (b,c,d)



=====================================



*** Q1) Ensure that the network file system called /share is persistently mounted on /local-share across reboot. The NFS server servera.lab.example.com exports the /sharenetwork file system. The NFS export path is servera.lab.example.com:/share.


** a) Create the /local-share directory.

mkdir /local-share


** b) Append the appropriate entry to /etc/fstab so that the network file system available at servera.lab.example.com:/share is persistently mounted on /local-share across reboot.

echo "servera.lab.example.com:/share /local-share \nfs rw,sync 0 0" >> /etc/fstab


** c) Mount the network file system on /local-share based on the entry in /etc/fstab.

mount /local-share



=====================================



*** Q2) Configure serverb to automatically mount the home directory of the production5 user when the user logs in, using the network file system /home-directories/production5.This network file system is exported from servera.lab.example.com. Adjust the appropriate SELinux Boolean so that production5 can use the NFS-mounted home directory on serverb after authenticating via SSH key-based authentication. The production5 user's password is redhat.

** a) On serverb, use the sudo -i command to switch to the root user account.
sudo -i

** b) Install the autofs package.

yum install autofs


** c) Create the autofs master map file called /etc/auto.master.d/production5.autofs with the following content.

/- /etc/auto.production5


** d) Create the /etc/auto.production5 file with the following content.

/localhome/production5 -rw servera.lab.example.com:/home-directories/production5


** e) Restart the autofs service.

systemctl restart autofs
 


wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,502
Reaction score
6,350
Credits
26,511
G'day @MeAPAC and welcome to linux.org.

You might do a little better in an examination if you at least pay the attention to a site you join to see where is best to post a Thread on Redhat, it is certainly not General Linux.

https://www.linux.org/forums/red-hat-and-derivatives.153/

I am moving you there now.

@f33dm3bits can you take a look at this please?Thanks.

Chris Turner
wizardfromoz
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,900
Reaction score
3,526
Credits
35,667
The difference between the methods used Q1 and Q2 is that with Q1 fstab is used to mount a network share which occurs during boot. With Q2 auto-mount is being used with a home directory that is a network share and in that situation the directory is only mounted when a user accesses the directory and unmounted after not being used for a period of time.
 
Last edited:
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top