test 3 Flashcards

1
Q

Configure NFS service on rhcsa3 and share /rh_share3
with rhcsa4. Configure AutoFS direct map on rhcsa4 to mount
/rh_share3 on /mnt/rh_share4. User user80 (create on both systems)
should be able to create files under the share on the NFS server as
well as under the mount point on the NFS client

A

dnf install nfs-utils
mkdir /common
chmod 777 /common
firewall-cmd –permanent –add-service nfs
firewall-cmd –reload
systemctl –now enable nfs-server
exportfs -av
or
exportfs -u sever10:/common

on client
mkdir /local
mount server20:/common /local
fstab:
server20:/common /local nfs _netdev 0 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Task 08: On rhcsa3, create VDO volume called vdo1 on the 4GB
disk with logical size 16GB and mounted with Ext4 structures on
/mnt/vdo1

A

systemctl status vdo
vdo create –name vdo 1 –device /dev/sdf –vdoLogicalSize 16G

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Task 10: Configure NFS service on rhcsa4 and share the home
directory for user60 (create user60 on both systems) with rhcsa3.
Configure AutoFS indirect map on rhcsa3 to automatically mount the
home directory under /nfsdir when user60 logs on to rhcsa3

A

Server10:
dnf install autofs
edit /etc/auto.misc with:
autoindir server20:/common
systemctl enable –now autofs
Server20:
edit /etc/exports:
/home server10(rw)
sudo exportfs -avr
dnf install autofs - enable service
mkdir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Task 11: On rhcsa4, create Stratis pool pool1 and volume str1 on a
1GB disk and mount it to /mnt/str1.

A

stratis pool create pool1 /dev/sd1
startis filesystem create pool1 str1
fstab
UUID=”;LAKDJF” /mnt xfs x-systemd.requires=stratisd.service 0 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Task 12: On rhcsa4, expand Stratis pool pool1 using the other 1GB
disk. Confirm that /mnt/str1 sees the storage expansion.

A

stratis pool add-data pool1 /dev/sd2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

setgid on directory

A

chmod g+s /testdata

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

sticky bit on a directory

A

chmod g+t /testdata

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

ask 14: On rhcsa3, create directory /var/dir1 with full permissions
for everyone. Disallow non-owners to remove files. Test by creating
file /var/dir1/stkfile1 as user60 and removing it as user80

A

chmod o+t /var/dir1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Search all man pages and redirect to file

A

man -k searchitem
man -k password > file.txt
man -k xfs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Task 17: On rhcsa3, install module postgresql version 9.6 (select a
different non-default version if 9.6 is not available).

A

dnf module list
dnf module info postgresql
dnf module install postgresql

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Task 19: On rhcsa3, set SELinux type shadow_t on a new file
testfile1 in /usr and ensure that the context is not affected by a
SELinux relabeling.

A

chcon -vu user_u -t shadow_t /usr/newfile -R
semanage fcontext
restorecon -R -v /usr/newfile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Task 22: On rhcsa3, launch a named container as user60 with host
port 10000 mapped to container port 80. Employ the latest version of
the ubi7 image. Configure a systemd service to auto-start the
container without the need for user60 to log in. Validate port mapping
using an appropriate podman subcommand.

A

mkdir ~/.config/systemd/user -p
podman run -dp 10000:80 –name container_name ubi8
podman generate systemd –new –name container_name > ~/.config/systemd/user/container_name.service
podman stop container_name
podman rm container_name
systemctl –user daemon-reload
systemctl –user enable –now conatiner_name.service
loginctl enable-linger
systemctl –user restart container_name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Task 23: On rhcsa3, launch another named container as user60 with
/host_data01 mapped to /container_data01, one variable
ENVIRON=Exam, and host port 1050 mapped to container port
1050. Use the latest version of the ubi8 image. Configure a separate
systemd service to auto-start the container without the need for
user60 to log in. Create a file under the shared directory and validate
data persistence. Verify port mapping and variable settings using
appropriate podman subcommands

A

podman run -it -e ENVIRON=Exam -p 1050:1050 -v /host_data01:/container_data01:Z –name container_name ubi8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly