1

I'm trying to resize my disk that's on google cloud from 1TB to 2 TB. I resized the disk space in google's console as instructed and:

df -h

Filesystem      Size  Used Avail Use% Mounted on
overlay          95G  7.1G   88G   8% /
tmpfs            16G     0   16G   0% /dev
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/sda1        95G  7.1G   88G   8% /etc/hosts
shm              64M     0   64M   0% /dev/shm
/dev/sdg        984G  381G  554G  41% /var/lib/data
tmpfs            16G   12K   16G   1% /run/secrets/kubernetes.io/serviceaccount
tmpfs            16G     0   16G   0% /sys/firmware

and:

lsblk

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda       8:0    0  100G  0 disk
|-sda1    8:1    0 95.9G  0 part /etc/hosts
|-sda2    8:2    0   16M  0 part
|-sda3    8:3    0    2G  0 part
|-sda4    8:4    0   16M  0 part
|-sda5    8:5    0    2G  0 part
|-sda6    8:6    0  512B  0 part
|-sda7    8:7    0  512B  0 part
|-sda8    8:8    0   16M  0 part
|-sda9    8:9    0  512B  0 part
|-sda10   8:10   0  512B  0 part
|-sda11   8:11   0    8M  0 part
`-sda12   8:12   0   32M  0 part
sdb       8:16   0    2G  0 disk
sdc       8:32   0    8G  0 disk
sdd       8:48   0   10G  0 disk
sde       8:64   0 1000G  0 disk
sdf       8:80   0   10G  0 disk
sdg       8:96   0    2T  0 disk /var/lib/data

now i tried to use resize2fs to resize and got:

resize2fs /dev/sdg

resize2fs 1.42.12 (29-Aug-2014)
open: No such file or directory while opening /dev/sdg
0

AFAIK /dev/sdg is the raw device - /dev/sdg1 is a virtual device, a partition for example.

This will show in fdisk -l. If it's not mounted you can use resize2fs on /dev/sdg1 if it's ext2, ext3 or ext4 formated other filesystems btrfs etc. are most likely are not supported.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.