{"id":23,"date":"2014-09-28T15:13:58","date_gmt":"2014-09-28T15:13:58","guid":{"rendered":"http:\/\/marshallpdavis.com\/?page_id=23"},"modified":"2019-09-22T03:23:59","modified_gmt":"2019-09-22T03:23:59","slug":"linux-lvm","status":"publish","type":"page","link":"https:\/\/marshallpdavis.com\/?page_id=23","title":{"rendered":"Linux LVM"},"content":{"rendered":"<p>Good basic tutorial on linux-based LVM &#8211; http:\/\/www.howtoforge.com\/linux_lvm<\/p>\n<p>Create new LVM PV group:<\/p>\n<pre>pvcreate \/dev\/sda \/dev\/sdb ... \/dev\/sdz<\/pre>\n<p>Add a new PV to an existing PV group:<\/p>\n<pre>vgextend volgroup \/dev\/sdb1<\/pre>\n<p>Display info about a PV group:<\/p>\n<pre>pvdisplay \/dev\/volgroup<\/pre>\n<p>Destroy a PV group:<\/p>\n<pre>pvremove \/dev\/sda \/dev\/sdb ... \/dev\/sdz<\/pre>\n<p>Increase logical volume size by 10GB (assuming there is enough unused space in the PV group):<\/p>\n<pre>lvextend --size +10G \/dev\/volgroup\/logicalvolume<\/pre>\n<p>Set total size (can not decrease with this command):<\/p>\n<pre>lvextend --size 11G  \/dev\/volgroup\/logicalvolume<\/pre>\n<p>Increase or decrease an LV&#8217;s size with (assume current size is 10GB for example):<\/p>\n<pre>lvresize --size 9G \/dev\/volgroup\/logicalvolume<\/pre>\n<p>Or:<\/p>\n<pre>lvresize --size -1G \/dev\/volgroup\/logicalvolume<\/pre>\n<p>Make sure to resize the filesystem before\/after as is appropriate with:<\/p>\n<pre>resize2fs \/dev\/volgroup\/logicalvolume<\/pre>\n<p>If decreasing the size of the filesystem, a size must be specified, if increasing, default will be to fill all available space:<\/p>\n<pre>resize2fs \/dev\/volgroup\/logicalvolume 9G<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Good basic tutorial on linux-based LVM &#8211; http:\/\/www.howtoforge.com\/linux_lvm Create new LVM PV group: pvcreate \/dev\/sda \/dev\/sdb &#8230; \/dev\/sdz Add a new PV to an existing PV group: vgextend volgroup \/dev\/sdb1 Display info about a PV group: pvdisplay \/dev\/volgroup Destroy a PV group: pvremove \/dev\/sda \/dev\/sdb &#8230; \/dev\/sdz Increase logical volume size by 10GB (assuming there &hellip; <a href=\"https:\/\/marshallpdavis.com\/?page_id=23\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Linux LVM<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-23","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/marshallpdavis.com\/index.php?rest_route=\/wp\/v2\/pages\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marshallpdavis.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/marshallpdavis.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/marshallpdavis.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marshallpdavis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":3,"href":"https:\/\/marshallpdavis.com\/index.php?rest_route=\/wp\/v2\/pages\/23\/revisions"}],"predecessor-version":[{"id":26,"href":"https:\/\/marshallpdavis.com\/index.php?rest_route=\/wp\/v2\/pages\/23\/revisions\/26"}],"wp:attachment":[{"href":"https:\/\/marshallpdavis.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}