If you attached a new, blank disk to your VM, before you can use it you must format and mount the disk. If you attached a disk that already contains data, then you must mount the disk before you can use it.
Before you begin
-
Set up authentication.
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
-
Install the Google Cloud CLI, then initialize it by running the following command:
gcloud init
- Set a default region and zone.
REST
To use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
Install the Google Cloud CLI, then initialize it by running the following command:
gcloud init
-
Connect to the VM
Go to the VM instances page.
Click the RDP button next to the VM that has the new blank disk attached. The browser opens an RDP connection to the instance.
Format and mount a non-boot disk on a Windows VM
Use the Windows Disk Management utility to format and mount the new disk on a Windows VM.
Right-click the Windows Start button and select Disk Management.
Disk Management prompts you to select a partitioning scheme for the new disk. Select GPT and click OK.
After the disk initializes, right-click the unallocated disk space and select New Simple Volume.
Follow the instructions in the New Simple Volume Wizard to configure the new volume. You can use any partition format that you like, but for this example select
NTFS
. Also, check Perform a quick format to speed up the formatting process. Optionally, set the cluster size in the Allocation unit size field. The cluster size limits the maximum size of the partition. Keep this in mind if you try to resize the zonal persistent disk and this partition later.After you complete the wizard and the volume is formatted, check the
Status
column on the list of attached disks to ensure that the new disk has aHealthy
status.
You can now write files to the disk.
What's next
- Learn how to resize your persistent disks.
- Learn how to regularly back up your disks using snapshots to prevent unintended data loss.