Persistent Disks offer reasonable performance with high availability and durability.
Warning:
When detaching a disk from an instance where the VM is still running, it is critical to unmount the disk from the VM to avoid potential data loss. Unmount the volume by using the umount command:
sudo umount /dev/vdb
If the disk is detached from the instance before a successful umount command is run, the disk is at risk of data loss. In some rare cases, the VM may exhibit unexpected behavior, such as a VM crash leading to loss of ephemeral disk data as well.
Question 1: What's the sizing of a persistent disk?
Answer:
You can create individual persistent disks ranging in size from 1 GiB to 10 TiB.
Question 2: How many persistent disks can I attach to a VM?
Answer:
You can attach up to 16 persistent disks, including the OS disk, which is automatically attached by default.
Question 3: What are the limitations with persistent disks?
Answer:
1. Persistent disks can only be attached to a single instance at a time in read-write mode, but can be attached to multiple VMs in read-only mode.
2. Multi-attach must be configured in the CLI or Terraform, as the Console UI only defaults to read-write attach.
3. Persistent disks can only be increased in size. Resizing of persistent disks cannot be done while the disk is attached to the VM.
4. Persistent disks should always be unmounted before detaching them from a VM. Failing to unmount the disk first can lead to VM crashes and potential data loss on both persistent and ephemeral disks.
4. OS disks disks cannot currently be resized.
Question 4: What's the pricing for persistent disks?
| Type | Pricing |
| persistent-disk | $0.08/GiB/month for provisioned storage |