Increase Diskspace in Cloud Environment- no server restart
Disk space issues still exists. Although we have defined good disk space. Some bad application would outrun the estimation & cause disk full on the critical components. We recently faced issue with RabbitMQ server. Where one of the bad application has started piling data on one Queue. If we restart other application also get impacted. So needed online diskspace increase.
Get disk details
On GKE:
Setup Credentials
gcloud auth activate-service-account --key-file=test-project.json
gcloud config set
project my-project-1234
Get Name of Troubled disk
gcloud beta compute ssh
--
zone “us-central1-a”instance-10 df -h
gcloud compute instances describe instance-10 |grep
disk
Increase space to disk
gcloud compute disks resize instance-10-disk
--
size 100GBgcloud beta compute ssh
--
zone “us-central1-a”instance-10 lsblk
Increase space based on OS (Applies to all cloud)
growpart /dev/sda 1
[resize ext2, ext3, and ext4 file systems] resize2fs /dev/sda1
[resize XFS file system] xfs_growfs /dev/sda1