cassandra如何处理文件系统分区

时间:2015-09-18 08:20:19

标签: cassandra cassandra-2.0

我的情况:  我有一台带有多个硬盘的服务器。

如果我在服务器上安装cassandra(2.1.9)并使用所有硬盘。 如果一个硬盘发生故障会怎么样?

  1. 它是黑名单只列出(硬盘)分区并将分区(cassandra分区)移动到其他节点或同一节点上的系统分区。
  2. 它是否会将整个节点视为失效。

1 个答案:

答案 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不会自动将数据从故障磁盘移动到正常磁盘。它需要手动干预来纠正问题。