[英]Risk of disk corruption when using a persistent google cloud disk with a preemptible google compute instance?
I'd like to use preemptible google compute instance to save money, and persist data using a persistent disk that is attached to the instance.我想使用抢占式谷歌计算实例来节省资金,并使用附加到实例的永久性磁盘来保存数据。 But I'm concerned about the risk of data corruption 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.
但我担心detach-disk 文档中概述的数据损坏风险,因为我不清楚当实例被抢占时磁盘是否会正确分离。 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.我想知道是否可以将卸载命令
sudo umount /dev/disk/by-id/[disk-name]
到抢占式实例关闭脚本中,但我还没有尝试过。 I could also set up frequent disk snapshots to minimize the damage of data corruption, if that does happen.我还可以设置频繁的磁盘快照,以最大程度地减少数据损坏的损害(如果确实发生)。
You should have zero concern that there will be disk corruption because a preempt-able Compute Engine is preempted.您应该零担心磁盘损坏,因为可抢占的 Compute Engine 被抢占。 If it were possible that disk buffers were not properly flushed during a Compute Engine preemption, that fact would be screamed loudly from the documentation and the forum.
如果在 Compute Engine 抢占期间磁盘缓冲区可能没有正确刷新,那么文档和论坛中会大声尖叫这一事实。 While I have no information on how the Compute Engine is ultimately shutdown, I do have a rock-solid belief that just before it breathes its last, any persistent disk writes out-standing are committed.
虽然我没有关于 Compute Engine 最终如何关闭的信息,但我坚信,就在它最后一次呼吸之前,任何未完成的永久性磁盘写入都会提交。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.