Disk Resize questions about resize2fs

172 views
Skip to first unread message

Donna Kelly

unread,
Apr 15, 2016, 12:02:28 PM4/15/16
to gce-discussion
Hi;
I'm new to all of this so please excuse that I don't have the proper terminology.
I have increased my disk size from 10G to 100G through my Google Cloud console. I've read the google documents over and over. I'm not sure about the resize part through my SSH.

My conclusion is that I can run sudo resize2fs /dev/disk/XXXXXXXX/google-XXXXXXX-X and it should then recognize the increase of disk space.
I have ext4 if this helps.

If this doesn't work, will I lose my live website, or will it simply give me an error?

Many documents through a google search talk about fdisk, additional disks, etc. Some of these documents are very old. Are these steps still necessary?

Thank you in advance for any light you can shed on this.
Donna




 

George

unread,
Apr 15, 2016, 3:43:54 PM4/15/16
to gce-discussion
Hello Donna,

Depending on your Operating System, the file system might automatically resize the disk. However, if your OS didn't resize it automatically, running the resize2fs command if it fails, it shouldn't make you lose any data and it will just throw an error that the disk is busy. However, before starting the resize process I would recommend taking a snapshot of the disk for backup purposes.

You can follow this step by step guide in order to re-partition your root disk, as these steps are necessary for some OS (ex: CentOS).

I hope this helps.

Sincerely,
George

Donna Kelly

unread,
Apr 30, 2016, 11:30:40 AM4/30/16
to gce-discussion
This is to let anyone know who might feel intimidated by George's response and link.
I followed the steps in the link and it worked perfectly for me.

I was afraid of taking my site down, or on the alternative, losing everything.
None of that happened. The resizing went flawlessly for me.

Hope this helps someone else.


On Friday, April 15, 2016 at 12:02:28 PM UTC-4, Donna Kelly wrote:
Reply all
Reply to author
Forward
0 new messages