使用具有抢占式 google 计算实例的持久性 google 云磁盘时存在磁盘损坏风险?

Risk of disk corruption when using a persistent google cloud disk with a preemptible google compute instance?

我想使用抢占式 google 计算实例来省钱,并使用连接到实例的永久磁盘来保存数据。但我担心数据损坏的风险 as outlined in the detach-disk documentation, because it's unclear to me if the disk will be detached properly when the instance is preempted. Any advice/experiences on this? I didn't find any guidance in the google cloud documentation. I'm wondering if I could add the unmount command, sudo umount /dev/disk/by-id/[disk-name], to the preemptible instance shutdown script, but I haven't tried that yet. I could also set up frequent disk snapshots 以尽量减少数据损坏的损害,如果确实发生的话。

您应该零担心会出现磁盘损坏,因为可抢占的计算引擎被抢占了。如果在 Compute Engine 抢占期间磁盘缓冲区有可能没有被正确刷新,这个事实会在文档和论坛上大声疾呼。虽然我不知道 Compute Engine 最终是如何关闭的,但我坚信就在它最后一次呼吸之前,任何未完成的持久性磁盘写入都会被提交。