{"id":6179,"date":"2023-08-03T11:53:25","date_gmt":"2023-08-03T11:53:25","guid":{"rendered":"https:\/\/www.webhi.com\/how-to\/?p=6179"},"modified":"2023-08-03T11:53:30","modified_gmt":"2023-08-03T11:53:30","slug":"how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos","status":"publish","type":"post","link":"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/","title":{"rendered":"How to use LVM to manage storage on Ubuntu &#038; Debian"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/08\/lvm_ubuntu_en.jpg\" alt=\"LVM Manage Storage On Debian CentOS Fedora RedHat Ubuntu 18.04\/20.04\/22.04\" class=\"wp-image-6198\" srcset=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/08\/lvm_ubuntu_en.jpg 1200w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/08\/lvm_ubuntu_en-300x169.jpg 300w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/08\/lvm_ubuntu_en-1024x576.jpg 1024w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/08\/lvm_ubuntu_en-768x432.jpg 768w, https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/08\/lvm_ubuntu_en-150x84.jpg 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p><strong>Logical Volume Management (LVM)<\/strong> is a useful tool for managing large storage volumes on <strong>Linux<\/strong>. It allows you to create logical volumes that can span multiple physical storage devices. This gives you flexibility in allocating disk space that goes beyond the restrictions of physical disk partitions.<\/p>\n\n\n\n<p>In this guide, we will cover the basics of setting up and managing LVM volumes on <strong>Debian &amp; Ubuntu<\/strong> 18.04, 20.04, and 22.04.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"overview-of-lvm\">Overview of LVM<\/h2>\n\n\n\n<p>Some key terms and concepts relating to LVM:<\/p>\n\n\n\n<ul>\n<li><strong>Physical volumes (PV)<\/strong>&nbsp;&#8211; The underlying physical storage devices that provide the actual storage capacity, such as partitions on hard drives or SSDs.<\/li>\n\n\n\n<li><strong>Volume groups (VG)<\/strong>&nbsp;&#8211; A collection of physical volumes grouped together. This allows physical storage devices to be combined into larger pools of storage.<\/li>\n\n\n\n<li><strong>Logical volumes (LV)<\/strong>&nbsp;&#8211; Virtual block devices that are allocated space from the underlying volume group. You can create, resize and delete logical volumes as needed.<\/li>\n\n\n\n<li><strong>Extents<\/strong>&nbsp;&#8211; Small sized chunks of contiguous space on a physical volume. When allocated to a logical volume, they provide storage to the volume.<\/li>\n<\/ul>\n\n\n\n<p>The key advantage of LVM is the abstraction between physical disks and logical volumes. By using LVM, you don&#8217;t have to worry about the specifics of the physical storage. You can resize, snapshot, and move logical volumes without having to modify the underlying physical devices.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing-lvm\">Installing LVM<\/h2>\n\n\n\n<p>To get started with LVM, you first need to install the lvm2 package:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo apt install lvm2<\/code><\/pre>\n\n\n\n<p>This will install all the tools necessary to manage LVM volumes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-physical-volumes\">Creating Physical Volumes<\/h2>\n\n\n\n<p>The first step is to initialize disks or partitions as physical volumes (PVs) to be used by LVM.<\/p>\n\n\n\n<p>For example, to initialize the&nbsp;<code>\/dev\/sdb1<\/code>&nbsp;partition as a LVM physical volume:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo pvcreate \/dev\/sdb1<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  Physical volume \"\/dev\/sdb1\" successfully created<\/code><\/pre>\n\n\n\n<p>You can verify available PVs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo pvs<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  PV         VG        Fmt  Attr PSize   PFree\n  \/dev\/sdb1             lvm2 ---  &lt;223.57G &lt;223.57G<\/code><\/pre>\n\n\n\n<p>This will list all physical volumes that LVM can access.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-volume-groups\">Creating Volume Groups<\/h2>\n\n\n\n<p>Next, you need to combine one or more PVs into a volume group (VG). The VG will be allocated space from the pooled PVs.<\/p>\n\n\n\n<p>For example, to create a volume group called&nbsp;<code>data<\/code>&nbsp;using the&nbsp;<code>\/dev\/sdb1<\/code>&nbsp;PV:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo vgcreate data \/dev\/sdb1<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  Volume group \"data\" successfully created<\/code><\/pre>\n\n\n\n<p>You can verify available VGs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo vgs<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  VG   <em>#PV #LV #SN Attr   VSize  VFree<\/em>\n  data   1   0   0 wz--n- &lt;223.57G &lt;223.57G<\/code><\/pre>\n\n\n\n<p>List the details of a specific VG:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo vgdisplay data<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  --- Volume group ---\n  VG Name               data\n  System ID             \n  Format                lvm2\n  Metadata Areas        1\n  Metadata Sequence No  1\n  VG Access             read\/write\n  VG Status             resizable\n  MAX LV                0\n  Cur LV                0\n  Open LV               0\n  Max PV                0\n  Cur PV                1\n  Act PV                1\n  VG Size               &lt;223.57 GiB\n  PE Size               4.00 MiB\n  Total PE              57313\n  Alloc PE \/ Size       0 \/ 0   \n  Free  PE \/ Size       57313 \/ &lt;223.57 GiB<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-logical-volumes\">Creating Logical Volumes<\/h2>\n\n\n\n<p>Once you have a volume group, you can create logical volumes (LVs) within that VG.<\/p>\n\n\n\n<p>For example, to create a 10GB logical volume called&nbsp;<code>logs<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo lvcreate -L 10G -n logs data<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  Logical volume \"logs\" created.<\/code><\/pre>\n\n\n\n<p>This creates a 10GB LV called&nbsp;<code>logs<\/code>&nbsp;in the VG&nbsp;<code>data<\/code>.<\/p>\n\n\n\n<p>To create an LV that uses all remaining free space in the VG:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo lvcreate -l 100%FREE -n apps data <\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  Logical volume \"apps\" created.<\/code><\/pre>\n\n\n\n<p>Verify logical volumes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo lvs<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  LV   VG   Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert\n  apps data -wi-a----- &lt;213.57G                                                    \n  logs data -wi-a----- 10.00G  <\/code><\/pre>\n\n\n\n<p>You can also see the full path for the created LVs with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo lvdisplay<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  --- Logical volume ---\n  LV Path                \/dev\/data\/apps\n  LV Name                apps\n  VG Name                data\n  LV UUID                XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n  LV Write Access        read\/write\n  LV Creation host, time ubuntu-server, 2023-07-26 15:37:11 +0200\n  LV Status              available\n  <em># open                 0<\/em>\n  LV Size                &lt;213.57 GiB\n  Current LE             54698\n  Segments               1\n  Allocation             inherit\n  Read ahead sectors     auto\n  - currently set to     256\n  Block device           253:2<\/code><\/pre>\n\n\n\n<p>The logical volumes will be mapped to&nbsp;<code>\/dev\/VG\/LV<\/code>&nbsp;devices that can be formatted and mounted, just like regular partitions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"formatting-and-mounting-logical-volumes\">Formatting and Mounting Logical Volumes<\/h2>\n\n\n\n<p>To use LVM logical volumes, they need to be formatted with a filesystem like any other block device.<\/p>\n\n\n\n<p>For example, to format the&nbsp;<code>logs<\/code>&nbsp;LV to ext4 and mount it at&nbsp;<code>\/var\/log<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo mkfs.ext4 \/dev\/data\/logs \n$ sudo mkdir \/var\/log\n$ sudo mount \/dev\/data\/logs \/var\/log<\/code><\/pre>\n\n\n\n<p>To mount this automatically on reboot, add this to&nbsp;<code>\/etc\/fstab<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">\/dev\/data\/logs \/var\/log ext4 defaults 0 0<\/code><\/pre>\n\n\n\n<p>Do the same for any other LVs you want to use permanently.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"extending-a-logical-volume\">Extending a Logical Volume<\/h2>\n\n\n\n<p>One of the advantages of LVM is that you can easily extend logical volumes.<\/p>\n\n\n\n<p>For example, to grow the&nbsp;<code>logs<\/code>&nbsp;LV by 5GB, first extend the volume group by 5GB:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo lvextend -L +5G \/dev\/data\/logs<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  Size of logical volume data\/logs changed from 10.00 GiB (2560 extents) to 15.00 GiB (3840 extents).\n  Logical volume data\/logs successfully resized.<\/code><\/pre>\n\n\n\n<p>Then resize the filesystem to match:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo resize2fs \/dev\/data\/logs <\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">resize2fs 1.45.5 (07-Jan-2020)\nFilesystem at \/dev\/data\/logs is mounted on \/var\/log; on-line resizing required\nold_desc_blocks = 1, new_desc_blocks = 1\nThe filesystem on \/dev\/data\/logs is now 153600 (4k) blocks long.<\/code><\/pre>\n\n\n\n<p>The LV is now 5GB larger.<\/p>\n\n\n\n<p>This is much easier than extending disk partitions, which requires painful steps like moving and resizing adjacent partitions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"reducing-a-logical-volume\">Reducing a Logical Volume<\/h2>\n\n\n\n<p>To shrink an LV, resize the filesystem first:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo resize2fs \/dev\/data\/logs 20G<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">resize2fs 1.45.5 (07-Jan-2020)\nResizing the filesystem on \/dev\/data\/logs to 5242880 (4k) blocks.\nThe filesystem on \/dev\/data\/logs is now 5242880 (4k) blocks long.<\/code><\/pre>\n\n\n\n<p>This shrinks the filesystem to 20GB.<\/p>\n\n\n\n<p>Then shrink the LV size to match:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo lvreduce -L 20G \/dev\/data\/logs<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  Size of logical volume data\/logs changed from 15.00 GiB (3840 extents) to 20.00 GiB (5120 extents).\n  Logical volume data\/logs successfully resized.<\/code><\/pre>\n\n\n\n<p>The&nbsp;<code>logs<\/code>&nbsp;LV is now reduced to 20GB.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-snapshots\">Creating Snapshots<\/h2>\n\n\n\n<p>LVM allows you to create snapshots of logical volumes. This can be used to take backups of LVs.<\/p>\n\n\n\n<p>For example, create a snapshot of the&nbsp;<code>logs<\/code>&nbsp;LV:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo lvcreate --size 10G --snapshot --name logs-snap \/dev\/data\/logs<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  Logical volume \"logs-snap\" created.<\/code><\/pre>\n\n\n\n<p>This will create a snapshot called&nbsp;<code>logs-snap<\/code>&nbsp;that is a copy of&nbsp;<code>logs<\/code>&nbsp;at the time the snapshot was taken.<\/p>\n\n\n\n<p>Initially the snapshot uses no space, but as the original LV changes, the snapshot will grow to store the old blocks as they are overwritten.<\/p>\n\n\n\n<p>You can mount, back up, or restore data from the snapshot just like a regular LV.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"monitoring-lvm-usage\">Monitoring LVM Usage<\/h2>\n\n\n\n<p>It&#8217;s important to monitor your LVM volume groups and logical volumes to make sure you don&#8217;t run out of space.<\/p>\n\n\n\n<p>To see allocated physical extents per VG:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo vgdisplay -v data<\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  --- Volume group ---\n  VG Name               data\n  VG Access             read\/write\n  VG Status             resizable\n  MAX LV                0\n  Cur LV                2\n  Open LV               0\n  Max PV                0\n  Cur PV                1\n  Act PV                1\n  VG Size               &lt;223.57 GiB\n  PE Size               4.00 MiB\n  Total PE              57313\n  Alloc PE \/ Size       15360 \/ 60.00 GiB\n  Free  PE \/ Size       41953 \/ &lt;163.57 GiB<\/code><\/pre>\n\n\n\n<p>To monitor LV usage:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$ sudo lvdisplay <\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">  --- Logical volume ---\n  LV Path                \/dev\/data\/logs\n  LV Name                logs\n  VG Name                data\n  LV UUID                XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX\n  LV Write Access        read\/write\n  LV Creation host, time ubuntu-server, 2022-03-05 10:17:11 +0200\n  LV Status              available\n  <em># open                 0<\/em>\n  LV Size                20.00 GiB\n  Current LE             5120\n  Segments               1\n  Allocation             inherit\n  Read ahead sectors     auto\n  - currently set to     256\n  Block device           253:0\n   \n  --- Logical volume ---\n  LV Path                \/dev\/data\/apps\n  LV Name                apps\n  VG Name                data\n  LV UUID                XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX\n  LV Write Access        read\/write\n  LV Creation host, time ubuntu-server, 2023-07-26 15:37:11 +0200\n  LV Status              available\n  <em># open                 0<\/em>\n  LV Size                &lt;193.57 GiB\n  Current LE             49408\n  Segments               1\n  Allocation             inherit\n  Read ahead sectors     auto\n  - currently set to     256\n  Block device           253:1<\/code><\/pre>\n\n\n\n<p>You can also install an LVM monitoring utility like&nbsp;<code>lvm2 snarf<\/code>&nbsp;to get notifications when usage crosses thresholds.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"advantages-of-lvm\">Advantages of LVM<\/h2>\n\n\n\n<p>Some of the key advantages of LVM include:<\/p>\n\n\n\n<ul>\n<li>Flexibility to grow and shrink logical volumes as needed, without partitions restraints.<\/li>\n\n\n\n<li>Easily take snapshots and backups of volumes.<\/li>\n\n\n\n<li>Pool storage from multiple devices into a common volume group.<\/li>\n\n\n\n<li>Migrate data by moving logical volumes between storage devices.<\/li>\n\n\n\n<li>Allocate striped, mirrored or encrypted logical volumes.<\/li>\n<\/ul>\n\n\n\n<p>Overall, LVM provides powerful, flexible storage management for your Ubuntu servers. With a bit of learning, it can be tremendously useful for managing large and growing storage demands.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>LVM provides a robust way to manage large-scale and dynamic storage in Ubuntu and Debian. By using LVM, you can effectively handle constantly changing storage needs, while also enabling key functionality like snapshots and thin provisioning. However, it does require learning some new concepts and commands. With some hands-on practice, LVM can become an indispensable part of how you deploy and manage Ubuntu storage. Used properly, it can save you a lot of time and hassle as your needs grow and change. The flexibility of being able to dynamically grow, shrink, and migrate volumes makes LVM well worth the initial effort to learn.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Logical Volume Management (LVM) is a useful tool for managing large storage volumes on Linux. It allows you to create logical volumes that can span multiple physical storage devices. This gives you flexibility in allocating disk space that goes beyond the restrictions of physical disk partitions. In this guide, we will cover the basics of ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[69],"tags":[],"yoast_head":"\n<title>How to use LVM to manage storage on Ubuntu &amp; Debian - WebHi Tutorials &amp; Documentations<\/title>\n<meta name=\"description\" content=\"A guide to using Logical Volume Management (LVM) on Linux to flexibly manage storage volumes that span across multiple disks and partitions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use LVM to manage storage on Ubuntu &amp; Debian - WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"og:description\" content=\"A guide to using Logical Volume Management (LVM) on Linux to flexibly manage storage volumes that span across multiple disks and partitions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHi Tutorials &amp; Documentations\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webhi.technology\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-03T11:53:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-03T11:53:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/08\/lvm_ubuntu_en.jpg\" \/>\n<meta name=\"author\" content=\"webhi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:site\" content=\"@WebHiTechnology\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webhi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/\"},\"author\":{\"name\":\"webhi\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\"},\"headline\":\"How to use LVM to manage storage on Ubuntu &#038; Debian\",\"datePublished\":\"2023-08-03T11:53:25+00:00\",\"dateModified\":\"2023-08-03T11:53:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/\"},\"wordCount\":958,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"articleSection\":[\"Linux system administration\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/\",\"name\":\"How to use LVM to manage storage on Ubuntu & Debian - WebHi Tutorials &amp; Documentations\",\"isPartOf\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\"},\"datePublished\":\"2023-08-03T11:53:25+00:00\",\"dateModified\":\"2023-08-03T11:53:30+00:00\",\"description\":\"A guide to using Logical Volume Management (LVM) on Linux to flexibly manage storage volumes that span across multiple disks and partitions.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webhi.com\/how-to\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use LVM to manage storage on Ubuntu &#038; Debian\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#website\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"name\":\"WebHi Tutorials &amp; Documentations\",\"description\":\"System administration and knowledge base\",\"publisher\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#organization\",\"name\":\"WebHi Technology\",\"url\":\"https:\/\/www.webhi.com\/how-to\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png\",\"width\":288,\"height\":95,\"caption\":\"WebHi Technology\"},\"image\":{\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webhi.technology\",\"https:\/\/twitter.com\/WebHiTechnology\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54\",\"name\":\"webhi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1784239260\",\"contentUrl\":\"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1784239260\",\"caption\":\"webhi\"},\"sameAs\":[\"https:\/\/www.webhi.com\/how-to\"],\"url\":\"https:\/\/www.webhi.com\/how-to\/author\/webhi\/\"}]}<\/script>\n","yoast_head_json":{"title":"How to use LVM to manage storage on Ubuntu & Debian - WebHi Tutorials &amp; Documentations","description":"A guide to using Logical Volume Management (LVM) on Linux to flexibly manage storage volumes that span across multiple disks and partitions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/","og_locale":"en_US","og_type":"article","og_title":"How to use LVM to manage storage on Ubuntu & Debian - WebHi Tutorials &amp; Documentations","og_description":"A guide to using Logical Volume Management (LVM) on Linux to flexibly manage storage volumes that span across multiple disks and partitions.","og_url":"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/","og_site_name":"WebHi Tutorials &amp; Documentations","article_publisher":"https:\/\/www.facebook.com\/webhi.technology","article_published_time":"2023-08-03T11:53:25+00:00","article_modified_time":"2023-08-03T11:53:30+00:00","og_image":[{"url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2023\/08\/lvm_ubuntu_en.jpg"}],"author":"webhi","twitter_card":"summary_large_image","twitter_creator":"@WebHiTechnology","twitter_site":"@WebHiTechnology","twitter_misc":{"Written by":"webhi","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/#article","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/"},"author":{"name":"webhi","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54"},"headline":"How to use LVM to manage storage on Ubuntu &#038; Debian","datePublished":"2023-08-03T11:53:25+00:00","dateModified":"2023-08-03T11:53:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/"},"wordCount":958,"commentCount":0,"publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"articleSection":["Linux system administration"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/","url":"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/","name":"How to use LVM to manage storage on Ubuntu & Debian - WebHi Tutorials &amp; Documentations","isPartOf":{"@id":"https:\/\/www.webhi.com\/how-to\/#website"},"datePublished":"2023-08-03T11:53:25+00:00","dateModified":"2023-08-03T11:53:30+00:00","description":"A guide to using Logical Volume Management (LVM) on Linux to flexibly manage storage volumes that span across multiple disks and partitions.","breadcrumb":{"@id":"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhi.com\/how-to\/how-to-use-lvm-to-manage-storage-on-linux-ubuntu-debian-redhat-centos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhi.com\/how-to\/"},{"@type":"ListItem","position":2,"name":"How to use LVM to manage storage on Ubuntu &#038; Debian"}]},{"@type":"WebSite","@id":"https:\/\/www.webhi.com\/how-to\/#website","url":"https:\/\/www.webhi.com\/how-to\/","name":"WebHi Tutorials &amp; Documentations","description":"System administration and knowledge base","publisher":{"@id":"https:\/\/www.webhi.com\/how-to\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhi.com\/how-to\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webhi.com\/how-to\/#organization","name":"WebHi Technology","url":"https:\/\/www.webhi.com\/how-to\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/","url":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","contentUrl":"https:\/\/www.webhi.com\/how-to\/gilrogre\/2022\/07\/logo.png","width":288,"height":95,"caption":"WebHi Technology"},"image":{"@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webhi.technology","https:\/\/twitter.com\/WebHiTechnology"]},{"@type":"Person","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/b31e76e2311cdc0bb90f5e2733059a54","name":"webhi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhi.com\/how-to\/#\/schema\/person\/image\/","url":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1784239260","contentUrl":"https:\/\/www.webhi.com\/how-to\/ahuphiph\/litespeed\/avatar\/e20da107d0f4c765ead2eef88ad019d8.jpg?ver=1784239260","caption":"webhi"},"sameAs":["https:\/\/www.webhi.com\/how-to"],"url":"https:\/\/www.webhi.com\/how-to\/author\/webhi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/6179"}],"collection":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/comments?post=6179"}],"version-history":[{"count":5,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/6179\/revisions"}],"predecessor-version":[{"id":6217,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/posts\/6179\/revisions\/6217"}],"wp:attachment":[{"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/media?parent=6179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/categories?post=6179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhi.com\/how-to\/wp-json\/wp\/v2\/tags?post=6179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}