【发布时间】:2015-12-15 07:36:45
【问题描述】:
我的情况: 我有一台带有多个硬盘的服务器。
如果我在服务器上安装 cassandra(2.1.9) 并使用所有硬盘。 如果一个硬盘坏了怎么办?
- 是否仅将(硬盘)分区列入黑名单并将分区(cassandra 分区)移动到其他节点或同一节点上的系统分区。
- 是否会认为整个节点都宕机了。
【问题讨论】:
我的情况: 我有一台带有多个硬盘的服务器。
如果我在服务器上安装 cassandra(2.1.9) 并使用所有硬盘。 如果一个硬盘坏了怎么办?
【问题讨论】:
行为在 cassandra.yaml 中使用 disk_failure_policy 设置进行配置。请参阅文档here。
disk_failure_policy: (Default: stop) Sets how Cassandra responds to disk failure.
Recommend settings are stop or best_effort.
die - Shut down gossip and Thrift and kill the JVM for any file system errors
or single SSTable errors, so the node can be replaced.
stop_paranoid - Shut down gossip and Thrift even for single SSTable errors.
stop - Shut down gossip and Thrift, leaving the node effectively dead,
but available for inspection using JMX.
best_effort - Stop using the failed disk and respond to requests based on
the remaining available SSTables. This means you will see obsolete data
at consistency level of ONE.
ignore - Ignores fatal errors and lets the requests fail; all file system
errors are logged but otherwise ignored. Cassandra acts as in versions
prior to 1.2.
您可以找到有关如何从磁盘故障中恢复的文档here。 Cassandra 不会自动将数据从故障磁盘移动到正常磁盘。它需要人工干预来纠正问题。
【讨论】: