0
votes

I have created a standard persistent disk on google cloud but I am not able to mount it, if fails with

mount: you must specify the filesystem type

I have check that the disk was created correctly with "gcloud compute disks describe mydisk":

kind: compute#disk

sizeGb: '500'

status: READY

type: https://www.googleapis.com/compute/v1/projects/micro-spanner-xxx/zones/us-central1-c/diskTypes/pd-standard

zone: https://www.googleapis.com/compute/v1/projects/micro-spanner-xxx/zones/us-central1-c

A previous disk that I created in the same way can be mounted ok. What am I missing?

1

1 Answers

1
votes

You have to format the disk before mounting it. Per the docs, you can do the following:

$ sudo mkdir MOUNT_POINT
$ sudo /usr/share/google/safe_format_and_mount -m "mkfs.ext4 -F" DISK_LOCATION MOUNT_POINT

The /usr/share/google/safe_format_and_mount script exists on all standard Google Compute Engine VM images.