Resizing disk on google cloud kubernetes

7/6/2018

Hi im trying to resize a disk for a pod in my kubernetes cluster,following the steps on the docs, i ssh in to the instance node to follow the steps, but its giving me an error

sudo growpart /dev/sdb 1
WARN: unknown label 
failed [sfd_dump:1] sfdisk --unit=S --dump /dev/sdb
/dev/sdb: device contains a valid 'ext4' signature; it is strongly recommended to wipe the device with wipefs(8)
 if this is unexpected, in order to avoid possible collisions
sfdisk: failed to dump partition table: Success
FAILED: failed to dump sfdisk info for /dev/sdb

i try running the commands from inside the pod but doesnt even locate the disk even tho its there

root@rc-test-r2cfg:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          59G  2.5G   56G   5% /
/dev/sdb         49G   22G   25G  47% /var/lib/postgresql/data

root@rc-test-r2cfg:/# lsblk
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb      8:16   0  96G  0 disk /var/lib/postgresql/data
sda      8:0    0  60G  0 disk
└─sda1   8:1    0  60G  0 part /etc/hosts

root@rc-test-r2cfg:/# growpart /dev/sdb 1
FAILED: /dev/sdb: does not exist

where /dev/sdb is the disk location

-- PaulMB
gcloud
google-kubernetes-engine
kubernetes

1 Answer

4/27/2019

This can now be easily done by updating the storage specification directly of the Persistent Volume Claim. See these posts for reference:

-- john
Source: StackOverflow