There is a local logical volumes in your system, named with shrink and belong to VGSRV volume group, mount to the /shrink directory. The definition of size is 320 MB.
Requirement:
Reduce the logical volume to 220 MB without any loss of data. The size is allowed between 200-260 MB after reducing.
Solution:
cd;umount /shrink
e2fsck -f /dev/mapper/vgsrv-shrink
resize2fs /dev/mapper/vgsrv-shrink 220M
lvreduce -L 220M /dev/mapper/vgsrv-shrink
mount -a
Does this meet the goal?
Correct Answer:A
Create a backup
Create a backup file named /root/backup.tar.bz2, contains the content of /usr/local, tar must use bzip2 to compress.
Solution:
cd /usr/local
tar –jcvf /root/backup.tar.bz2
mkdir /test
tar –jxvf /root/backup.tar.bz2 –C /test// Decompression to check the content is the same as the /usr/loca after If the questions require to use gzip to compress. change –j to –z.
Does this meet the goal?
Correct Answer:A
Some users home directory is shared from your system. Using showmount -e localhost command, the shared directory is not shown. Make access the shared users home directory.
Solution:
Verify the File whether Shared or not ? : cat /etc/exports
Start the nfs service: service nfs start
Start the portmap service: service portmap start
Make automatically start the nfs service on next reboot: chkconfig nfs on
Make automatically start the portmap service on next reboot: chkconfig portmap on
Verify either sharing or not: showmount -e localhost
Check that default firewall is running on system?
If running flush the iptables using iptables -F and stop the iptables service.
Does this meet the goal?
Correct Answer:A
Resize the logical volume vo and its filesystem to 290 MB. Make sure that the filesystem contents remain intact.
Note: Partitions are seldom exactly the same size requested, so a size within the range of 260 MB to 320 MiB is acceptable.
Solution:
df -hT
lvextend -L +100M /dev/vg0/vo
lvscan
xfs_growfs /home/ // home is LVM mounted directory
Note: This step is only need to do in our practice environment, you do not need to do in the real exam resize2fs /dev/vg0/vo // Use this comand to update in the real exam df -hT
OR
e2fsck -f/dev/vg0/vo
umount /home
resize2fs /dev/vg0/vo required partition capacity such as 100M lvreduce -l 100M /dev/vg0/vo mount
/dev/vg0/vo /home
df –Ht
Does this meet the goal?
Correct Answer:A
Your System is going to use as a Router for two networks. One Network is 192.168.0.0/24 and Another Network is 192.168.1.0/24. Both network's IP address has assigned. How will you forward the packets from
one network to another network?
Solution:
echo "1" >/proc/sys/net/ipv4/ip_forward
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
If you want to use the Linux System as a Router to make communication between different networks, you need enable the IP forwarding. To enable on running session just set value 1 to
/proc/sys/net/ipv4/ip_forward. As well as automatically turn on the IP forwarding features on next boot set on /etc/sysctl.conf file.
Does this meet the goal?
Correct Answer:A
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