Red Hat RHCSA UPDATED ACTUAL
Exam Questions and CORRECT Answers
What is VDO? - CORRECT ANSWER - VDO provides inline data reduction for Linux in the
form of
deduplication
compression
thin provisioning
Installing VDO - CORRECT ANSWER - Yum install lvm2 kmod-kvdo vdo
Create your partition using fdisk.
Create physical volume.
pvcreate /dev/nvme0n3 ( run as root)
Create volume group.
Vgcreate vg1 /dev/nvme0n3
Create logical volume with ado parameters.
lvcreate —type vdo —name vdo1 —size 5gb —virtualize 50gb vg1
Create file system
mkfs.xfs -k /dev/vg1/vdo1
Create mount point for vdo
mkdir /vdo_m
vim /etc/fstab
/dev/vg1/vdo1 /vdo_m xfs defaults 0 0
mount -a
Variable - CORRECT ANSWER - Variable is nothing more than a label
It can hold some value
,var1 = 20
chmod u+x variable.sh
vim variable.sh
#!/bin/bash
var1=20
echo"the value of the variable is $var1"
echo"the value of the variable without using the dollar sign var1"
Variable - CORRECT ANSWER - vim variables1.sh
chmod u+x variable1.sh
var1 = 20
var2 = baljit
var3 = "ballot singh"
var4 = 20.4
var5 = 3+3
echo $var1
echo $var2
echo $var3
echo $var4
echo $var5
./variable1.sh
Variable - CORRECT ANSWER - vim variable3.sh
echo" the home directory of the user is $home"
echo" the default shell $shell"
chmod u+x variable3.sh
Variable - CORRECT ANSWER - vim variable4.sh
, chmod u+x variable4.sh
#!/bin/bash
echo"Enter the name of a file"
read name
touch $name
echo "File created"
Write a shell script to create two directories. The name of the directories will be passed by the
user. - CORRECT ANSWER - vim variable5.sh
chmod u+x variable5.sh
#!/bin/bash
echo" Enter the two directory names"
read dir1 dir2
mkdir $dir1 $dir2
Echo " Files created "
Write script to change the name of a file. Ask from the user, the old file name and the new file
name - CORRECT ANSWER - vim variable6.sh
chmod u+x variable6.sh
#Write script to change the name of a file. Ask from the user, the old file name and the new file
name
echo"Enter name of file"
read file1
read file2
mv $file1 $file2
echo "file name altered"
Arguments (shell scripting) - CORRECT ANSWER - chmod u+x argument.sh
Exam Questions and CORRECT Answers
What is VDO? - CORRECT ANSWER - VDO provides inline data reduction for Linux in the
form of
deduplication
compression
thin provisioning
Installing VDO - CORRECT ANSWER - Yum install lvm2 kmod-kvdo vdo
Create your partition using fdisk.
Create physical volume.
pvcreate /dev/nvme0n3 ( run as root)
Create volume group.
Vgcreate vg1 /dev/nvme0n3
Create logical volume with ado parameters.
lvcreate —type vdo —name vdo1 —size 5gb —virtualize 50gb vg1
Create file system
mkfs.xfs -k /dev/vg1/vdo1
Create mount point for vdo
mkdir /vdo_m
vim /etc/fstab
/dev/vg1/vdo1 /vdo_m xfs defaults 0 0
mount -a
Variable - CORRECT ANSWER - Variable is nothing more than a label
It can hold some value
,var1 = 20
chmod u+x variable.sh
vim variable.sh
#!/bin/bash
var1=20
echo"the value of the variable is $var1"
echo"the value of the variable without using the dollar sign var1"
Variable - CORRECT ANSWER - vim variables1.sh
chmod u+x variable1.sh
var1 = 20
var2 = baljit
var3 = "ballot singh"
var4 = 20.4
var5 = 3+3
echo $var1
echo $var2
echo $var3
echo $var4
echo $var5
./variable1.sh
Variable - CORRECT ANSWER - vim variable3.sh
echo" the home directory of the user is $home"
echo" the default shell $shell"
chmod u+x variable3.sh
Variable - CORRECT ANSWER - vim variable4.sh
, chmod u+x variable4.sh
#!/bin/bash
echo"Enter the name of a file"
read name
touch $name
echo "File created"
Write a shell script to create two directories. The name of the directories will be passed by the
user. - CORRECT ANSWER - vim variable5.sh
chmod u+x variable5.sh
#!/bin/bash
echo" Enter the two directory names"
read dir1 dir2
mkdir $dir1 $dir2
Echo " Files created "
Write script to change the name of a file. Ask from the user, the old file name and the new file
name - CORRECT ANSWER - vim variable6.sh
chmod u+x variable6.sh
#Write script to change the name of a file. Ask from the user, the old file name and the new file
name
echo"Enter name of file"
read file1
read file2
mv $file1 $file2
echo "file name altered"
Arguments (shell scripting) - CORRECT ANSWER - chmod u+x argument.sh