New disk size must be larger than existing size

For Context: We did run out of Diskspace on one of our VM's, so I increased the Disk Space via the Google Cloud Console (Web Browser) to quickly fix the issue based on this Doc: https://cloud.google.com/compute/docs/disks/resize-persistent-disk?hl=en


But was we actually have an IaC Repository I wanted to reflect the Change in our IaC, but when doing so:  

 

 

gcloud deployment-manager deployments update infrastructure --config deployment.yaml

 

 

 I get the following error:

 

 

{
  "ResourceType": "gcp-types/compute-v1:disks",
  "ResourceErrorCode": "400",
  "ResourceErrorMessage": {
    "code": 400,
    "errors": [
      {
        "domain": "global",
        "message": "Invalid value for field 'sizeGb': '500'. New disk size '500' GiB must be larger than existing size '500' GiB.",
        "reason": "invalid"
      }
    ],
    "message": "Invalid value for field 'sizeGb': '500'. New disk size '500' GiB must be larger than existing size '500' GiB.",
    "statusMessage": "Bad Request",
    "requestPath": "https://compute.googleapis.com/compute/v1/projects/not-your-business/zones/europe-west6-a/disks/server-data/resize",
    "httpMethod": "POST"
  }
}

 

 

How can I reflect the changes I made in the Console to our IaC deplyoment?

Solved Solved
5 1 89
1 ACCEPTED SOLUTION

Hi mhauri,

 

Welcome to Google Cloud Community.

The error message you're seeing indicates that the new size that you're trying to configure is the same size as the existing one, which is not allowed.

You can try to double check your deployment.yaml configuration and make sure that the updated disk size is larger than the current disk size.

Once you've updated the disk size, you may try to run again the command

gcloud deployment-manager deployments update infrastructure --config deployment.yaml

Please do note that "You can resize an Extreme Persistent Disk only once in a 6 hour period".

I hope this information is helpful.

View solution in original post

1 REPLY 1

Hi mhauri,

 

Welcome to Google Cloud Community.

The error message you're seeing indicates that the new size that you're trying to configure is the same size as the existing one, which is not allowed.

You can try to double check your deployment.yaml configuration and make sure that the updated disk size is larger than the current disk size.

Once you've updated the disk size, you may try to run again the command

gcloud deployment-manager deployments update infrastructure --config deployment.yaml

Please do note that "You can resize an Extreme Persistent Disk only once in a 6 hour period".

I hope this information is helpful.