A YUM repository has been provided at http://server.domain11.example.com/pub/x86_64/Server. Configure your system to use this location as a default repository.
Solution:
vim/etc/yum.repos/base.repo
[base]
name=base
baseurl=
http://server.domain11.example.com/pub/x86_64/Server
gpgcheck=0
enable=1
Save and Exit
Use yum list for validation, the configuration is correct if list the package information. If the Yum configuration is not correct then maybe cannot answer the following questions.
Does this meet the goal?
Correct Answer:
A
Create a 2G swap partition which take effect automatically at boot-start, and it should not affect the original swap partition.
Solution:
# fdisk /dev/sda
p
(check Partition table)
n
(create new partition: press e to create extended partition, press p to create the main partition, and the extended partition is further divided into logical partitions)
Enter
+2G t
8 I
82
W
partx -a /dev/sda
partprobe
mkswap /dev/sda8
Copy UUID
swapon -a
vim /etc/fstab
UUID=XXXXX swap swap defaults 0 0
(swapon -s)
Does this meet the goal?
Correct Answer:
A
Part 1 (on Node1 Server)
Task 12 [Accessing Network-Attached Storage]
Configure autofs to automount the home directories of user remoteuserX. Note the following: utility.domain15.example.com(172.25.15.9), NFS-exports /netdir to your system, where user is remoteuserX
where X is your domain number
remoteuserX home directory is utility.domain15.example.com:/netdir/remoteuserX remoteuserX home directory should be auto mounted locally at /netdir as /netdir/remoteuserX
Home directories must be writable by their users while you are able to login as any of the remoteuserX only home directory that is accessible from your system
Solution:
*
•
[root@host ~]#systemctl enable sssd.service
[root@host ~]#systemctl start sssg.service
[root@host ~]#getent passwd remoteuser15
[root@host ~]#yum install autofs
[root@host ~]#vim /etc/auto.master.d/home9.autofs
/netdir/remoteuser15 /etc/auto.home9
[root@host ~]#vim /etc/auto.home9
remoteuser15 –rw,sync utility.network15.example.com:/netdir/remoteuser15/&
[root@host ~]#systemctl enable autofs
[root@host ~]#systemctl restart autofs
[root@host ~]#su - remoteuser15
Does this meet the goal?
Correct Answer:
A
Part 2 (on Node2 Server)
Task 4 [Managing Logical Volumes]
Resize the logical volume, lvrz and reduce filesystem to 4600 MiB. Make sure the the filesystem contents remain intact with mount point /datarz
(Note: partitions are seldom exactly the size requested, so anything within the range of 4200MiB to 4900MiB is acceptable)
Solution:
*
[root@node2 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdb 252:16 0 5G 0 disk
vdb1 252:17 0 4.2G 0 part
vgrz-lvrz 253:2 0 4.1G 0 lvm /datarz
vdc 252:32 0 5G 0 disk
vdc1 252:33 0 4.4G 0 part
datavg-datalv 253:3 0 3.9G 0 lvm /data
vdd 252:48 0 5G 0 disk
vde 252:64 0 10G 0 disk
[root@node2 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lvrz vgrz -wi-ao---- 4.10g
[root@node2 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
vgrz 1 1 0 wz--n- <4>[root@node2 ~]# parted /dev/vdb print
Number Start End Size Type File system Flags
1 1049kB 4456MB 4455MB primary lvm
*
[root@node2 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vgrz-lvrz ext4 4.0G 17M 3.8G 1% /datarz
[root@node2 ~]# parted /dev/vdb mkpart primary 4456MiB 5100MiB
[root@node2 ~]# parted /dev/vdb set 2 lvm on
[root@node2 ~]# udevadm settle
[root@node2 ~]# pvcreate /dev/vdb2
Physical volume "/dev/vdb2" successfully created.
*
[root@node2 ~]# vgextend vgrz /dev/vdb2
Volume group "vgrz" successfully extended
[root@node2 ~]# lvextend -r -L 4600M /dev/vgrz/lvrz
Size of logical volume vgrz/lvrz changed from 4.10 GiB (1050 extents) to 4.49 GiB (1150 extents).
Logical volume vgrz/lvrz successfully resized.
[root@node2 ~]# resize2fs /dev/vgrz/lvrz
[root@node2 ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vgrz-lvrz ext4 4.4G 17M 4.2G 1% /datarz
Does this meet the goal?
Correct Answer:
A
Part 1 (on Node1 Server)
Task 5 [Controlling Access to Files with ACLs]
Copy the file /etc/fstab to /var/tmp. Configure the following permissions on /var/tmp/fstab.
The file /var/tmp/fstab is owned by root user
The file /var/tmp/fstab is belongs to the root group
The file /var/tmp/fstab should be executable by anyone
The user harry is able to read and write on /var/tmp/fstab
The user natasha can neither read or write on /var/tmp/fstab
All other users (Current or future) have the ability to read /var/tmp/fstab
Solution:
*
[root@node1 ~]# cp -p /etc/fstab /var/tmp/
[root@node1 ~]# ls -lrt /etc/fstab
[root@node1 ~]# ls -lrt /var/tmp/fstab
[root@node1 ~]# chmod a+x /var/tmp/fstab
[root@node1 ~]# getfacl /var/tmp/fstab
[root@node1 ~]# setfacl -m u:harry:rw- /var/tmp/fstab
[root@node1 ~]# setfacl -m u:natasha:--- /var/tmp/fstab
[root@node1 ~]# getfacl /var/tmp/fstab
getfacl: Removing leading '/' from absolute path names
# file: var/tmp/fstab
# owner: root
# group: root
user::rwx
user:harry:rw-
user:natasha:---
group::r-x
mask::rwx
other::r-x
*
[root@node1 ~]# su - natasha
[natasha@node1 ~]$ cat /var/tmp/fstab
cat: /var/tmp/fstab: Permission denied
Does this meet the goal?
Correct Answer:
A