Red Hat RH302 - Red Hat Certified Engineer on Redhat Exam
Page: 2 / 67
Total 335 questions
Question #6 (Topic: Topic 0)
neo user tried by:
dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70
files created successfully. Again neo tried to create file having 70K using following
command:
dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70
But he is unable to create the file. Make the user can create the file less then 70K.
dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70
files created successfully. Again neo tried to create file having 70K using following
command:
dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70
But he is unable to create the file. Make the user can create the file less then 70K.
Answer: Very Tricky question from redhat. Actually question is giving scenario to you to
implement quota to neo user. You should apply the quota to neo user on /home that neo
user shouldn't occupied space more than 70K.
1. vi /etc/fstab
LABEL=/home /home ext3 defaults,usrquota 0 0
To enable the quota on filesystem you should mount the filesystem with usrquota for user
quota and grpquota for group quota.
2. touch /home/aquota.user ->Creating blank quota database file.
3. mount -o remount /home-> Remounting the /home with updated mount options.
You can verify that /home is mounted with usrquota options or not using mount command.
4. quotacheck -u /home ->Initialization the quota on /home
5. edquota -u neo /home-> Quota Policy editor
See the snapshot
Filesystem blocks soft hard inodes soft hard
/dev/mapper/vo-myvol 2 30 70 1 0 0
Can you set the hard limit 70 and soft limit as you think like 30.
Verify using the repquota /home command.
Question #7 (Topic: Topic 0)
One Logical Volume is created named as myvol under vo volume group and is mounted.
The Initial Size of that Logical Volume is 124MB. Make successfully that the size of Logical
Volume 245MB without losing any data. The size of logical volume 240MB to 255MB will be
acceptable.
The Initial Size of that Logical Volume is 124MB. Make successfully that the size of Logical
Volume 245MB without losing any data. The size of logical volume 240MB to 255MB will be
acceptable.
Answer: lvdisplay /dev/vo/myvol
lvextend -L+121M /dev/vo/myvol
resize2fs /dev/vo/myvol
lvdisplay /dev/vo/myvol
df -h
We can extend the size of logical Volume using the lvextend command. As well as to
decrease the size of Logical Volume, use the lvresize command. In LVM v2 we can extend
the size of Logical Volume without unmount as well as we can bring the actual size of
Logical Volume on online using ext2online command.
Question #8 (Topic: Topic 0)
Quota is implemented on /data but not working properly. Find out the Problem and
implement the quota to user1 to have a soft limit 60 inodes (files) and hard limit of 70
inodes (files).
implement the quota to user1 to have a soft limit 60 inodes (files) and hard limit of 70
inodes (files).
Answer: Quotas are used to limit a user's or a group of users' ability to consume disk
space. This prevents a small group of users from monopolizing disk capacity and
potentially interfering with other users or the entire system. Disk quotas are commonly used
by ISPs,by Web hosting companies, on FTP sites, and on corporate file servers to ensure
continued availability of their systems.
Without quotas, one or more users can upload files on an FTP server to the point of filling a
filesystem. Once the affected partition is full, other users are effectively denied upload
access to the disk. This is also a reason to mount different filesystem directories on
different partitions. For example, if you only had partitions for your root (/) directory and
swap space, someone uploading to your computer could fill up all of the space in your root
directory (/). Without at least a little free space in the root directory (/), your system could
become unstable or even crash.
You have two ways to set quotas for users. You can limit users by inodes or by
kilobytesized disk blocks. Every Linux file requires an inode. Therefore, you can limit users
by the number of files or by absolute space. You can set up different quotas for different
filesystems. For example, you can set different quotas for users on the /home and /tmp
directories if they are mounted on their own partitions.
Limits on disk blocks restrict the amount of disk space available to a user on your system.
Older versions of Red Hat Linux included LinuxConf, which included a graphical tool to
configure quotas. As of this writing, Red Hat no longer has a graphical quota configuration
tool. Today, you can configure quotas on RHEL only through the command line interface.
1. vi /etc/fstab/dev/hda11 /data ext3 defaults,usrquota 1 2
2. Either Reboot the System or remount the partition.
Mount -o remount /dev/hda11 /data
3. touch /data/aquota.user
4. quotacheck -ufm /data
5. quotaon -u /data
6. edquota -u user1 /
Question #9 (Topic: Topic 0)
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.
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.
Answer: 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
equalRH302 sized chunks known as Physical Extents (PE). As there are several other
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 filesystem 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.
lvdisplay /dev/vg0/lv1
df -h or df -h mounted directory name
lvextend -L+400M /dev/vg0/lv1
4. resize2fs /dev/vg0/lv1 to bring extended size online.
5. Again Verify using lvdisplay and df -h command.
Question #10 (Topic: Topic 0)
Create one partitions having size 100MB and mount it on /data.
Answer: 1. Use fdisk /dev/hda ->To create new partition.
2. Type n-> For New partitions
3. It will ask for Logical or Primary Partitions. Press l for logical.
Use the Default by pressing Enter Key.
+100M ->You can Specify either Last cylinder of Size here.
6. Press P to verify the partitions lists and remember the partitions name.
7. Press w to write on partitions table.
8. Either Reboot or use partprobe command.
9. Use mkfs -t ext3 /dev/hda?
Or
mke2fs -j /dev/hda? To create ext3 filesystem.
10. vi /etc/fstab
/dev/hda? /data ext3 defaults 1 2
mount /dev/hda? /data