-4

While creating a compute engine in google cloud , I assigned persistent disk as 50 GB. However my local disk shows as 10 GB , which is almost full. Help me increase this disk space. guide me how persistent disk(50 GB, one I created) is used here !

Snapshot of boot disk and persistent disk of 50 GB

Dhilip
  • 1
  • not sure, how to delete this question. Please ignore – Dhilip Jan 14 '16 at 07:21
  • `fdisk -l`? Does this show that you have a 10GB, or a 50GB disk attacked? – Matt Clark Jan 14 '16 at 07:37
  • The steps to resize disk partition is documented on this link (https://cloud.google.com/compute/docs/disks/persistent-disks#resizing_disk_paritions_on_linux_instances) – Faizan Jan 14 '16 at 17:18

2 Answers2

1

Almost all the OS on GCE supports automatic resizing and CentOS 6 is one of them. After increasing the disk size through Cloud Console or gcloud CLI, you need to reboot the instance to automatically recognize the new disk size.

If your OS doesn't recognized the new disk size, then you will need to follow the steps indicated at this link. The list of OS on GCE that support automatic resizing are listed in here.

Marilu
  • 296
  • 1
  • 7
0

Here are the steps in you have single xfs (/dev/sda1) partition.

First re-create your root partition, type this command:

(echo d; echo n; echo p; echo 1; echo ; echo; echo w) | sudo fdisk /dev/sda

Then restart your server. Once restarted, grow your partition

xfs_growfs /dev/sda1

Verify with:

df -h

Don`t forget to make snapshot before trying!