{"id":1533,"date":"2018-09-25T06:24:38","date_gmt":"2018-09-25T11:24:38","guid":{"rendered":"http:\/\/www.familytidings.com\/blog\/?p=1533"},"modified":"2018-09-25T06:25:13","modified_gmt":"2018-09-25T11:25:13","slug":"expanding-a-mounted-root-lvm-filesystem","status":"publish","type":"post","link":"https:\/\/www.familytidings.com\/blog\/?p=1533","title":{"rendered":"Expanding a Mounted Root LVM Filesystem"},"content":{"rendered":"<p>These instructions are from <a href=\"https:\/\/www.rootusers.com\/lvm-resize-how-to-increase-an-lvm-partition\/\">https:\/\/www.rootusers.com\/lvm-resize-how-to-increase-an-lvm-partition\/<\/a>. Note: Some output to the commands below that&#8217;s not relevant to these instructions has been removed, so your output will be different.<\/p>\n<p>See capacity of current root file system:<\/p>\n<pre>$ df -h \/\r\nFilesystem                    Size  Used Avail Use% Mounted on\r\n\/dev\/mapper\/ubuntu--vg-root2   99G   82G   12G  88% \/<\/pre>\n<p>Check size of volume group to make sure it has enough space:<\/p>\n<pre>$ sudo vgdisplay\r\n  --- Volume group ---\r\n  VG Name               ubuntu-vg\r\n  VG Size               931.27 GiB\r\nAlloc PE \/ Size 53231 \/ 207.93 GiB\r\nFree PE \/ Size 185174 \/ 723.34 GiB<\/pre>\n<p>Check size of logical volume:<\/p>\n<pre>$ sudo lvdisplay\r\n  --- Logical volume ---\r\n  LV Path                \/dev\/ubuntu-vg\/root2\r\n  LV Name                root2\r\n  VG Name                ubuntu-vg\r\n  LV Size                100.00 GiB<\/pre>\n<p>It has 100GB, but needs 175GB.<\/p>\n<p>To expand the volume group by 75GB:<\/p>\n<pre>$ sudo lvextend -L+75G \/dev\/ubuntu-vg\/root2<\/pre>\n<p>Check that it&#8217;s now 175GB:<\/p>\n<pre>$ sudo lvdisplay\r\n  --- Logical volume ---\r\n  LV Path                \/dev\/ubuntu-vg\/root2\r\n  LV Name                root2\r\n  VG Name                ubuntu-vg\r\n  LV Size                175.00 GiB<\/pre>\n<p>Now expand the file system:<\/p>\n<pre>$ sudo resize2fs \/dev\/ubuntu-vg\/root2<\/pre>\n<p>Check that it&#8217;s done:<\/p>\n<pre>$ df -h \/\r\nFilesystem                    Size  Used Avail Use% Mounted on\r\n\/dev\/mapper\/ubuntu--vg-root2  173G   93G   72G  57% \/<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>These instructions are from https:\/\/www.rootusers.com\/lvm-resize-how-to-increase-an-lvm-partition\/. Note: Some output to the commands below that&#8217;s not relevant to these instructions has been removed, so your output will be different. See capacity of current root file system: $ df -h \/ Filesystem Size Used Avail Use% Mounted on \/dev\/mapper\/ubuntu&#8211;vg-root2 99G 82G 12G 88% \/ Check size of volume [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1533","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1533"}],"version-history":[{"count":6,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1533\/revisions"}],"predecessor-version":[{"id":1540,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1533\/revisions\/1540"}],"wp:attachment":[{"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.familytidings.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}