{"id":294,"date":"2010-06-04T04:31:44","date_gmt":"2010-06-04T10:31:44","guid":{"rendered":"http:\/\/blog.supportpro.com\/2010\/06\/logical-volume-manager-lvm\/"},"modified":"2026-03-29T23:38:51","modified_gmt":"2026-03-30T05:38:51","slug":"logical-volume-manager-lvm","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/logical-volume-manager-lvm\/","title":{"rendered":"LVM in Linux: Create, Manage, and Extend Logical Volumes"},"content":{"rendered":"\n<p>Logical Volume Manager (LVM) is a flexible storage management system in Linux that allows administrators to manage disk space more efficiently than traditional disk partitions. Instead of fixed partitions, LVM lets you create <strong>logical volumes<\/strong> that can be resized, extended, or reduced without major downtime.<\/p>\n\n\n\n<p>This guide explains <strong>what LVM is<\/strong>, important terminology, and how to create and extend logical volumes step by step.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Is LVM?<\/h2>\n\n\n\n<p>LVM (Logical Volume Manager) is a method of allocating storage into logical volumes rather than static partitions. It provides flexibility by allowing multiple disks to be combined into a single storage pool.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Key Advantages of LVM<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Resize volumes without repartitioning disks<\/li>\n\n\n\n<li>Combine multiple drives into one storage space<\/li>\n\n\n\n<li>Extend storage dynamically<\/li>\n\n\n\n<li>Simplify disk management<\/li>\n\n\n\n<li>Reduce downtime during storage upgrades<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Important LVM Concepts<\/h2>\n\n\n\n<p>Understanding LVM terminology is essential before creating volumes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Physical Volumes (PV)<\/h3>\n\n\n\n<p>Physical Volumes are the actual storage devices or disk partitions used by LVM.<\/p>\n\n\n\n<p>Examples:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/sda<br>\/dev\/sdb1<\/code><\/pre>\n\n\n\n<p>Each disk or partition must be initialized as an LVM physical volume before use.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Note: A physical volume belongs to only one disk. To use multiple drives, create separate physical volumes for each.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">2. Volume Groups (VG)<\/h3>\n\n\n\n<p>A Volume Group combines multiple physical volumes into one storage pool. You can think of it as a <strong>virtual disk<\/strong> created from several physical disks.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Storage is aggregated<\/li>\n\n\n\n<li>Logical volumes are created from this pool<\/li>\n<\/ul>\n\n\n\n<p>The <code>\/boot<\/code> partition should <strong>not<\/strong> be part of an LVM volume group because boot loaders cannot read LVM during startup.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Logical Volumes (LV)<\/h3>\n\n\n\n<p>Logical Volumes are the usable partitions created inside a volume group. These are the volumes you format and mount in Linux.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Four 5GB disks \u2192 20GB Volume Group<\/li>\n\n\n\n<li>Create two 10GB Logical Volumes from it<\/li>\n<\/ul>\n\n\n\n<p>Logical volumes can be resized while the system is running.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">LVM Partition Type Requirement<\/h2>\n\n\n\n<p>Before creating LVM volumes, set the partition type to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>8e (Linux LVM)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Create Physical Volumes<\/h2>\n\n\n\n<p>Initialize disks for LVM usage:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvcreate \/dev\/sda \/dev\/sdb \/dev\/sdc \/dev\/sdd<\/code><\/pre>\n\n\n\n<p>To verify physical volumes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pvdisplay<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Create a Volume Group<\/h2>\n\n\n\n<p>Create a volume group using available physical volumes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vgcreate volume_group_one \/dev\/sda1 \/dev\/sdb1 \/dev\/sdc1 \/dev\/sdd1<\/code><\/pre>\n\n\n\n<p>Check volume group details:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vgdisplay<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Create a Logical Volume<\/h2>\n\n\n\n<p>Create a logical volume inside the volume group:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvcreate -n logical_volume_one --size 255G volume_group_one<\/code><\/pre>\n\n\n\n<p>List logical volumes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvdisplay<\/code><\/pre>\n\n\n\n<p>Your system now recognizes a new virtual device:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/dev\/volume_group_one\/logical_volume_one<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Format and Mount the Logical Volume<\/h2>\n\n\n\n<p>Format the volume:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.ext3 \/dev\/volume_group_one\/logical_volume_one<\/code><\/pre>\n\n\n\n<p>Create a mount directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/mnt\/logical_volume_one<\/code><\/pre>\n\n\n\n<p>Mount the logical volume:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/volume_group_one\/logical_volume_one \/mnt\/logical_volume_one<\/code><\/pre>\n\n\n\n<p>The logical volume is now ready for use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Extend a Logical Volume<\/h2>\n\n\n\n<p>To increase storage capacity:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lvextend -L +100G \/dev\/volume_group_one\/logical_volume_one<\/code><\/pre>\n\n\n\n<p>This command adds <strong>100GB<\/strong> to the logical volume.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Resize the Filesystem<\/h2>\n\n\n\n<p>After extending the logical volume, resize the filesystem to use the new space:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>resize2fs \/dev\/volume_group_one\/logical_volume_one<\/code><\/pre>\n\n\n\n<p>Without this step, the operating system will not recognize the added storage.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices for Using LVM<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Keep <code>\/boot<\/code> outside LVM<\/li>\n\n\n\n<li>Monitor free space in volume groups<\/li>\n\n\n\n<li>Always back up important data before resizing volumes<\/li>\n\n\n\n<li>Use LVM for servers requiring scalable storage<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>LVM provides powerful storage flexibility compared to traditional partitioning. By combining disks into volume groups and creating scalable logical volumes, administrators can expand storage without rebuilding servers or reinstalling operating systems.<\/p>\n\n\n\n<p>For modern Linux environments, LVM remains one of the most efficient ways to manage growing storage requirements while maintaining performance and uptime.<\/p>\n\n\n\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n\n\n\n<p class=\"has-text-align-center\"><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/www.supportpro.com\/freecheckup.php\"><\/a><\/span><\/span><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Logical Volume Manager (LVM) is a flexible storage management system in Linux that allows administrators to manage disk space more efficiently than traditional disk partitions. Instead of fixed partitions, LVM&hellip;<\/p>\n","protected":false},"author":4,"featured_media":16800,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-294","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-miscellaneous"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=294"}],"version-history":[{"count":5,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/294\/revisions"}],"predecessor-version":[{"id":16801,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/294\/revisions\/16801"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media\/16800"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}