Pages - Menu

標籤

AWS (1) bash (1) Boost (2) C (2) CMake (2) Concurrency_Programming (3) CPP (37) Database (2) DNS (1) Docker (4) Docker-Compose (1) ELK (1) emacs (4) gcp (1) gdrive (1) git (1) gitbash (2) gitlab (1) kvm (4) Linux (5) MT4 (4) MT5 (4) Multicast (2) MySQL (2) Nijatrader8 (1) OpenCV (1) Python (4) QT5 (1) R (1) rdp (3) screenshot (1) ssh (3) Tabnine (1) TCP (1) TensorFlow (1) Tools (12) Ubuntu_1904 (11) Ubuntu_20_04 (5) UDP (1) VS2010 (1) VS2015 (1) VS2019 (1) WebServer (1) Win10 (1) winmerge (1) WSL (1) xrdp (1)

搜尋此網誌

2019年8月14日星期三

Increase disk space in google vps gcp

Aim

  • The default disk space is 10 GB. /dev/sda1
  • Filesystem      Size  Used Avail Use% Mounted on
    udev            1.8G     0  1.8G   0% /dev
    tmpfs           370M  876K  369M   1% /run
    /dev/sda1       9.6G  3.6G   6.0G   38% /
    tmpfs           1.9G     0  1.9G   0% /dev/shm
    tmpfs           5.0M     0  5.0M   0% /run/lock
    tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
    /dev/loop0       89M   89M     0 100% /snap/core/7270
    /dev/loop1       89M   89M     0 100% /snap/core/7396
    /dev/loop2       61M   61M     0 100% /snap/google-cloud-sdk/93
    /dev/loop3       61M   61M     0 100% /snap/google-cloud-sdk/94
    /dev/sda15      105M  3.6M  101M   4% /boot/efi
    tmpfs           370M     0  370M   0% /run/user/1001
    
  • We want to increase the disk space

Learning meterial

  • You may need to get the auth login for the first time to use gcloud
    • $ gcloud auth login
      
    • Follow the steps provided by gcloud
  • Get the DISK_NAME
    • $ gcloud compute instances describe garch-trader | grep disk
      Did you mean zone [us-central1-a] for instance: [garch-trader] (Y/n)? Y
      disks:
        source: https://www.googleapis.com/compute/v1/projects/idyllic-silo-248808/zones/us-central1-a/disks/garch-trader
      
  • Resize the disk
    • $ gcloud compute disks resize garch-trader --zone us-central1-a --size 50GB
      $ sudo growpart /dev/sda 1
      $ sudo resize2fs /dev/sda1
      
  • DONE

沒有留言:

發佈留言