GCP Classroom Series – 06/Mar/2021


  • when we create a GCE VM Instance, a virtual disk is attached to it Preview
  • The copy of the virtual disk is referred as snapshot
  • Lets create one linux vm instance in gcp Preview Preview Preview Preview
  • Lets create a snapshot which is backup of the disk Preview Preview Preview
  • First snapshot is full backup of the disk, from there on all the snapshots are incremental in nature
  • Now lets login into the linux vm and install tomcat and create a snashot Preview Preview
  • If you want to take the backup of the disk periodically, we can create scheduled snapshots Preview Preview
  • If we delete older snapshots, the data of the older snapshot gets copied into newer snapshot. If we delete the newest snapshot we would have the recent data loss.
  • Lets create an instance from the snapshot Preview Preview Preview
  • Snapshots are multi-regional by default but we can create snapshots specific to a particular region.


  • Create a ubuntu vm in us-central1 region with free tier Preview
  • Navigate to the disks and verify the disk used Preview
  • Login into the vm and execute the following command
sudo df -h
sudo lsblk

Preview Preview

  • Lets try to add one more disk to this vm instance

    • Lets create an empty disk of size 10 GB in Same Zone as VM Preview

    • Lets create one more empty disk of size 10 gb in different zone Preview Preview

    • Navigate to vm instance and edit the vm instance and click on attach existing disk Preview Preview Preview Preview

  • Once the settings are saved login into vm and execute

sudo lsblk


  • Now using linux commands we can create partititions or create a file system and mount the new disk to some folder Preview Preview
  • Now try creating the same for disks created in different zone and different region.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin