EX200 Exam QuestionsBrowse all questions from this exam

EX200 Exam - Question 58


SIMULATION -

/data Directory is shared from the server1.example.com server. Mount the shared directory that:

Show Answer
Correct Answer:

To mount a shared directory from server1.example.com permanently and ensure it survives reboots, you can use autofs. Here’s how to do it: 1. vi /etc/auto.master Add the following line: /mnt /etc/auto.misc --timeout=50 2. vi /etc/auto.misc Add the following line for the data mount: data -rw,soft,intr server1.example.com:/data 3. Restart the autofs service and enable it to start on boot: service autofs restart chkconfig autofs on This configuration will ensure that the shared directory from server1.example.com is automatically mounted when accessed and unmounted after 50 seconds of inactivity. The /etc/auto.master is the master configuration file for autofs service, and it reads the mount points as defined in /etc/auto.master when the service starts.

Discussion

6 comments
Sign in to comment
adolfoale
Jan 17, 2021

In RHEL8 and because de request is not with autofs, we can proceed in this way: # mount server1.example.com server:/data /mnt

kitkat
Jun 22, 2022

One rule for the exam is that all changes we are making should survive reboot. Which is why autofs would be a good option.

kitkat
Jun 29, 2022

yum -y install nfs-utils showmount -e server1 mkdir -p /mnt/data sudo mount -t nfs server1.example.com:/data /mnt/data echo 'server1.example.com:/data /mnt/data nfs defaults 0 0' >> /etc/fstab

sugisho
Jul 17, 2021

mount server1.example.com:/data /mnt

sugisho
Jul 17, 2021

Is it should install cif-utils,or nfs-utils?

kysj
Mar 7, 2022

At server1: # yum install -y nfs-utils # systemctl enable --now nfs-server # echo “/data server2(rw)” >> /etc/exports # exportfs -av At server2: #mount -o rw,sync server1.example.com:/data /mnt #df -h /mnt

kenkct
Mar 10, 2022

Server1 assume /data already share from server1.example.com, otherwise #echo '/data *(rw)' >> /etc/exports #exportfs -a Server2 #systemctl enable --now nfs-server #mkdir /mnt/shared #mount -t nfs server1.example.com:/data mnt/shared