Google Cloud

How to Mount Extra Disks On Google Cloud Engine

In this tutorial, we explain how to Mount Extra Disks On Google Cloud Engine (GCE)  / (VM Instance). If you launch Engine/Instance in GCP (Google Cloud Platform) by default extra disk is attached but you cannot use it directly.

You need to format the disk and create filesystem like if it is Linux then create an ext3/ext4/xfs filesystem and if it is windows then create the NTFS file system. In short, the filesystem needs to created by formatting the disk.

Let’s see the steps how to format and mount the extra disk on GCE

Note: Assuming that you have already created engine/instance on GCP with the extra disk.

Steps to format and mount extra disk on Compute Engine/Instance

  1. Login to the Compute Engine/Instance
  2. Check which all disk attached to Instance
In the below output you can see the extra disk will not have an entry under mount point tab.
  1. Now create filesystem by formatting the extra disk with ext4
  1. Create a directory to mount this new extra-disk which we have formatted
  1. Mount the disk to the directory “/oraprod”
  1. You can change the directory permission. Assum you want to provide write permission to all user on “/oraprod” then run below command.
  1. Command to verify the disk mount

Steps to automount disk whenever Linux reboot

You can automount disk on whenever you reboot your Linux machine. so for that, you need to add an entry in fstab

Before adding/changing fstab file best practice is to take backup.

Edit fstab file “/etc/fstab” and add disk and mount point with filesystem as mention:

This is how to automount the extra disk on Linux, now on every reboot disk is automounted to the defined directory as mention in fstab file.

This is how to Mount Extra Disks On Google Cloud Engine.

Related Articles

Leave a Reply

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


Adblock Detected

Please consider supporting us by disabling your ad blocker
%d bloggers like this: