上QQ阅读APP看书,第一时间看更新
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.