I've been spinning up instances on GCP without any issue until yesterday. The problem appears when I select RedHat 8 as the OS as it doesn't resize the hard drive to the input parameter (e.g. 40 GB). No matter which combination of machine and region I try, the system deploys the instance with the default size (i.e. 10 GB), which is insufficient for most applications. There seems to be some disagreement between the attached volume and the partitions. The results from the commands 'fdisk' and 'df' yield:

#sudo fdisk -l
Disk /dev/sda: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x45fed8bf

#sudo df
Filesystem     1K-blocks    Used Available Use% Mounted on
devtmpfs         1793080       0   1793080   0% /dev
tmpfs            1806916       0   1806916   0% /dev/shm
tmpfs            1806916    8504   1798412   1% /run
tmpfs            1806916       0   1806916   0% /sys/fs/cgroup
/dev/sda1       10474496 2015776   8458720  20% /
tmpfs             361380       0    361380   0% /run/user/1000

Has anyone noticed the same problem or knows how to circumvent it?

  • 1
    what's the output of 'fdisk -l'? – Chopper3 Jul 23 at 13:25
  • How big does GCP think it is? – Chopper3 Jul 23 at 16:28
  • 40 GiB (according to the GCP console) – afernandezody Jul 23 at 19:20
  • Your system has a 40 GB disk attached. That disk can be partitioned into multiple partitions. Please edit your question with the partitions that are present on your system. – John Hanley Jul 23 at 21:22
  • So you just need to expand your partitions as John says above - have a look at this previous answer of mine, it's from years ago but hopefully works out for you; serverfault.com/questions/422930/… – Chopper3 Jul 24 at 7:59

I think this is related with a known issue. When creating a new Compute Engine instance using certain images (for example some CentOS 7, RHEL 7 and RHEL 8) the boot disk does not automatically get extended to the size previously specified.

Look at this for more information.

  • I don't fully understand the technical details of your link. Maybe the key is there but why would this issue happen only for RHEL8 and not for the other OSs? In any case, it doesn't seem that they have worked on it for some time. – afernandezody Jul 23 at 15:56
  • The issue is not with the OS but the images and the mechanism used to extend them according to the size selected when you create the instance. As far as I know, the issue is affecting images with RH7 - 8 and some Centos versions. – Alex6Zam Jul 24 at 7:21
  • Hi @Alex6Zam. Thank you for your insight. I didn't mean that there is something wrong with RHEL8 but with the mechanism spinning up the instance that seems to be triggered when selecting it (haven't tried RHEL7 but I have deployed many instances with CentOS w/o this problem ever showing up). As shown above, there is some disagreement in the available space, partition size, and what GCP sees. I don't have the technical background to fully understand what is originating the issue. However, this is probably not affecting just me but most anyone trying to use RH8 as 10GiB is a pretty small space. – afernandezody Jul 24 at 13:46
  • You are right, this is affecting more people. In the link I posted in the answer there is a PR to solve it. By tracking the development of this PR you will know when the issue is solved. – Alex6Zam Jul 25 at 9:25
  • Please add a summary of the information from your link into your answer. serverfault.com/help/referencing – 0xSheepdog Jul 25 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.