简体   繁体   English

具有一个根持久磁盘的多个GCE实例

[英]Multiple GCE instances with one root persistent disk

I finally got into Google Compute Engine today! 我今天终于进入了Google Compute Engine! I am confused about one point and I fear that my gut instinct is correct but I wanted to make sure. 我对一点感到困惑,我担心我的直觉是正确的,但我想确定。 I was fooling around with the f1-micro instance because I am cheap and don't want to accidentally wind up with a several hundred dollar bill (thanks Windows Azure!) and these instances do not have a scratch disk, instead you have to create a persistent disk and use it as a root disk to boot off of. 我正在讨论f1-micro实例,因为我很便宜并且不想意外地收到数百美元的账单(感谢Windows Azure!)而且这些实例没有临时磁盘,而是你必须创建一个永久磁盘并将其用作根磁盘来启动。 That's fine, but when you create the disk automatically it creates a 10GB disk. 这很好,但是当你自动创建磁盘时,它会创建一个10GB的磁盘。 I read that you can attach more than one instance to a persistent disk but that the disk must be read only mode. 我读过您可以将多个实例附加到永久磁盘,但磁盘必须是只读模式。 Since it doesn't make much sense to have a boot disk be read only, I don't think it's going to be possible to attach multiple instances to a root disk. 由于将引导磁盘设置为只读没有多大意义,我认为不可能将多个实例连接到根磁盘。 I tried and it the result was an error. 我试过,结果是错误。 The error was about creating multiple instances of a compute instance so I might have had the command wrong. 错误是关于创建计算实例的多个实例,所以我可能有错误的命令。 Does anyone know if it is possible to create a root persistent disk and then attach multiple compute instances to it? 有谁知道是否有可能创建一个根持久性磁盘,然后将多个计算实例附加到它?

You need a separate root persistent disk for each running instance. 每个正在运行的实例都需要一个单独的根持久性磁盘。 You can use snapshots to create additional copies of an existing persistent disk. 您可以使用快照创建现有永久磁盘的其他副本。

In theory you could boot from a read-only device with a small read-write overlayfs that will absorb the writes. 从理论上讲,您可以从只读设备启动,该设备具有吸收写入的小型读写覆盖。 This is similar to how you boot a physical host from a USB drive. 这类似于从USB驱动器启动物理主机的方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM