Standard persistent disk

412 views
Skip to first unread message

Jean El Melki

unread,
Aug 5, 2015, 12:32:17 PM8/5/15
to gce-discussion
I created a Standard persistent disk and attached it to my VM. I moved some data into it but for some reason it's all erased now. Is that supposed to happen?

According to the documentation the data gets erased if you choose the option to delete the data once the VM has been deleted. My VM has been up and running fine, the disk is still attached to it, but all the data is gone.

Is there a way to recover it?

Faizan (Google Cloud Support)

unread,
Aug 5, 2015, 6:58:12 PM8/5/15
to gce-discussion
Hello Jean,

The persistent disks provide highly reliable and redundant storage for Google Compute Engine instances. User's data on the disk is never deleted unless user decided to delete it. For more information about persistent disks you can go through this article.

The default setting for the instance is to delete the boot disk when instance is deleted. However, you can change this option if you wish to keep the disk. It can be done through Developer console->Compute Engine->VM Instances->INSTANCE page by unchecking 'Delete boot disk when instance is deleted" or through gcloud command line tool [1].

Once the data is deleted from the disk it cannot be recovered.

I hope that helps.

Faizan

Jean El Melki

unread,
Aug 5, 2015, 10:29:23 PM8/5/15
to gce-discussion
Thanks for the reply.

The disk that I was mentioning is listed under "Additional Disks" not under "Boot disk and local disks". Its delete instance is set to "Keep disk", the data within that has been erased or deleted, not by me (I'm the only user with access). Either way, the instance attached to it has not been deleted, altered, or changed in any way. Additionally, this happened to two disks each attached to another instance.

To further elaborate: I have instance1 with 10GB of bootable storage, I attached 100GB of storage called disk-1. Similarly, instance2 (10gb as well) has disk-2 attached to it with 100GB of storage. Neither instances have been deleted or changed, both disks are still attached to them. On 8/3/15 I transferred about 4GB worth of data to each disk. I logged in earlier today to transfer additional data from both instances to their respective disk to notice that the extra disks (disk-1, disk-2) have no data that I moved on the 3rd of this month.

What could cause that? Is the data able to be restored?

Ken Moore

unread,
Aug 5, 2015, 11:43:45 PM8/5/15
to gce-discussion

Hi Jean,

Could it be the case that you have at one point stopped then re-started the VM?  I only recently discovered that upon stopping and restarting a VM attached disks are not automatically re-mounted.  For a moment there I thought also that all the data in the mounted volume had been deleted but it just turned out that the disk needed to be re-mounted.  You can set the instance to auto-mount disks at startup by editing /etc/fstab (see https://wiki.debian.org/fstab).  We'll soon be deprecating the safe_format_and_mount script in favor of fstab, which means future users won't encounter this alarming and inconvenient situation. Please report back if this is what happened for you.

Ken

Jean El Melki

unread,
Aug 6, 2015, 9:10:49 AM8/6/15
to gce-discussion
Perfect!! Thank you, that was scary for a while.

For those who might encounter the problem

$ mount /dev/DEVICE_LOCATION MOUNT_POINT
Reply all
Reply to author
Forward
0 new messages