【问题标题】:How does cassandra handle file system Partitionscassandra 如何处理文件系统分区
【发布时间】:2015-12-15 07:36:45
【问题描述】:

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

如果我在服务器上安装 cassandra(2.1.9) 并使用所有硬盘。 如果一个硬盘坏了怎么办?

  1. 是否仅将(硬盘)分区列入黑名单并将分区(cassandra 分区)移动到其他节点或同一节点上的系统分区。
  2. 是否会认为整个节点都宕机了。

【问题讨论】:

    标签: cassandra cassandra-2.0


    【解决方案1】:

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

    【讨论】:

    • 请注意,您可以在节点停止的情况下手动移动文件,并在文件位于其他文件夹后重新启动。
    猜你喜欢
    • 2017-07-17
    • 2018-03-14
    • 1970-01-01
    • 2015-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-18
    相关资源
    最近更新 更多