{"id":834,"date":"2026-06-15T14:21:47","date_gmt":"2026-06-15T13:21:47","guid":{"rendered":"https:\/\/guillaumesblog.net\/?p=834"},"modified":"2026-06-15T14:22:03","modified_gmt":"2026-06-15T13:22:03","slug":"image-root-filesystem-too-small-lets-extend-it","status":"publish","type":"post","link":"https:\/\/guillaumesblog.net\/index.php\/image-root-filesystem-too-small-lets-extend-it\/","title":{"rendered":"Image root filesystem too small? Let&#8217;s extend it!"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In case you&#8217;ve ever launched, for example, an Oracle Linux Cloud Developer 8 image on OCI you have probably noticed that &#8220;dnf update&#8221; immediately fails with the following message.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"109\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-1.png\" alt=\"\" class=\"wp-image-836\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-1.png 719w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-1-300x45.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That is because the image was created a while ago and comes out of the box with a small storage footprint. That&#8217;s an easy issue to resolve so let&#8217;s go to the bottom of it together in this guide. This guide applies to any image.<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"590\" height=\"335\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image.png\" alt=\"\" class=\"wp-image-835\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image.png 590w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-300x170.png 300w\" sizes=\"auto, (max-width: 590px) 85vw, 590px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Thankfully the image author uses <a href=\"https:\/\/docs.redhat.com\/en\/documentation\/red_hat_enterprise_linux\/9\/epub\/configuring_and_managing_logical_volumes\/managing-lvm-volume-groups_configuring-and-managing-logical-volumes\">lvm<\/a> concepts so we can easily extend the root filesystem. Please see about configuring and managing logical volumes <a href=\"https:\/\/docs.redhat.com\/en\/documentation\/red_hat_enterprise_linux\/9\/epub\/configuring_and_managing_logical_volumes\/managing-lvm-volume-groups_configuring-and-managing-logical-volumes\">here<\/a> as your comprehension of it is a prerequisite to this article.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"911\" height=\"292\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-2.png\" alt=\"\" class=\"wp-image-838\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-2.png 911w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-2-300x96.png 300w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-2-768x246.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption class=\"wp-element-caption\">That&#8217;s annoying.. root is full already<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To do that, make sure that during VM creation you increase the size of the boot volume, or add another block volume, both of these alternatives work as we combine disk together later on. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"597\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-3-1024x597.png\" alt=\"\" class=\"wp-image-840\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-3-1024x597.png 1024w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-3-300x175.png 300w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-3-768x448.png 768w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-3.png 1192w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption class=\"wp-element-caption\">Either options would work<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In my example I go for option 1. and increase boot volume to 100GB. We see device \/dev\/sda with 100G but it looks like only 46.6G is in use (You aggregate partitions dev\/sda1, dev\/sda2, dev\/sda3).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"679\" height=\"192\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-4.png\" alt=\"\" class=\"wp-image-842\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-4.png 679w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-4-300x85.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><figcaption class=\"wp-element-caption\">Let&#8217;s make use of the remaining space<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">First step &#8211; Let&#8217;s create another partition<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fdisk \/dev\/sda<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Print the partition table from the fdisk CLI utility with &#8216;p&#8217; you shall see the 3 partitions already<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"777\" height=\"334\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-5.png\" alt=\"\" class=\"wp-image-843\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-5.png 777w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-5-300x129.png 300w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-5-768x330.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><figcaption class=\"wp-element-caption\">Three existing partitions<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now hit &#8216;n&#8217; to add a new one, press enter to select defaults and it creates an addition partition from the end of sda3 all the way to end of the disk.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"222\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-6.png\" alt=\"\" class=\"wp-image-844\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-6.png 676w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-6-300x99.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><figcaption class=\"wp-element-caption\">Additional partition now showing up<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Second step is to create a a PV, then modify the VG and the LV. It is always the same pattern and becomes easy after some practice.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"74\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-7.png\" alt=\"\" class=\"wp-image-845\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-7.png 550w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-7-300x40.png 300w\" sizes=\"auto, (max-width: 550px) 85vw, 550px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">now please type in<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@instance-python-training opc]# pvcreate \/dev\/sda4\n  Physical volume \"\/dev\/sda4\" successfully created.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It gives you<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"96\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-8.png\" alt=\"\" class=\"wp-image-846\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-8.png 570w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-8-300x51.png 300w\" sizes=\"auto, (max-width: 570px) 85vw, 570px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We now have to assigns these PVs to VGs (Volume group), there is only one of it,  ocivolume, so this is easy!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"526\" height=\"72\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-9.png\" alt=\"\" class=\"wp-image-847\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-9.png 526w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-9-300x41.png 300w\" sizes=\"auto, (max-width: 526px) 85vw, 526px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">now please type in<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@instance-python-training opc]# vgextend ocivolume \/dev\/sda4\n  Volume group \"ocivolume\" successfully extended<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It gives you the below, #PV increments to two, total size is up as well.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"562\" height=\"75\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-10.png\" alt=\"\" class=\"wp-image-848\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-10.png 562w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-10-300x40.png 300w\" sizes=\"auto, (max-width: 562px) 85vw, 562px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Check the LVs now<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"95\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-11-1024x95.png\" alt=\"\" class=\"wp-image-849\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-11-1024x95.png 1024w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-11-300x28.png 300w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-11-768x71.png 768w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-11.png 1047w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s make the second LV bigger, if you notice the root LV draws from the VG ocivolume, so please type in<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@instance-python-training opc]# lvextend -l +100%FREE \/dev\/mapper\/ocivolume-root\n  Size of logical volume ocivolume\/root changed from 35.50 GiB (9088 extents) to &lt;88.90 GiB (22758 extents).\n  Logical volume ocivolume\/root successfully resized.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The result gives you the following<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"97\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-13-1024x97.png\" alt=\"\" class=\"wp-image-851\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-13-1024x97.png 1024w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-13-300x28.png 300w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-13-768x73.png 768w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-13.png 1055w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption class=\"wp-element-caption\">Perfect!<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Third and last step, extend the file system. The OS needs to &#8216;map&#8217; this extended storage space made available, you can do so with the command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@instance-python-training opc]# xfs_growfs \/<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"959\" height=\"287\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-14.png\" alt=\"\" class=\"wp-image-852\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-14.png 959w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-14-300x90.png 300w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-14-768x230.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption class=\"wp-element-caption\">We add a considerable amount of &#8220;blocks&#8221;<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s it. We are done now, the \/ file system stands much larger and we can proceed with updates and whatever installs we have to.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"910\" height=\"316\" src=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-16.png\" alt=\"\" class=\"wp-image-854\" srcset=\"https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-16.png 910w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-16-300x104.png 300w, https:\/\/guillaumesblog.net\/wp-content\/uploads\/2026\/06\/image-16-768x267.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you are interested, I would recommend to have a look at the different type of filesystems and their pro and cons <a href=\"https:\/\/medium.com\/@extio\/a-comprehensive-guide-to-linux-file-system-types-fcb13cd7d3f3\">here<\/a>. Also, note that it is usually easy to extend a filesystem but it is not trivial when it comes to shrinking one. In general, always make use of logical volumes concepts to be able to allow for flexibility when it comes to storage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See you later!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In case you&#8217;ve ever launched, for example, an Oracle Linux Cloud Developer 8 image on OCI you have probably noticed that &#8220;dnf update&#8221; immediately fails with the following message. That is because the image was created a while ago and comes out of the box with a small storage footprint. That&#8217;s an easy issue to &hellip; <a href=\"https:\/\/guillaumesblog.net\/index.php\/image-root-filesystem-too-small-lets-extend-it\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Image root filesystem too small? Let&#8217;s extend it!&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-834","post","type-post","status-publish","format-standard","hentry","category-conversation"],"_links":{"self":[{"href":"https:\/\/guillaumesblog.net\/index.php\/wp-json\/wp\/v2\/posts\/834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guillaumesblog.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guillaumesblog.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guillaumesblog.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guillaumesblog.net\/index.php\/wp-json\/wp\/v2\/comments?post=834"}],"version-history":[{"count":7,"href":"https:\/\/guillaumesblog.net\/index.php\/wp-json\/wp\/v2\/posts\/834\/revisions"}],"predecessor-version":[{"id":858,"href":"https:\/\/guillaumesblog.net\/index.php\/wp-json\/wp\/v2\/posts\/834\/revisions\/858"}],"wp:attachment":[{"href":"https:\/\/guillaumesblog.net\/index.php\/wp-json\/wp\/v2\/media?parent=834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guillaumesblog.net\/index.php\/wp-json\/wp\/v2\/categories?post=834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guillaumesblog.net\/index.php\/wp-json\/wp\/v2\/tags?post=834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}