Create a logical volume
Create a new logical volume as required:
Name the logical volume as database, belongs to datastore of the volume group, size is 50 PE. Expansion size of each volume in volume group datastore is 16MB.
Use ext3 to format this new logical volume, this logical volume should automatically mount to /mnt/database
Solution:
fdisk -cu /dev/vda// Create a 1G partition, modified when needed
partx –a /dev/vda
pvcreate /dev/vdax
vgcreate datastore /dev/vdax –s 16M
lvcreate– l 50 –n database datastore
mkfs.ext3 /dev/datastore/database
mkdir /mnt/database
mount /dev/datastore/database /mnt/database/ df –Th
vi /etc/fstab
/dev/datastore /database /mnt/database/ ext3 defaults 0 0 mount –a
Restart and check all the questions requirements.
Does this meet the goal?
Correct Answer:
A
Update the kernel from ftp://instructor.example.com/pub/updates. According the following requirements:
The updated kernel must exist as default kernel after rebooting the system.
The original kernel still exists and is available in the system.
Solution:
rpm -ivh kernel-firm…
rpm -ivh kernel...
Does this meet the goal?
Correct Answer:
A
Part 1 (on Node1 Server)
Task 13 [Archiving and Transferring Files & SELinux]
Create a backup file named /root/backup.tar.bz2. The backup file should contain the content of /usr/local and should be zipped with bzip2 compression format.
Furthermore, ensure SELinux is in enforcing mode. If it is not, change SELinux to enforcing mode.
Solution:
*
[root@node1 ~]# tar cvf /root/backup.tar /usr/local/
tar: Removing leading `/' from member names
/usr/local/
/usr/local/bin/
/usr/local/etc/
[root@node1 ~]# ls
backup.tar
[root@node1 ~]# file backup.tar
backup.tar: POSIX tar archive (GNU)
[root@node1 ~]# bzip2 backup.tar
[root@node1 ~]# ls
backup.tar.bz2
[root@node1 ~]# file backup.tar.bz2
backup.tar.bz2: bzip2 compressed data, block size = 900k
•
[root@node1 ~]# sestatus
SELinux status: enabled
[root@node1 ~]# cat /etc/selinux/config
SELINUX=enforcing
SELINUXTYPE=targeted
[root@node1 ~]# reboot
### For Checking ###
[root@node1 ~]# sestatus
SELinux status: enabled
Does this meet the goal?
Correct Answer:
A
Create a volume group, and set 16M as a extends. And divided a volume group containing 50 extends on volume group lv, make it as ext4 file system, and mounted automatically under /mnt/data.
Solution:
# pvcreate /dev/sda7 /dev/sda8
# vgcreate -s 16M vg1 /dev/sda7 /dev/sda8
# lvcreate -l 50 -n lvm02
# mkfs.ext4 /dev/vg1/lvm02
# blkid /dev/vg1/lv1
# vim /etc/fstab
# mkdir -p /mnt/data
UUID=xxxxxxxx /mnt/data ext4 defaults 0 0
# vim /etc/fstab
# mount -a
# mount
(Verify)
Does this meet the goal?
Correct Answer:
A
Create a Shared Directory.
Create a shared directory /home/admins, make it has the following characteristics:
/home/admins belongs to group adminuser
This directory can be read and written by members of group adminuser Any files created in /home/ admin,
group automatically set as adminuser.
Solution:
mkdir /home/admins
chgrp -R adminuser /home/admins
chmodg+w /home/admins
chmodg+s /home/admins
Does this meet the goal?
Correct Answer:
A