{"id":288,"date":"2025-09-29T12:26:19","date_gmt":"2025-09-29T10:26:19","guid":{"rendered":"https:\/\/34.75.207.203\/?p=288"},"modified":"2025-10-18T00:00:50","modified_gmt":"2025-10-17T22:00:50","slug":"extend-root-partition-ubuntu-24-04-lts","status":"publish","type":"post","link":"https:\/\/tillnet.se\/?p=288","title":{"rendered":"Extend root partition, Ubuntu 24.04 LTS"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This applies to different scenarios but perhaps most common is a virtual machine which needs more disk space. This guide assumes you have extended the disk in your hypervisor. This guide is for non LVM, if you&#8217;re running lvm check this <a href=\"https:\/\/34.75.207.203\/index.php\/2025\/09\/29\/extend-root-partition-ubuntu-24-04-lts-lvm\/\" data-type=\"post\" data-id=\"286\">post<\/a> instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check disk by listing them with:<br><code>fdisk -l<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Partition size by running:<br><code>df -h<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the new size isn&#8217;t listed\/shown, we have to scan for changes:<br><code>ls \/sys\/class\/scsi_device\/<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example output could be:<br><code>2:0:0:0&nbsp; 3:0:0:0&nbsp; 32:0:0:0<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The scan all devices individually:<br><code>echo 1 &gt; \/sys\/class\/scsi_device\/2\\:0\\:0\\:0\/device\/rescan<br>echo 1 &gt; \/sys\/class\/scsi_device\/3\\:0\\:0\\:0\/device\/rescan<br>echo 1 &gt; \/sys\/class\/scsi_device\/32\\:0\\:0\\:0\/device\/rescan<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After that we can use <code>cfdisk<\/code> to resize the root partition.<br>When you run that cmd you will enter that utility, use arrows to navigate.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select ex. \/dev\/sda3 or your device for root partition.<\/li>\n\n\n\n<li>Select &#8220;Resize&#8221;.<\/li>\n\n\n\n<li>Select &#8220;Write&#8221;.<\/li>\n\n\n\n<li>Type &#8220;Yes&#8221;.<\/li>\n\n\n\n<li>Select &#8220;Quit&#8221; to exit.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Verify the changes by running:<br><code>fdisk -l<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, run resize2fs to apply the changes:<br><code>resize2fs \/dev\/sda3<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We are done. Verify free disk space with:<br><code>df -h<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This applies to different scenarios but perhaps most common is a virtual machine which needs more disk space. This guide assumes you have extended the &hellip;<\/p>\n","protected":false},"author":1,"featured_media":311,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-288","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-it"],"jetpack_featured_media_url":"https:\/\/tillnet.se\/wp-content\/uploads\/2025\/09\/linux-ubuntu-extend-disk-partition-more-disk-space-e1760738439483.png","_links":{"self":[{"href":"https:\/\/tillnet.se\/index.php?rest_route=\/wp\/v2\/posts\/288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tillnet.se\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tillnet.se\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tillnet.se\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tillnet.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=288"}],"version-history":[{"count":2,"href":"https:\/\/tillnet.se\/index.php?rest_route=\/wp\/v2\/posts\/288\/revisions"}],"predecessor-version":[{"id":312,"href":"https:\/\/tillnet.se\/index.php?rest_route=\/wp\/v2\/posts\/288\/revisions\/312"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tillnet.se\/index.php?rest_route=\/wp\/v2\/media\/311"}],"wp:attachment":[{"href":"https:\/\/tillnet.se\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tillnet.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tillnet.se\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}