{"id":1101,"date":"2020-06-11T11:17:57","date_gmt":"2020-06-11T09:17:57","guid":{"rendered":"http:\/\/dety.net.ua\/?p=1101"},"modified":"2020-08-06T18:14:52","modified_gmt":"2020-08-06T16:14:52","slug":"extend-lvm-partition-in-centos-7-8-under-vmware","status":"publish","type":"post","link":"https:\/\/dety.net.ua\/?p=1101","title":{"rendered":"Extend LVM partition in CentOS 7\/8 under VmWare"},"content":{"rendered":"\n<ol class=\"wp-block-list\"><li>Add more space on the disk in VmWare console.<\/li><li>Run cfdisk and check that you see free space after \/dev\/sda5.<\/li><li>In my case there are \/dev\/sda4 as extended partition and \/dev\/sda5 as LVM2 partition in extended. Remember start sectors for \/dev\/sda4 and sda5. <\/li><li>Delete \/dev\/sda5. Don&#8217;t worry &#8211; your data will be OK.<\/li><li>Delete \/dev\/sda4.<\/li><li>Create \/dev\/sda4 as extended partition with full space.<\/li><li>Create \/dev\/sda5 and change type to LVM (8e).<\/li><li>Check the start sectors &#8211; must be the same as before.<\/li><li>Write changes.<\/li><li>Exit from cfdisk.<\/li><li>Run pvresize \/dev\/sda5.<\/li><li>Run lvextend -r cl\/root \/dev\/sda5. (-r means you resize the file system too).<\/li><li>Profit!<\/li><\/ol>\n\n\n\n<p>P.S.: In Ubuntu 18.04 with GPT table I had to fix the disk\/partition with gdisk \/dev\/sdaX. Just make write and it will correct the error. Then you can see it in cfdisk and resize a partition there. Then run resize2fs \/dev\/sdaX <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Add more space on the disk in VmWare console. Run cfdisk and check that you see free space after \/dev\/sda5. In my case there are \/dev\/sda4 as extended partition and \/dev\/sda5 as LVM2 partition in extended. Remember start sectors for \/dev\/sda4 and sda5. Delete \/dev\/sda5. Don&#8217;t worry &#8211; your data will be OK. Delete \/dev\/sda4. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,13,1,11],"tags":[],"class_list":["post-1101","post","type-post","status-publish","format-standard","hentry","category-linux","category-novosti","category-uncategorized","category-vmware"],"_links":{"self":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/1101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1101"}],"version-history":[{"count":3,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/1101\/revisions"}],"predecessor-version":[{"id":1105,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/1101\/revisions\/1105"}],"wp:attachment":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}