0% found this document useful (0 votes)
25 views2 pages

Logical Volume Manager

The document provides an overview of Logical Volume Manager (LVM) and its architecture, explaining key components such as physical volumes, volume groups, and logical volumes. It outlines the steps to implement LVM using command line commands, including creating physical volumes, volume groups, and logical volumes, as well as useful commands for managing them. Additionally, it includes a hint regarding the necessity of a separate /boot partition when using a wizard during Linux installation.

Uploaded by

akdeniz.erdem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Logical Volume Manager

The document provides an overview of Logical Volume Manager (LVM) and its architecture, explaining key components such as physical volumes, volume groups, and logical volumes. It outlines the steps to implement LVM using command line commands, including creating physical volumes, volume groups, and logical volumes, as well as useful commands for managing them. Additionally, it includes a hint regarding the necessity of a separate /boot partition when using a wizard during Linux installation.

Uploaded by

akdeniz.erdem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Logical Volume Manager (LVM)

You can implement LVM by 2 ways; the first one is during the installation (not covered here because
you can use the wizard to do it), and the other one is using command line.

This is LVM architecture.

There several pieces of terminology that you'll need to understand to make the best use of LVM. The
most important things you must know are:

 physical volumes
o These are your physical disks, or disk partitions, such as /dev/hda or /dev/hdb1.
These are what you'd be used to using when mounting/unmounting things. Using LVM
we can combine multiple physical volumes into volume groups.
 volume groups
o A volume group is comprised of real physical volumes, and is the storage used to create
logical volumes which you can create/resize/remove and use. You can consider a
volume group as a "virtual partition" which is comprised of an arbitary number of
physical volumes.
 logical volumes
o These are the volumes that you'll ultimately end up mounting upon your system. They
can be added, removed, and resized on the fly. Since these are contained in the volume
groups they can be bigger than any single physical volume you might have. (ie. 4x5Gb
drives can be combined into one 20Gb volume group, and you can then create two
10Gb logical volumes.)

Steps: -
1. Make partitions (You can use one Hard disk or more, it is up to you…).
2. Create Physical volume:-
a. pvcreate /dev/hda2
3. Create Volume group:- Partitions you want to group
a. vgcreate vg0 /dev/hda2 /dev/hda…..

4. Create logical volume:-


a. lvcreate –L 100M –n lv0 vg0
Options:-
i. –L: - Size of the logical volume.
ii. –n:- Name of the logical volume.
5. Make file system on the logical volume:-
a. mke2fs –j /dev/vg0/lv0
i. –j:- Make the file system ext3.
6. Mount it and put it in /etc/fstab.

Useful commands: -
1. vgdisplay:- Information for the Volume Groups.
2. lvdisplay:- Information for the Logical volumes.
3. pvdisplay:- Information for the Physical volumes.
4. For resizing partitions
i. vgextend vg0 /dev/hda16 (For extending Volume group with another Hard disk, or
partition).
ii. lvextend –L +50M lv0 (For extending Logical volume).
iii. resize2fs /dev/vg0/lv0 (this step is very important, because now we extend the
partition).
5. lvremove lv0:- Remove Logical volume.

Hint: -
If you will use wizard during Linux installation, do not forget to make /boot separate partition, because
LVM will not work.

You might also like