Creating and Attaching GCP Persistent Disks: StepbyStep (original) (raw)

Last Updated : 23 Jul, 2025

Creating and attaching Google Cloud Platform (GCP) Persistent Disks is an vital project whilst setting up virtual machines (VMs) and coping with storage within the GCP surroundings. Persistent Disks offer dependable, excessive-performance block storage that can be attached to VM instances. In this step-through-step manual, we will walk via the technique of making and attaching GCP Persistent Disks to a VM example.

Table of Content

What are GCP Persistent Disks?

Google Cloud Platform (GCP) Persistent Disks are long-lasting and excessive-performance block storage devices designed to be used with virtual machine (VM) instances. They are an important element of GCP's storage infrastructure, providing various types and use cases to meet the storage needs of cloud-based packages and workloads. Here, we will define the makes use of and types of GCP Persistent Disks:

What are the Uses of GCP Persistent Disks?

Types of GCP Persistent Disks

1. Standard Persistent Disks (HDD)

2. SSD Persistent Disks (Solid-State Drive):

3. Local SSDs

4. Zonal Persistent Disks

  1. **Use Case: Zonal disks are positioned in a particular availability area. They provide local redundancy inside a sector however do no longer mirror data across zones.
  2. **Redundancy: They are suitable for workloads where statistics replication to other zones is not essential.

5. Regional Persistent Disks

  1. **Use Case: Regional disks are replicated across more than one zones within a location, supplying higher availability and redundancy.
  2. **Redundancy: They are perfect for undertaking-vital workloads that require statistics resilience inside the event of a sector failure.

6. Snapshot-primarily based Persistent Disks:

  1. **Use Case: Snapshot-based totally disks are constituted of snapshots of present disks. They allow you to effectively clone disks, create backups, and release new instances from present snapshots.
  2. **Efficiency: They are useful for information management and developing a couple of copies of disks without incurring the overall storage value.

How to Create and Attach GCP Persistent Disks?

**Step 1: Navigate to the Google Cloud Console.Open a web browser and go to the Google Cloud Console.Select the project in which you need to create the Persistent Disk. You can do that via clicking on the project name on the top of the page.

Name-your-project

Select the project

**Step 2: Create a New Persistent Disk.In the left-hand navigation pane, click on Compute Engine below the Compute segment.Click on Disks in the Compute Engine section.

click-on-the-disk

Click On the Disk

Click the Create Disk button at the top of the page.

Create Disk ButtonIn the Name area, Give your new Persistent Disk a descriptive name.

Give Name and Description for Persistent Disks

Choose the Region where you want to create the disk. Regional disks are replicated for high availability, while zonal disks are positioned in a specific region.

set-location-(1)

Specify the type of disk you want to choose

Specify the type of disk

Specify the Size (GB) to your disk. This is the amount of storage you want to allocate for the disk.

size-(1)

Specify the Size (GB) to your disk

Optionally, you can upload labels and set different superior alternatives if wanted.Click the Create button to create the Persistent Disk.

create disk

**Step 3: Attach the Persistent Disk to a VM Instance.After developing the Persistent Disk, pass again to the Compute Engine phase in the left-hand navigation pane. Click on VM instances.Click on Create a VM instances

Step 3Povide the Name to new VM Instances and and assign the same region as of your disk which was created earlier.

give-name-and-set-region-of-pers-(1)

Now, Click on attach the disk button

Attach Persistent Disk

After Completing all the step you can create and attach GCP Persistent Disk

Conclusion

Creating and attaching Google Cloud Platform (GCP) Persistent Disks is a fundamental undertaking for managing storage in GCP, and it is critical for numerous programs and workloads. In this step-with the aid of-step guide, we included the procedure of creating a Persistent Disk, attaching it to a VM example, and verifying the attachment. By following these steps, you can effectively provision and manage garage resources in GCP to fulfill the requirements of your initiatives and applications.