© Dvarg, 123RF.com

© Dvarg, 123RF.com

Introduction to LVM

APieceof the Pie

Article from ADMIN 07/2012
By
Fixed partitions on a Linux system can be created easily using tools such as fdisk, but the assignments tend to be wrong or the partitions too small at the worst possible moment. LVM requires slightly more effort at install time, but it soon pays dividends.

If a partition in a legacy partitioning system starts to run out of space, administrators have two options: They can mount another medium at a new mountpoint and accept the fact that they need to modify their paths or work with alias constructions, or they can replace the disk(s) with a larger model and restore a backup of the complete system to the new disk. This last approach means that the system is unavailable for an extended period of time, and the new disks could turn out to be too small at some point in the future.

The Logical Volume Manager (LVM) gives administrators an escape route by acting as an intermediate logical layer between the physical medium or partitions and the filesystem. Before I demonstrate the principle based on a hands-on example, I will look at the most important terms in the world of LVM [1] [2].

Physical volumes (PVs) are block devices (i.e., whole disk or partitions). To allow an LVM to use a PV, the LVM must be initialized using a command that I will show shortly. Doing this writes an LVM label and some metadata to the PV.

The PV is divided up into units of the same size (4MB by default) known as physical extents (PEs). A PE is the smallest allocatable data volume. Figure 1 illustrates the principle.

...
Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=