repartitioning disk

30 views
Skip to first unread message

Matthew Cserhati

unread,
Apr 22, 2017, 4:56:23 PM4/22/17
to gce-discussion
Hello everyone,

I have a disk which I resized to 500 GB from 10 Gb.

sudo lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   10G  0 disk 
└─sda1   8:1    0   10G  0 part /var/lib/docker/aufs
sdb      8:16   0    5G  0 disk 
└─sdb1   8:17   0    5G  0 part /home
zram0  254:0    0  768M  0 disk [SWAP]

However, it seems that the disk does not automatically repartition, even though the documentation says so:

https://cloud.google.com/compute/docs/disks/create-root-persistent-disks#repartitionrootpd

My GC runs on Debian, and the description for Debian says that it automatically repartitions.

I also tried running this command:

sudo resize2fs /dev/[DISK_ID]

entering test1 for DISK_ID.

Still, nothing happens, and my partition stays the same size.

Could anyone please help?

Thanks, Matthew

Kamran (Google Cloud Support)

unread,
Apr 22, 2017, 6:39:59 PM4/22/17
to gce-dis...@googlegroups.com
Hi Matthew,

Debian 8 (v20160418 or newer) is on the list of images that automatically resize root partitions up to 2 TB. However, after changing the size of root disk your VM instance automatically resize the partition to recognize the additional space after you restart the instance.

I hope this helps.

Sincerely,
Reply all
Reply to author
Forward
0 new messages