在Greyhole池检测腐败的策略

在Greyhole池中主动检测数据损坏是否有任何好的策略?

假设发生以下事件链。

c:\> copy swiss_bank_account.txt \\greyhole\safe_documents Greyhole does its thing and replaces: safe_documents/swiss_bank_account.txt with -> /mnt/pool1/safe_documents/swiss_bank_account.txt and creates a backup file: /mnt/pool2/safe_documents/swiss_bank_account.txt /mnt/pool2 suffers a random failure, corrupting swiss_bank_account.txt - It goes un-noticed because it's the secondary. /mnt/pool1 suffers a random failure - Crap... now both my redundant copies are corrupt. 

在像Greyhole这样的JBOD风格的复制arrays中主动检测腐败有什么好策略?

除非我错了,否则即使3路复制也不是没有问题的。 在驱动器发生灾难性故障的情况下,您只能检测,而不能解决两个存活副本之间的差异。

我能想到的可行的系统是:

  1. 跨越校验和文件系统的3路复制,比如btrfs。
  2. 3路复制,并希望你所有的失败是不相关的。
  3. 平价工具的时间应用。
  4. 挂钩Greyhole运行奇偶校验工具写入。
  5. 时间扫描数据协议。

除了选项1和选项2之外,所有这些选项看起来都比我想要放入家庭服务器的工作要多得多。 有没有人有什么build议?

您认为腐败会悄然蔓延,这是文件系统和存储硬件开发人员积极努力避免的一种数据完整性损失。 机会是真的很好,块驱动程序会发现读/写有什么问题,并大声说出来,这是由上级软件(Greyhole)来处理故障。 或者如果块驱动程序没有注意到它,文件系统驱动程序将会。

我认为你担心的是, 如果宇宙射线或其他东西在不同的设备上为一个文件旋转,Greyhole如何处理这个问题呢?

你真的很烦,所以如果你担心的话,你应该select3倍的冗余。 但是,同时出现三个设备坏的可能性远远低于只有一个设备坏的可能性,所以这是一个很大的优势。

回答Greyhole特定的解决scheme:使用--checksums选项--fsck

 -k, --checksums Read ALL files in your storage pool, and check that file copies are identical. This should identify any problem you might have with your file-systems. NOTE: this can take a LONG time to complete, since it will read everything from all your drives! 

您需要确保您的服务器可以发送电子邮件,并同时使用--email-report选项,以便在完成后接收报告。 (报告也保存到磁盘,如果你喜欢的话,在/usr/share/greyhole/我想…)