{"id":2591,"date":"2020-04-07T10:57:15","date_gmt":"2020-04-07T10:57:15","guid":{"rendered":"https:\/\/wiki.thomasandsofia.com\/?p=2591"},"modified":"2020-04-08T01:09:12","modified_gmt":"2020-04-08T01:09:12","slug":"lvm-logical-volume-manager","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=2591","title":{"rendered":"1. LVM &#8211; Logical Volume Manager"},"content":{"rendered":"<p>| <a href=\"https:\/\/wiki.thomasandsofia.com\/lvm-commands\/\">Commands<\/a> | <a href=\"https:\/\/wiki.thomasandsofia.com\/2-lvm-logical-volumes\/\">Section 2: LVM Logical Volumes &gt;<\/a><\/p>\n<h1>1. Introduction<\/h1>\n<p><a href=\"https:\/\/www.udemy.com\/course\/a-complete-guide-on-linux-lvm\/learn\/lecture\/13069906#overview\" target=\"_blank\" rel=\"noopener\">https:\/\/www.udemy.com\/course\/a-complete-guide-on-linux-lvm\/learn\/lecture\/13069906#overview<\/a><\/p>\n<h1>2. The LVM Manager Overview<\/h1>\n<p>Traditional Partitioning<\/p>\n<ul>\n<li>You cannot resize partitions<\/li>\n<li>You cannot add disks together to create a single drive<\/li>\n<\/ul>\n<p>Using LVM<\/p>\n<ul>\n<li>You can combine multiple drives into a single volume group<\/li>\n<li>The pool can be subdivided into smaller Logical Volumes (LV)<\/li>\n<li>Any remaining space can be added to a LV.<\/li>\n<li>Additional drives can be added to the Pool<\/li>\n<\/ul>\n<h1>3 Features of LVM<\/h1>\n<ul>\n<li>Additional flexibility<\/li>\n<li>Disks can be added to the pool then subdivided in to Logical Volumes<\/li>\n<li>LVs can be resized\n<ul>\n<li>LVs can be moved around (advanced)<\/li>\n<\/ul>\n<\/li>\n<li>LVM can be though of Dynamic Partitions\n<ul>\n<li>Create \/ Resize \/ Delete &#8220;On the fly&#8221;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h1>4. LVM Architecture Overview<\/h1>\n<p>Terminology<\/p>\n<ul>\n<li>PV Physical Volume\n<ul>\n<li>Can be a whole disk or a partition<\/li>\n<\/ul>\n<\/li>\n<li>Volume Groups\n<ul>\n<li>1 or more PVs combined into a group<\/li>\n<\/ul>\n<\/li>\n<li>LV\n<ul>\n<li>Partitions of the VG<\/li>\n<li>Can be formatted as desired\n<ul>\n<li>ext4<\/li>\n<li>nfs<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h1>5. Architecture Diagram<\/h1>\n<p><a href=\"https:\/\/www.udemy.com\/course\/a-complete-guide-on-linux-lvm\/learn\/lecture\/13061948#overview\" target=\"_blank\" rel=\"noopener\">https:\/\/www.udemy.com\/course\/a-complete-guide-on-linux-lvm\/learn\/lecture\/13061948#overview<\/a><\/p>\n<h1>6. LVM Components<\/h1>\n<ul>\n<li>Physical Volumes PV\n<ul>\n<li>Block device<\/li>\n<li>LVM Label placed in the second 512 byte sector by default\n<ul>\n<li>First sector = mbr (Master Boot Record)\n<ul>\n<li>Can be placed in any of the first 4 sectors<\/li>\n<\/ul>\n<\/li>\n<li>Label provides information about\n<ul>\n<li>Identification<\/li>\n<li>Device ordering (since any device can come up in any order when a system is booted)<\/li>\n<\/ul>\n<\/li>\n<li>Labels remain persistent across reboots<\/li>\n<li>Contains random unique UUID for the physical volume.<\/li>\n<\/ul>\n<\/li>\n<li>3rd &amp; 4th sectors contain metadata\n<ul>\n<li>See next section<\/li>\n<li><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h1>7. Practice Lab<\/h1>\n<ul>\n<li>About Metatdata\n<ul>\n<li>How and when the volume was created<\/li>\n<li>Information about the Volume Group\n<ul>\n<li>Name and Unique ID<\/li>\n<li>Version Number\n<ul>\n<li>Incremented whenever the metadata is updated<\/li>\n<li>Read write properties<\/li>\n<li>Any admin limits on the number of PV and LVs it may contain.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Creating the Physical Volumes<\/p>\n<ol>\n<li>Create the Partition\n<ol>\n<li>For a full disk, the first partition starts at 2048 (first 4 512 sectors reserved!)<\/li>\n<li>Use the rest of the disk as Primary p<\/li>\n<li>Type t &#8211; 8e (Linux LVM)<\/li>\n<li>Write \/ Quit<\/li>\n<li>Continue with any remaining disks<\/li>\n<\/ol>\n<\/li>\n<li>Create an LVM physical volume\n<ol>\n<li>pvcreate \/dev\/sdb1<\/li>\n<li>Repeat for any remaining disks<\/li>\n<\/ol>\n<\/li>\n<li>Get data for the individual PVs\n<ol>\n<li>pvdisplay \/dev\/sdb1\n<ol>\n<li>PV Name<\/li>\n<li>VG Name<\/li>\n<li>PV size<\/li>\n<li>Allocat<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>| Commands | Section 2: LVM Logical Volumes &gt; 1. Introduction https:\/\/www.udemy.com\/course\/a-complete-guide-on-linux-lvm\/learn\/lecture\/13069906#overview 2. The LVM Manager Overview Traditional Partitioning You cannot resize partitions You cannot add disks together to create a single drive Using LVM You can combine multiple drives into a single volume group The pool can be subdivided into smaller Logical Volumes (LV) ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=2591\" 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":{"footnotes":""},"categories":[56],"tags":[],"class_list":["post-2591","post","type-post","status-publish","format-standard","hentry","category-logical-volume-manager"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/2591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2591"}],"version-history":[{"count":5,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/2591\/revisions"}],"predecessor-version":[{"id":2603,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/2591\/revisions\/2603"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}