Sharing a persistent disk between multiple instances

You can also share a non-bootable persistent disk between multiple VM instances with a condition that it remains read-only in all of them. This occupies less overall storage in a multi-instance application and also saves the replication exercise. It also reduces billing since we use less storage. To do so, use the instances attach-disk command with gcloud and provide an instance name as well as a disk name:

gcloud compute instances attach-disk test-instance --disk sdb --mode ro  

Repeat this operation for each attachment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset