Reputation: 216
I am a total noob on this one. I have a google cloud SUSE instance which is running a VM image. I am trying to install a package but I think it's running out of space. What I want to do is to assign some of the 120G space to my /dev/sda1 partition. I have read the google's guide but I am not sure which section should I be following.
>df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 13G 0 13G 0% /dev
tmpfs 13G 0 13G 0% /dev/shm
tmpfs 13G 9.7M 13G 1% /run
tmpfs 13G 0 13G 0% /sys/fs/cgroup
/dev/sda1 36G 34G 0 100% /
tmpfs 2.6G 0 2.6G 0% /run/user/490
tmpfs 2.6G 0 2.6G 0% /run/user/1004
tmpfs 2.6G 0 2.6G 0% /run/user/1006
>sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 120G 0 disk
└─sda1 8:1 0 36G 0 part /
Upvotes: 3
Views: 6219
Reputation: 30083
Without reboot increase boot size in GCP cloud VM
Check first disk usage using df -h
if usage of /dev/sda1
more than 80% it's dangerous.
Update disk size on the fly
sudo growpart /dev/sda 1
sudo resize2fs /dev/sda1
df -h
Upvotes: 10
Reputation: 684
Super late to the party but using sudo growpart /dev/sda 1
worked for me
Upvotes: 2
Reputation: 1972
This is just an addition to Prateeks answer. After changing the size, you need to run (linux only) to reboot:
sudo reboot
Give it some time, close your console if you get no response. Then run df
again to see the new size.
Upvotes: 2
Reputation: 538
Increase the size of existing persistent disk:
Upvotes: 6