{"id":3255,"date":"2024-10-03T14:09:07","date_gmt":"2024-10-03T18:09:07","guid":{"rendered":"https:\/\/increasec.com\/?p=3255"},"modified":"2024-10-04T09:13:07","modified_gmt":"2024-10-04T13:13:07","slug":"ubuntu-extend-full-part","status":"publish","type":"post","link":"https:\/\/increasec.com\/?p=3255","title":{"rendered":"Ubuntu Extend full part"},"content":{"rendered":"\n<p>Step 1: In VmWare, make the partition larger.  i did this while the VM was running with no ill effects.<\/p>\n\n\n\n<p>sudo su<br>[sudo] password for hex:<br>root@uwazuh:\/home\/hex# lsblk<br>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS<br>sda 8:0 0 200G 0 disk<br>\u251c\u2500sda1 8:1 0 1G 0 part \/boot\/efi<br>\u251c\u2500sda2 8:2 0 2G 0 part \/boot<br>\u2514\u2500sda3 8:3 0 96.9G 0 part<br>\u2514\u2500ubuntu&#8211;vg-ubuntu&#8211;lv 252:0 0 <strong>48.5G<\/strong> 0 lvm \/<br>sr0 11:0 1 2.6G 0 rom<br>root@uwazuh:\/home\/hex#<br>root@uwazuh:\/home\/hex# fdisk \/dev\/sda<\/p>\n\n\n\n<p>Welcome to fdisk (util-linux 2.39.3).<br>Changes will remain in memory only, until you decide to write them.<br>Be careful before using the write command.<\/p>\n\n\n\n<p>GPT PMBR size mismatch (209715199 != 419430399) will be corrected by write.<br>The backup GPT table is not on the end of the device. This problem will be corrected by write.<br>This disk is currently in use &#8211; repartitioning is probably a bad idea.<br>It&#8217;s recommended to umount all file systems, and swapoff all swap<br>partitions on this disk.<\/p>\n\n\n\n<p>Command (m for help): d<br>Partition number (1-3, default 3): 3<\/p>\n\n\n\n<p>Partition 3 has been deleted.<\/p>\n\n\n\n<p>Command (m for help): n<br>Partition number (3-128, default 3): 3<br>First sector (6397952-419430366, default 6397952):<br>Last sector, +\/-sectors or +\/-size{K,M,G,T,P} (6397952-419430366, default 419428351):<\/p>\n\n\n\n<p>Created a new partition 3 of type &#8216;Linux filesystem&#8217; and of size 196.9 GiB.<br>Partition #3 contains a LVM2_member signature.<\/p>\n\n\n\n<p>Do you want to remove the signature? [Y]es\/[N]o: <strong>n<\/strong><\/p>\n\n\n\n<p>Command (m for help): w<\/p>\n\n\n\n<p>The partition table has been altered.<br>Syncing disks.<\/p>\n\n\n\n<p>root@uwazuh:\/home\/hex# lsblk<br>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS<br>sda 8:0 0 200G 0 disk<br>\u251c\u2500sda1 8:1 0 1G 0 part \/boot\/efi<br>\u251c\u2500sda2 8:2 0 2G 0 part \/boot<br>\u2514\u2500sda3 8:3 0 196.9G 0 part<br>\u2514\u2500ubuntu&#8211;vg-ubuntu&#8211;lv 252:0 0 <strong>48.5G <\/strong>0 lvm \/<br>sr0 11:0 1 2.6G 0 rom<br>root@uwazuh:\/home\/hex#<br>root@uwazuh:\/home\/hex# pvresize \/dev\/sda3<br>Physical volume &#8220;\/dev\/sda3&#8221; changed<br>1 physical volume(s) resized or updated \/ 0 physical volume(s) not resized<br>root@uwazuh:\/home\/hex# lsblk<br>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS<br>sda 8:0 0 200G 0 disk<br>\u251c\u2500sda1 8:1 0 1G 0 part \/boot\/efi<br>\u251c\u2500sda2 8:2 0 2G 0 part \/boot<br>\u2514\u2500sda3 8:3 0 196.9G 0 part<br>\u2514\u2500<em><mark style=\"background-color:#7bdcb5\" class=\"has-inline-color has-black-color\">ubuntu&#8211;vg-ubuntu&#8211;lv<\/mark><\/em> 252:0 0 <strong>48.5G<\/strong> 0 lvm \/<br>sr0 11:0 1 2.6G 0 rom<br>root@uwazuh:\/home\/hex# lvextend &#8211;extents +100%FREE &#8211;resizefs \/dev\/<em><mark style=\"background-color:#7bdcb5\" class=\"has-inline-color\">ubuntu-vg\/ubuntu-lv<\/mark><\/em><br>Size of logical volume ubuntu-vg\/ubuntu-lv changed from 48.47 GiB (12409 extents) to &lt;196.95 GiB (50418 extents).<br>Logical volume ubuntu-vg\/ubuntu-lv successfully resized.<br>resize2fs 1.47.0 (5-Feb-2023)<br>Filesystem at \/dev\/mapper\/ubuntu&#8211;vg-ubuntu&#8211;lv is mounted on \/; on-line resizing required<br>old_desc_blocks = 7, new_desc_blocks = 25<br>The filesystem on \/dev\/mapper\/ubuntu&#8211;vg-ubuntu&#8211;lv is now 51628032 (4k) blocks long.<\/p>\n\n\n\n<p>root@uwazuh:\/home\/hex# lsblk<br>NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS<br>sda 8:0 0 200G 0 disk<br>\u251c\u2500sda1 8:1 0 1G 0 part \/boot\/efi<br>\u251c\u2500sda2 8:2 0 2G 0 part \/boot<br>\u2514\u2500sda3 8:3 0 196.9G 0 part<br>\u2514\u2500ubuntu&#8211;vg-ubuntu&#8211;lv 252:0 0 <strong>196.9G<\/strong> 0 lvm \/<br>sr0 11:0 1 2.6G 0 rom<br>root@uwazuh:\/home\/hex#<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Sources: <a href=\"https:\/\/medium.com\/@mohammadfalahat\/how-to-extend-lvm-in-ubuntu-after-expanding-disk-capacity-via-esxi-or-proxmox-65f44e1a445e#:~:text=Step%201%3A%20Resizing%20the%20LVM,this%20partition%20without%20losing%20data.\">Medium<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step 1: In VmWare, make the partition larger. i did this while the VM was running with no ill effects. sudo su[sudo] password for hex:root@uwazuh:\/home\/hex# lsblkNAME MAJ:MIN RM SIZE RO&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10,214],"class_list":["post-3255","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-linux","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/posts\/3255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/increasec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3255"}],"version-history":[{"count":2,"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/posts\/3255\/revisions"}],"predecessor-version":[{"id":3257,"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/posts\/3255\/revisions\/3257"}],"wp:attachment":[{"href":"https:\/\/increasec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/increasec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/increasec.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}