One Logical Volume named lv1 is created under vg0. The Initial Size of that Logical Volume is 100MB. Now you required the size 500MB. Make successfully the size of that Logical Volume 500M without losing any data. As well as size should be increased online.
Solution:
The LVM system organizes hard disks into Logical Volume (LV) groups. Essentially, physical hard disk partitions (or possibly RAID arrays) are set up in a bunch of equal sized chunks known as Physical Extents (PE). As there are several other concepts associated with the LVM system, let's start with some basic definitions:
Physical Volume (PV) is the standard partition that you add to the LVM mix. Normally, a physical volume is a standard primary or logical partition. It can also be a RAID array.
Physical Extent (PE) is a chunk of disk space. Every PV is divided into a number of equal sized PEs. Every PE in a LV group is the same size. Different LV groups can have different sized PEs.
Logical Extent (LE) is also a chunk of disk space. Every LE is mapped to a specific PE.
Logical Volume (LV) is composed of a group of LEs. You can mount a file system such as /home and /var on an LV.
Volume Group (VG) is composed of a group of LVs. It is the organizational group for LVM. Most of the commands that you'll use apply to a specific VG.
Verify the size of Logical Volume: lvdisplay /dev/vg0/lv1
Verify the Size on mounted directory: df -h or df -h mounted directory name
Use: lvextend -L+400M /dev/vg0/lv1
ext2online -d /dev/vg0/lv1 to bring extended size online.
Again Verify using lvdisplay and df -h command.
Does this meet the goal?
Correct Answer:
A
A YUM source has been provided in the http://instructor.example.com/pub/rhel6/dvd Configure your system and can be used normally.
Solution:
/etc/yum.repos.d/base.repo
[base]
name=base
baseurl=http://instructor.example.com/pub/rhel6/dvd
gpgcheck=0
yum list
Does this meet the goal?
Correct Answer:
A
Search a String
Find out all the columns that contains the string seismic within /usr/share/dict/words, then copy all these columns to /root/lines.tx in original order, there is no blank line, all columns must be the accurate copy of the original columns.
Solution:
grep seismic /usr/share/dict/words> /root/lines.txt
Does this meet the goal?
Correct Answer:
A
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
Find all lines in the file /usr/share/dict/words that contain the string seismic. Put a copy of all these lines in their original order in the file /root/wordlist. /root/wordlist should contain no empty lines and all lines must be exact copies of the original lines in /usr/share/dict/words.
Solution:
grep seismic /usr/share/dict/words> /root/wordlist
Does this meet the goal?
Correct Answer:
A