我的情况: 我有一台带有多个硬盘的服务器。
如果我在服务器上安装cassandra(2.1.9)并使用所有硬盘。 如果一个硬盘发生故障会怎么样?
答案 0 :(得分:2)
使用disk_failure_policy
设置在cassandra.yaml中配置行为。请参阅文档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不会自动将数据从故障磁盘移动到正常磁盘。它需要手动干预来纠正问题。