Monday, September 28, 2015

LVM Q & A Page - 1

LVM   INTERVIEW QUESTIONS AND ANSWERS

PAGE - 1

1..Why we need  partition?

Most people have a vague knowledge of what partitions are, since every operating system has the ability to create or remove them. It may seem strange that Linux uses more than one partition on the same disk, even when using the standard installation procedure, so some explanation is called for.
One of the goals of having different partitions is to achieve higher data security in case of disaster. By dividing the hard disk in partitions, data can be grouped and separated. When an accident occurs, only the data in the partition that got the hit will be damaged, while the data on the other partitions will most likely survive.
2..What do you mean by LVM?

Logical Volume Manager(LVM ) allows administrators the flexibility to create logical disks that can be expanded dynamically as more disk space is required.
3..How to add the more space in linux?

Adding more disk space for Linux is easy, at least after the hardware has been properly installed . You format it if necessary, then create the partitions. and file system as described above, and add the proper lines to /etc/fstab so that it is mounted automatically
4..How to save the  disk space?
To avoid installing unnecessary programs, Linux distributions have an option to install only part of the packages they contain. Compression programs such as gzip or zip will compress  individual files or groups of files.

Most modern file systems will allow you to specify the block size. The block size is chunk size that the file system will use to read and write data.

5..How to manage the logical volume with LVM?

To create logical volumes and share these as block devices. To implement LVMs, we should create the following

A..Physical volumes: This represents the raw disk space as disk partitions.
When we use partitions, the partition type should be set to Linux LVM
with an ID of 8E using the fdisk partitioning tool.

B..Volume groups: This aggregates physical volumes together so that the disk
space can be consumed to logical volumes.

 C..Logical volumes: This represents the block device that can be shared.
It consumes space that is allocated from volume groups

6..How to portioning the disk?

We can  create the   partition on the disk using  fdisk command  to create .
single extended partition and create logical partitions therein.

#  fdisk /dev/hdb 

 fdisk command, will be presented with a menu, you can choose the choices from the menu

7..How to create a volume group?

#  vgcreate volume_group_name /dev/hda1 /dev/hdb1

Vol group “vol_group1” successfully created

8..Explain about  the LVM in Linux?

The Linux LVM was developed by Heinz Mauelshagen and released  in 1998.

Two versions of Linux LVM are available:
LVM1: The original LVM package released in 1998, and available in only the 2.4 Linux kernels. It provides only basic Logical Volume Management features.

LVM2: An updated version of the LVM, available in the 2.6 Linux kernels. It provides additional features over the standard LVM1 features

9..What you mean by Snapshots in linux?

The original Linux LVM allows you to copy an existing logical volume to another device while the logical volume is active. This feature is called a snapshot. Snapshots are great for backing up important data that can't be locked due to high availability requirements.

10..What is Striping and its use in linux?

LVM2 provides is striping. With striping, a logical volume is created across multiple physical hard drives. When the Linux LVM writes a file to the logical volume, the data blocks in the file are spread across the multiple hard drives

Striping helps improve disk performance, as Linux can write the multiple data blocks for a file to the multiple hard drives simultaneously, rather than having to wait for a single hard drive to move the read/write head to different locations.


No comments: