This is the third part of Linux Interview Questions and Answers series, if you go through some of our previous parts you may get an idea to prepare yourself for an interview.
Interview questions you may like to go through.
Linux Interview Questions and Answers – Part 3
Caution: The following questions are shared purely on personal, does not mean that these questions reflect the actual interview.
1. What is the command to activate VG on LVM?
When you create a volume group, by default, it is activated. Some time you may need to activate it manually to make the kernel aware of volume groups.
# vhchage -ay my_vg_name
# vgchnage -an my_vg_name
2. What is the command to activate the VG in cluster?
To activate exclusively on one node,
# vgchange -aey my_vg_name
To deactivate exclusively on one node,
# vgchange -aen my_vg_name
To activate only on the local node,
# vgchange -aly my_vg_name
To deactivate only on the local node,
# vgchange -aln my_vg_name
3. What is the command to move physical extents?
pvmove allows you to move the allocated physical extents (PEs) on SourcePhysicalVolume to one or more other physical volumes (PVs).
To move all Physical Extents that are used by simple Logical Volumes on /dev/sdb1 to free Physical Extents elsewhere in the Volume Group use:
# pvmove /dev/sdb1
Additionally, a specific destination device /dev/sdc1 can be specified like this:
# pvmove /dev/sdb1 /dev/sdc1
To perform the action only on extents belonging to the single Logical Volume lvol1 do this:
# pvmove -n lvol1 /dev/sdb1 /dev/sdc1
4. What are the services to be started for cluster?
5. What is the comand to check the status of the cluster?
6. What is quorum disk?
Quorum disk is a shared disk, that provides supplemental heuristics to determine node fitness. Cluster uses the quorum as an extra vote along with the working nodes to continue the cluster resource active on the working node. More.
7. How quorum works?
In a two-node cluster, it can use the voting algorithm. 2 nodes + quorum disk = 3 votes, so when communication is lost, one node gets 1 vote from himself and 1 from the quorum disk. That’s more than 50% of 3 votes, so the node is allowed to continue. The other node gets 1 vote from himself, but the qdiskd on that node sees the quorum disk vote has already been granted and won’t grant the extra vote again; as a result, that node has only 1 vote out of 3 and knows that it must stop cluster activity it can re-establish contact with the other node.
8. What is the command to export the NFS shares?
# exportfs -r
9. What is no_root_quash?
The option ‘no_root_squash’ basically allows the root user on the client to access/create files on the NFS server as root. Typically this is needed if you are hosting root filesystems on the NFS server (for diskless clients).
10. Command to check NFS I/O statistics?
11. How to convert Linear LV to Mirrored LV?
# lvconvert -m1 /dev/myvg/mylv
12. How to create a mirrored LV?
# lvcreate -L 50G -m1 -n mirrorlv vg0
13. What are the supported database for Redhat Satellite?
Red Hat supports PostgreSQL as an embedded database for installation, also it supports below External Databases.
PostgreSQL 8.4 or greater
Oracle Database 11g Standard and Enterprise Edition
Oracle Database 10g Release 2 Standard and Enterprise Edition
14. How to connect machine with satellite?
Please go through this article.
15. What is the command for syncing the RHN satelitte channels?
Keep in mind that the “-c” option requires the channel label, not its name. For instance, use “rhel-i386-server-5” not “Red Hat Enterprise Linux 5 i386.”
# /usr/bin/satellite-sync -c rhel-i386-server-5
16. How to start RHN satellite services?
# /usr/sbin/rhn-satellite start
17. How to force the user to change the password at next logon?
# chage -d 0 user_name
18. What is the use of activation key in rhn-satellite?
With the use of activation key, you can register, entitle, and subscribe multiple systems in a single operation. Means, when the system is registered using activation key, system gets automatically subscribed to the mapped channel.
19. what are the service required for rhn-satellite?
20. What is the purpose of task-automatic?
Taskomatic is a job scheduler which closely resembles cron. Taskomatic jobs are the “background” parts of Spacewalk which must be performed on a regular basis.
More to come, stay tuned.