I tried creating the disk first via gcutil adddisk
and then assigning it to the VM when running gcutil addinstance
with the --disk
flag. However, this method still results in a 10GB partition even though I set it to 200GB on adddisk
.
Here is the disk itself:
INFO: Zone for db2-usc1a detected as us-central1-a.
+-----------------+--------------------------------------------------------+
| name | db2-usc1a |
| description | |
| creation-time | 2014-06-11T22:45:39.654-07:00 |
| zone | us-central1-a |
| status | READY |
| source-snapshot | |
| source-image | projects/centos-cloud/global/images/centos-6-v20140606 |
| source-image-id | 6290630306542078308 |
| size-gb | 200 |
+-----------------+--------------------------------------------------------+
But, as you can see, running df -h
displays it as 9.9GB:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.9G 4.3G 5.1G 46% /
tmpfs 7.3G 0 7.3G 0% /dev/shm
I have also tried to follow these instructions here: https://developers.google.com/compute/docs/disks#repartitionrootpd
However, on reboot, the VM becomes inaccessible so I can't even SSH back onto the machine.
Why is Google enforcing a 10GB image on boot? Why is it not being set to the size I have requested? More importantly, is there a way I can automate this process for our build scripts?