Google Cloud Platform 计算引擎实例中的本地 SSD 发生故障时会发生什么?

What happens when a local SSD fails in a Google Cloud Platform compute engine instance?

当连接到计算引擎实例的多个本地 SSD 之一发生硬件故障时会发生什么情况?具体来说:

  1. 故障是Google云平台自动检测到的吗?
  2. 是否有通知,例如通过电子邮件?
  3. 更换驱动器需要多长时间?
  4. VM是否停止,替换后重新启动?还是热插拔?
  5. 显然,该 SSD 上的数据丢失了,但是,连接到同一虚拟机的其他 SSD 上的数据会怎样?

编辑:我知道 "ephemeral" 本地 SSD 的性质,并计划在我的主要区域的不同区域的多台机器上复制我的数据,并且至少将一个复制到一个完全不同的区域。我打算使用的数据库是 "data-center/rack aware"。我特别想 documentation/information 了解 Google Cloud Platform 如何处理本地 SSD 中的硬件故障。

您可能想改用永久性磁盘,因为您的用例可能不适用:

adding local SSDs 所示:

Local SSDs are suitable only for temporary storage such as caches, processing space, or low value data. If you store important data in a local SSD device, you must also store that same data in a durable storage option.

  1. 这取决于 - 块级故障就是这样,并且直接传递给来宾。因此,您可能会在 dmesg 或类似文件中看到读取错误。如果整个设备出现故障,您会在该实例的 Cloud Logging 日志中收到 hostError。接下来会发生什么取决于您的维护政策。
  2. 从用户的角度来看,驱动器并未被替换 - 您只能获得一个新实例。 (当然 Google 会在内部更换损坏的硬件,但这不会暴露给客户)

要回答第 4 点和第 5 点有点棘手 - 当发生 hostError 自动重启时,您有一个 60 minutes recovery timeout。然而,这实际上意味着您的实例在 运行 但未启动状态下花费 60 分钟,同时试图将损坏的本地 SSD 恢复到最终失败并使用空白本地 SSD 启动。

总的来说,我建议您将实例视为故障域而不是单个磁盘,因为任何类型的问题都可能导致实例的 hostError 而不是部分故障。

我想澄清一下 #5。

如果您的 VM 遇到 host error google documentation states

If the host system experiences a host error, Compute Engine makes a best effort to reconnect to the VM and preserve the local SSD data, but might not succeed. If the attempt is successful, the VM restarts automatically. However, if the attempt to reconnect fails, the VM restarts without the data.

这意味着不能保证您能取回数据。相应地计划并将您的数据存储在更可靠的解决方案中,例如永久性磁盘或存储桶,这并不有趣。