LVM- Linux Interview Questions

Share It!

This article is all about Linux interview questions.In this article i have mentioned only LVM related interviews questions.It will be helpful for all those students who wants to start their career in Linux Field as a Linux System Admin. This article will help you to explore lvm little more and indepth.I have tried my best to include all LVM related interview question in this single article.If you are already a system admin I request you to post LVM related questions in comment section if any question left.

LVM Interview Question

Ques #1 Is it possible to increase the logical volume on fly?

Ans: Yes.We can increase the logical volume without umount it.

Ques #2 How to scan disks for existing volume group?

Ans: Use “vgscan” to scan existing volume group.

Ques #3 How to scan a logical volume from exising volume group?

Ans: Use “lvscan” to scan existing logical volume.

Ques #4 How to deactivate the logical volume?

Ans: “lvchange -an /dev/vg_name/lv_name”

Ques #5 How to activated the logical volume which is already in deactivated state?

Ans: “lvchange -ay /dev/vg_name/lv_name”

Ques #6 How to deactivate the volume group?

Ans: ”vgchange -an volume_group_name”

Ques #7 How to activated the volume group which is already in deactivated state?

Ans: ”vgchange -ay volume_group_name”

Ques #8 How to see the detailed volume group information?

Ans: “vgdisplay  vg_name”

Ques #9 How to see the detailed logical volume information?

Ans: “lvdisplay  /dev/vg_name/lv_name”

Ques #10 How to take a LVM configuration backup?

Ans: “vgcfgbackup vg_name”

Note: The default volume group backup location is “/etc/lvm/backup”.

Ques #11 What is lvmdump?

Ans: “lvmdump” is tool for LVM2 to collect the various information for diagnostic purposes.By default, it creates a tarball suitable for submission along with a problem report

Ques #12 How do you find that what are the disks are used for logical volume mirroring?

Ans: “lvs -a -o +devices”

Ques #13 Why is LVM is required?

Ans: LVM stands for Logical Volume Manager , to resize filesystem’s size online we required LVM partition in Linux. Size of LVM partition can be extended and reduced using the lvextend & lvreduce commands respectively.

Ques #14 How are snapshots in LVM2 different from LVM1 in Redhat Linux?

Ans: LVM1 snapshots are  readonly by default where LVM2 snapshots were read/write.

Ques #15 How to remove a disk from a volume group?

Ans: "vgreduce vg_name device_name"

Ques #16 Which command is used to extend a logical volume?

Ans: "lvextend --size + device_name

Ques #17 What is LVM snapshot?

Ans: LVM snapshots allow the administrator to create a new block device which presents an exact copy of a logical volume, frozen at some point in time.

Ques #18 What is the difference between LVM and RAID?

Ans: A RAID device is a physical grouping of disk devices in order to create a logical presentation of one device whereas LVM is a logical layer that that can be manipulated in order to create and, or expand a logical presentation of a disk device to an OS.

Ques #19 How many volume groups can be created in Linux?

Ans: 256

Ques #20 How to re-create the device files for LVM volumes?

Ans: Run “vgmknodes” to recreate the LVM devices files.

Enjoy it!

No Responses

Leave a Reply

Your email address will not be published.