RHCSA EX200 Latest Exam Questions with solutions -2

Photo of author
By Jay
— 4 min read
Photo of author
Written by
Photo of author
Verified by
Published On
— 4 min read

Red Hat Certified System Administrator Latest RHCSA EX200 Exam Questions with solutions based on RHELv8 and RHELv9 Part-2

EX200 RHCSA Exam Questions

This is Part 2 of the RHCSA Exam Questions and Answers. For Part 1, including the latest updated questions and answers, please refer to these wikis.

EX200 RHCSA Exam Questions with Solutions: Your Path to RHEL 9 Certification and RHCSA Exam Questions with solutions – Latest Update

 Part-2 Please perform this activity on Server-2 (serverb)

Q14. Reset root user password and make it ‘trootent’

To reset the root user password, follow these steps:

1. Press 'e' for starting system
2. Put in the last line of linux16: 'rd.break'
3. Press 'ctrl + x'
# mount -o remount,rw /sysroot
# chroot /sysroot
# passwd root
    

Enter the new password, for example, ‘trootent’

# touch /.autorelabel
# exit
# exit
    
Q15. Configure YUM Repos

Base_url = “http://content.example.com/rhel8.0/x86_64/dvd/BaseOS”
AppStrem_url = “http://content.example.com/rhel8.0/x86_64/dvd/AppStream”

# scp -r /etc/yum.repos.d/local.repo [email protected]:/etc/yum.repos.d/
# cat /etc/yum.repos.d/local.repo
[local_repo]
name=Local Repository
baseurl=http://content.example.com/rhel8.0/x86_64/dvd/BaseOS
gpgcheck=0
enabled=1

[local_appstream_repo]
name=Local AppStream Repository
baseurl=http://content.example.com/rhel8.0/x86_64/dvd/AppStream
gpgcheck=0
enabled=1

Please Note : Change the naseurl name as per already given baseurl in the RHCSA exam

Q16. Resize a Logical Volume : – Resize the logical volume “mylv” so that after reboot the size should be in between 200MB to 300MB
# df -h
# vgdisplay
# lvextend -L 300M /dev/mapper/myvg-mylv
# lvdisplay /dev/mapper/myvg-mylv
# resize2fs /dev/mapper/myvg-mylv
    
Q17. Add a swap partition of 956MB and mount it permanently.
# fdisk /dev/vdb
n (create new partition)
p (check Partition table)
Enter
+965M
t
82
w
# mkswap /dev/vdb2

		Then copy UUID

# vim /etc/fstab
UUID=XXXXX swap swap defaults 0 0
# systemctl daemon-reload
# swapon -a
# swapon -s
    
Q18. Create a logical Volume and mount it permanently

To create a logical volume and mount it permanently, follow these steps:

# fdisk /dev/vdb
n (create new partition:)
p (check Partition table)
3
Enter
+640M
w
# partprobe
# pvcreate /dev/vdb3
# vgcreate -s 32M wgroup /dev/vdb3
# lvcreate -n wshare -l 20 wgroup
# mkfs.ext3 /dev/wgroup/wshare
# mkdir /mnt/wshare
    

Then, add the following line to the /etc/fstab file:

# vi /etc/fstab
		/dev/wgroup/wshare  /mnt/wshare  ext3 defaults 0 0
# mount -a
Q19. Create a new VDO partition

To create a new VDO partition with the following requirements:

  • Use the unpartitioned disk
  • VDO name “Vdo1” and logical size should be 50GB
  • Mount it on /vdomount permanently with file system xfs.
#yum -y install vdo kmod-kvdo
#systemctl enable vdo.service
#systemctl start vdo.service
#lsblk
#vdo create –name=Vdo1 --device=/dev/vdd --vdoLogicalSize=50G
#mkfs.xfs -K /dev/mapper/Vdo1
#lsblk --output=UUID /dev/mapper/Vdo1
#mkdir /vdomount
#vi /etc/fstab (UUID=………………… /vdomount xfs defaults, x-systemd.requires=vdo.service 0 0)
#systemctl daemon-reload
    
Q20. Configure System Tuning:
  • Choose the recommended ‘tuned’ profile for your system and set it as the default.
#tuned-adm active
#tuned-adm recommend (virtual-guest)
#tuned-adm profile virtual-guest
Q21. Container
  • Create a container logserver from an image rsyslog in node1 From registry.lab.example.com
  • Configure the container with systemd services by an existing user “Walhalla”,
  • Service name should be container-logserver, and configure it to start automatically across reboot.
# useradd user1
# passwd user1
# yum module install container* -y
# ll /var/log/
# vim /etc/systemd/journald.conf
[Journal] Storage=persistent
:wq!
#mkdir /var/log/journal
#mkdir /home/wallah/container-logserver
#systemctl restart systemd-journald
# cp /var/log/journal/*/* /home/wallah/container-logserver
# chown -R wallah:wallah /home/wallah/container-logserver
# systemctl restart systemd-journald
# ll /run/log
# ll /var/log/
# su - wallah
# mkdir /var/log/journal
# mkdir /home/wallah/container-logserver
#systemctl restart systemd-journald
# reboot
# ssh [email protected]
22 System journal with containers
  • Configure your host journal to store all journal across reboot
  • Copy all *.journal from /var/log/journal and all subdirectories to /home/Walhalla/container_logserver
  • Configure automount /var/log/journal from logserver (container) to /home/walhalla/container_logserver when container starts
# podman login regisrty.redhat.io
# username:
# password:
# podman search rsyslog
# podman pull registry.redhat.io/rhel8/rsyslog
# podman image list
# podman run -d --name logserver -v /home/user1/container-logserver:/var/log/journal:Z registry.redhat.io/rhel8/rsyslog
# podman container list
# podman ps
# mkdir -p ~/.config/systemd/wallah
# cd .config/systemd/wallah/
# loginctl enable-linger
# loginctl show-user user1
# podman generate systemd --name logserver -f -n
# systemctl --user daemon-reload
# systemctl --user enable --now container-logserver.service
# systemctl --user start --now container-logserver.service
# systemctl --user status --now container-logserver.service
# podman exec -it logserver /bin/bash
# ls /var/log/
# exit

Refer The Redhat site for RHCSA Exam https://www.redhat.com/en/services/certification/rhcsa

Related Posts


About Author

Photo of author

Jay

I specialize in web development, hosting solutions, and technical support, offering a unique blend of expertise in crafting websites, troubleshooting complex server issues, and optimizing web performance. With a passion for empowering businesses and individuals online, I provide in-depth reviews, tech tutorials, and practical guides to simplify the digital landscape. My goal is to deliver clear, reliable, and insightful content that helps readers make informed decisions and enhance their online presence.

Leave a Comment