Question: 1
Create a volume group, and set the size is 500M, the size of single PE is 16M. Create logical volume named lv0 in this volume group, set size is 20 PE, make it as ext3 file system, and mounted automatically under data.
A Explanation:
fdisk /dev/vda
pvcreate /dev/vda3
vgcreate --s 16M vg0 /dev/vda3
lvcreate --n lv0 --l 20 vg0
mkfs.ext3 /dev/mapper/vg0-lv0
mkdir /data
/etc/fstab:
/dev/mapper/vg0-lv0 /data ext3 defaults 0 0
mount --a
mount | grep data
Answer : A
Show Answer
Hide Answer
Question: 2
Part 1 (on Node1 Server)
Task 7 [Accessing Linux File Systems]
Find all the files owned by user natasha and redirect the output to /home/alex/files.
Find all files that are larger than 5MiB in the /etc directory and copy them to /find/largefiles.
A Explanation:
[root@node1 ~]# find / -name natasha -type f > /home/natasha/files
[root@node1 ~]# cat /home/natasha/files
/var/spool/mail/natasha
/mnt/shares/natasha
[root@node1 ~]# mkdir /find
[root@node1 ~]# find /etc -size +5M > /find/largefiles
[root@node1 ~]# cat /find/largefiles
/etc/selinux/targeted/policy/policy.31
/etc/udev/hwdb.bin
Answer : A
Show Answer
Hide Answer
Question: 3
Part 2 (on Node2 Server)
Task 6 [Implementing Advanced Storage Features]
Add a new disk to your virtual machine with a ize of 10 GiB
On this disk, create a VDO volume with a size of 50 GiB and mount it persistently on /vbread with xfs filesystem
A Explanation:
*
[root@node2 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdd 252:48 0 5G 0 disk
vde 252:64 0 10G 0 disk
[root@node2 ~]# yum install kmod-kvdo vdo
[root@node2 ~]# systemctl enable --now vdo
[root@node2 ~]# systemctl start vdo
[root@node2 ~]# systemctl status vdo
[root@node2 ~]# vdo create --name=vdo1 --device=/dev/vde --vdoLogicalSize=50G
[root@node2 ~]# vdostats --hu
Device Size Used Available Use% Space saving%
/dev/mapper/vdo1 10.0G 4.0G 6.0G 40% N/A
[root@node2 ~]# mkfs.xfs -K /dev/mapper/vdo1
*
[root@node2 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vde 252:64 0 10G 0 disk
vdo1 253:4 0 50G 0 vdo
[root@node2 ~]# mkdir /vbread
[root@node2 ~]# blkid
/dev/mapper/vdo1: UUID='1ec7a341-6051-4aed-8a2c-4d2d61833227' BLOCK_SIZE='4096' TYPE='xfs'
[root@node2 ~]# vim /etc/fstab
UUID=1ec7a341-6051-4aed-8a2c-4d2d61833227 /vbread xfs defaults,x-systemd.requires=vdo.service 0 0
[root@node2 ~]# mount /dev/mapper/vdo1 /vbread/
[root@node2 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vdo1 xfs 50G 390M 50G 1% /vbread
Answer : A
Show Answer
Hide Answer
Question: 4
You are new System Administrator and from now you are going to handle the system and your main task is Network monitoring, Backup and Restore. But you don't know the root password. Change the root password to redhat and login in default Runlevel.
A Explanation:
When you Boot the System, it starts on default Runlevel specified in /etc/inittab:
Id:?:initdefault:
When System Successfully boot, it will ask for username and password. But you don't know the root's password. To change the root password you need to boot the system into single user mode. You can pass the kernel arguments from the boot loader.
1. Restart the System.
2. You will get the boot loader GRUB screen.
3. Press a and type 1 or s for single mode ro root=LABEL=/ rhgb queit s
4. System will boot on Single User mode.
5. Use passwd command to change.
6. Press ctrl+d
Answer : A
Show Answer
Hide Answer
Question: 5
Part 1 (on Node1 Server)
Task 7 [Accessing Linux File Systems]
Find all the files owned by user natasha and redirect the output to /home/alex/files.
Find all files that are larger than 5MiB in the /etc directory and copy them to /find/largefiles.
A Explanation:
[root@node1 ~]# find / -name natasha -type f > /home/natasha/files
[root@node1 ~]# cat /home/natasha/files
/var/spool/mail/natasha
/mnt/shares/natasha
[root@node1 ~]# mkdir /find
[root@node1 ~]# find /etc -size +5M > /find/largefiles
[root@node1 ~]# cat /find/largefiles
/etc/selinux/targeted/policy/policy.31
/etc/udev/hwdb.bin
Answer : A
Show Answer
Hide Answer