mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
1410 lines
53 KiB
HTML
1410 lines
53 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html lang="en">
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<meta name="description" content="A backup program for disk arrays. It stores parity information of your data and it recovers from up to six disk failures">
|
|
<meta name="keywords" content="snapraid snapshot raid backup disk array redundancy parity">
|
|
<meta name="author" content="Andrea Mazzoleni">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" type="text/css" href="style.css">
|
|
<title>SnapRAID</title>
|
|
|
|
<!-- Goole Analytics 4 -->
|
|
<!-- Google tag (gtag.js) -->
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-W1Z5FKHYQ4"></script>
|
|
<script>
|
|
window.dataLayer = window.dataLayer || [];
|
|
function gtag(){dataLayer.push(arguments);}
|
|
gtag('js', new Date());
|
|
|
|
gtag('config', 'G-W1Z5FKHYQ4');
|
|
</script>
|
|
|
|
<!-- Goole Universal Analytics -->
|
|
<script type="text/javascript">
|
|
|
|
var _gaq = _gaq || [];
|
|
_gaq.push(['_setAccount', 'UA-21967501-1']);
|
|
_gaq.push(['_trackPageview']);
|
|
|
|
(function() {
|
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
})();
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="header">
|
|
<img src="index.jpg" width="1200" height="150" alt="Title">
|
|
</div>
|
|
<div id="menu">
|
|
<a href="/">About</a>
|
|
<a href="download">Download</a>
|
|
<a href="design">Design</a>
|
|
<a href="compare">Compare</a>
|
|
<a href="faq">FAQ</a>
|
|
<a href="manual">Manual</a>
|
|
<a href="https://sourceforge.net/p/snapraid/discussion/1677233/">Forum</a>
|
|
<a href="authors">Authors</a>
|
|
</div>
|
|
<div id="main">
|
|
|
|
|
|
|
|
<p>
|
|
Frequently Asked Questions for <span class="bold">SnapRAID</span>.
|
|
</p>
|
|
|
|
<h3>General</h3>
|
|
|
|
<ul>
|
|
<li><a href="#whatisit">What's SnapRAID?</a></li>
|
|
<li><a href="#diffraid">How is it different than RAID?</a></li>
|
|
<li><a href="#difffile">How is it different than ZFS/Btrfs snapshots and NTFS Shadow Copy?</a></li>
|
|
<li><a href="#diffbak">How is it different than other backup solutions?</a></li>
|
|
<li><a href="#adv">What are the advantages of SnapRAID compared to similar solutions like unRAID/FlexRAID/Windows Storage Spaces?</a></li>
|
|
<li><a href="#cost">How much does it cost?</a></li>
|
|
<li><a href="#supp">How to get support?</a></li>
|
|
<li><a href="#gui">Has SnapRAID a GUI?</a></li>
|
|
<li><a href="#enc">Does SnapRAID provide encryption, virtual views/storage pooling, SMART monitoring and Power control?</a></li>
|
|
<li><a href="#bakhome">Is SnapRAID suitable to backup the home/My Documents directory?</a></li>
|
|
<li><a href="#bakos">Is SnapRAID suitable to backup the boot OS disk?</a></li>
|
|
<li><a href="#hashonly">Can SnapRAID hash files wihout parity computation?</a></li>
|
|
</ul>
|
|
|
|
|
|
<h3>Setup</h3>
|
|
|
|
<ul>
|
|
<li><a href="#howmanypar">Do I need one or more parity disks?</a></li>
|
|
<li><a href="#fs">Which file-system is recommended for SnapRAID ?</a></li>
|
|
<li><a href="#hardware">Which hardware configuration is recommended?</a></li>
|
|
<li><a href="#cpu">Is a multi-core CPU recommended?</a></li>
|
|
<li><a href="#bit64">Is a 64 bit operating system recommended?</a></li>
|
|
<li><a href="#mem">How much memory SnapRAID requires to run?</a></li>
|
|
<li><a href="#smart">Do I have to check the SMART attributes of my disks?</a></li>
|
|
<li><a href="#multios">Is it possible to use SnapRAID in a dual boot configuration, like Windows and Linux?</a></li>
|
|
</ul>
|
|
|
|
|
|
<h3>Configuration</h3>
|
|
|
|
<ul>
|
|
<li><a href="#fcontent">What's the SnapRAID 'content' file?</a></li>
|
|
<li><a href="#fparity">What are the SnapRAID 'parity' and 'N-parity' files?</a></li>
|
|
<li><a href="#samba">How to configure SAMBA to share the Pool directory</a></li>
|
|
<li><a href="#winmanydisk">How to use more disks than drive letters in Windows?</a></li>
|
|
</ul>
|
|
|
|
|
|
<h3>Use</h3>
|
|
|
|
<ul>
|
|
<li><a href="#guidelines">What are the most important things to do to prevent damages?</a></li>
|
|
<li><a href="#adddatadisk">How can I add an additional data disk to an existing array?</a></li>
|
|
<li><a href="#remdatadisk">How can I remove a data disk from an existing array?</a></li>
|
|
<li><a href="#addpardisk">How can I add, or remove, a parity disk to an existing array?</a></li>
|
|
<li><a href="#checkdisk">How can I verify a single data disk?</a></li>
|
|
<li><a href="#repdatadisk">How can I replace a data disk?</a></li>
|
|
<li><a href="#reppardisk">How can I replace a parity disk?</a></li>
|
|
<li><a href="#move">How can I safely move files from one disk to another?</a></li>
|
|
<li><a href="#defrag">Can I defragment the data and parity disks?</a></li>
|
|
<li><a href="#ionice">How can I make SnapRAID nicer with other processes?</a></li>
|
|
<li><a href="#upgrade">How can I upgrade to a newer version of SnapRAID ?</a></li>
|
|
</ul>
|
|
|
|
|
|
<h3>Recover</h3>
|
|
|
|
<ul>
|
|
<li><a href="#undelete">How can I undelete a just deleted file?</a></li>
|
|
<li><a href="#addandbreak">What happen if I add files and a disk breaks before I have updated the parity with "sync"?</a></li>
|
|
<li><a href="#delandbreak">What happen if I delete files and a disk breaks before I have updated the parity with "sync"?</a></li>
|
|
<li><a href="#syncandbreak">What happen if a disk breaks during a "sync" ?</a></li>
|
|
<li><a href="#dataerror">What are and how to fix "Data errors" in "sync"?</a></li>
|
|
<li><a href="#log">How can I store in a file all the messages from a check and fix command</a></li>
|
|
<li><a href="#recconf">How can I recover the snapraid.conf file</a></li>
|
|
</ul>
|
|
|
|
|
|
<h3>Tech</h3>
|
|
|
|
<ul>
|
|
<li><a href="#checkinfo">If the SnapRAID "check" command says it's all OK. Is it really OK?</a></li>
|
|
<li><a href="#checksum">What integrity checksum is used?</a></li>
|
|
<li><a href="#checksuminfo">Why integrity checksum are important?</a></li>
|
|
<li><a href="#syncbreakinfo">How can SnapRAID recover also if a disk break during a 'sync'?</a></li>
|
|
<li><a href="#syncaccess">Does SnapRAID allow to access data disks during a 'sync'?</a></li>
|
|
<li><a href="#retryop">Does SnapRAID retry reads or writes if a disk is not working?</a></li>
|
|
<li><a href="#lock">What's the snapraid.content.lock file?</a></li>
|
|
<li><a href="#subsecond">What's the notice about zero sub-second timestamp?</a></li>
|
|
</ul>
|
|
|
|
|
|
<h3>Performance</h3>
|
|
|
|
<ul>
|
|
<li><a href="#perfhardware">Which is the optimal hardware configuration to get the best performance?</a></li>
|
|
<li><a href="#blocksize">Which is the optimal blocksize to get the best performance?</a></li>
|
|
<li><a href="#readahead">Which is the optimal Linux read-ahead size to get the best performance?</a></li>
|
|
<li><a href="#speed">How fast are the hash and parity computation?</a></li>
|
|
</ul>
|
|
|
|
|
|
<h3>Known Problems</h3>
|
|
|
|
<ul>
|
|
<li><a href="#panic">Why does my machine reboots or crashes while SnapRAID is running?</a></li>
|
|
<li><a href="#oomkiller">Why in Linux does SnapRAID abort without any error message?</a></li>
|
|
<li><a href="#pargrowerror">Why in 'sync' do I get the error 'Failed to grow parity file 'xxx' to size xxx due lack of space.'?</a></li>
|
|
<li><a href="#dupinode">Why do I get the error 'Internal inode xxx inconsistency...'?</a></li>
|
|
<li><a href="#xls">Why with .xls files do I get the error 'Data change at file...'?</a></li>
|
|
<li><a href="#truecrypttimestamp">Why are VeraCrypt containers never saved?</a></li>
|
|
</ul>
|
|
|
|
|
|
<h2>General</h2>
|
|
|
|
<h3 id="whatisit">What's SnapRAID?</h3>
|
|
<p>
|
|
SnapRAID is an application able to make a partial backup of your disk array.
|
|
If some of the disks of your array fail, even if they are completely broken, you will be able to recover their content.
|
|
It's only a partial backup, because it doesn't allow to recover from a failure of the whole array,
|
|
but only if the number of failed disks are under a predefined limit.
|
|
</p>
|
|
|
|
<h3 id="diffraid">How is it different than RAID?</h3>
|
|
<p>
|
|
RAIDs are mirroring solutions that propagate changes immediately to the parity data.
|
|
In this sense, RAIDs are not backups, because they don't allow to restore an old state of the array.
|
|
</p>
|
|
<p>
|
|
SnapRAID is instead more similar at a backup solution, and you can restore the state of the last backup.
|
|
For example, with SnapRAID, if you delete by accident a file, you can easily restore it.
|
|
</p>
|
|
<p>
|
|
Others advantages over traditional RAID5/6 solutions are:
|
|
</p>
|
|
<ul>
|
|
<li>All your data is hashed to ensure data integrity and to avoid silent corruption.</li>
|
|
<li>If the failed disks are too many to allow a recovery, you lose the data only on the failed disks.
|
|
All the data in the other disks is safe.</li>
|
|
<li>If you accidentally delete some files in a disk, you can recover them.</li>
|
|
<li>You can start with already filled disks.</li>
|
|
<li>The disks can have different sizes.</li>
|
|
<li>You can add disks at any time.</li>
|
|
<li>It doesn't lock-in your data. You can stop using SnapRAID at any time
|
|
without the need to reformat or move data.</li>
|
|
<li>To access a file, a single disk needs to spin, saving power and
|
|
producing less noise.</li>
|
|
<li>You can have up to six parity levels compared to the one of RAID5 and the two of RAID6.</li>
|
|
</ul>
|
|
<p>
|
|
Obviously RAID has other advantages, like having a better speed due data striping.
|
|
What is best for you, depends on your specific use case.
|
|
</p>
|
|
|
|
<h3 id="difffile">How is it different than ZFS/Btrfs snapshots and NTFS Shadow Copy?</h3>
|
|
<p>
|
|
SnapRAID creates a file-system snapshot conceptually similar at other snapshot solutions.
|
|
The difference is that the purpose of SnapRAID is to be able to recover a disk to the saved state
|
|
after a complete disk failure.
|
|
</p>
|
|
<p>
|
|
SnapRAID is more similar at the RAID-Z/RAID functionality of ZFS/Btrfs.
|
|
Compared to them, SnapRAID has the following advantages:
|
|
</p>
|
|
<ul>
|
|
<li>If the failed disks are too many to allow a recovery, you lose the data only on the failed disks.
|
|
All the data in the other disks is safe.</li>
|
|
<li>You can start with already filled disks.</li>
|
|
<li>You can add disks at any time (not possible with ZFS, but possible with Btrfs).</li>
|
|
<li>It doesn't lock-in your data. You can stop using SnapRAID at any time
|
|
without the need to reformat or move data.</li>
|
|
<li>To access a file, a single disk needs to spin, saving power and
|
|
producing less noise.</li>
|
|
<li>You can have up to six parity levels compared to the three of ZFS RAID-Z and the two of Btrfs RAID-5/6.</li>
|
|
</ul>
|
|
<p>
|
|
Obviously ZFS/Btrfs have other advantages, like being real-time solutions.
|
|
What is best for you, depends on your specific use case.
|
|
</p>
|
|
|
|
<h3 id="diffbak">How is it different than other backup solutions?</h3>
|
|
<p>
|
|
With a normal backup solution you always need as much space as the full disk array for the backup.
|
|
With SnapRAID you need only one additional parity disk to be able to recover the most common case of a single disk failure.
|
|
Adding more parity disks, you can recover from more disk failures.
|
|
</p>
|
|
<p>
|
|
Note that only a full backup allows to recover from a complete failure of the disk array and
|
|
it's surely the preferred solution if you can afford it.
|
|
SnapRAID is a good option if a full backup is not a possible solution.
|
|
</p>
|
|
|
|
<h3 id="adv">What are the advantages of SnapRAID compared to similar solutions like unRAID/FlexRAID/Windows Storage Spaces?</h3>
|
|
<p>
|
|
You can see the <a href="compare">Compare</a> page to see it compared to other similar solutions.
|
|
</p>
|
|
<p>
|
|
A strong advantage of SnapRAID is the <span class="bold">integrity and silent error management</span> that is at the same level (if not better)
|
|
of the ZFS and Btrfs file-systems. Instead, unRAID and Storage Space have no integrity check at all!
|
|
FlexRAID is at least able to report silent errors, <a href="http://forum.flexraid.com/index.php/topic,3233.0.html">but not to fix them</a>.
|
|
</p>
|
|
|
|
<h3 id="cost">How much does it cost?</h3>
|
|
<p>
|
|
Nothing. It's a <a href="https://en.wikipedia.org/wiki/Free_software">FreeSoftware</a> application released with the GPLv3 license.
|
|
</p>
|
|
|
|
<h3 id="supp">How to get support?</h3>
|
|
<p>
|
|
Go to the <a href="https://sourceforge.net/p/snapraid/discussion/1677233/">Forum</a>.
|
|
</p>
|
|
|
|
<h3 id="gui">Has SnapRAID a GUI?</h3>
|
|
<p>
|
|
No. SnapRAID is a command line application.
|
|
But there is the <a href="http://elucidate.codeplex.com/">Elucidate</a> external GUI,
|
|
and a plugin for <a href="http://www.openmediavault.org/">OpenMediaVault</a>.
|
|
</p>
|
|
|
|
<h3 id="enc">Does SnapRAID provide encryption, virtual views/storage pooling, SMART monitoring and Power control?</h3>
|
|
<p>
|
|
SnapRAID provides a basic virtual views/storage pooling solution, but it's also compatible
|
|
with any other pooling solutions.
|
|
</p>
|
|
<p>
|
|
For encryption, SMART monitoring, Power control and Data Recovery you can use other tools.
|
|
Here some suggestions:
|
|
</p>
|
|
<table class="compare">
|
|
<tr><th></th><th>Linux</th><th>Windows</th><th>Mac OS X</th></tr>
|
|
<tr>
|
|
<td>Encryption</td>
|
|
<td>
|
|
<a href="http://en.wikipedia.org/wiki/Dm-crypt">dmcrypt/LUKS</a><br>
|
|
(<a href="http://zackreed.me/encrypted-snapraid/">tutorial</a>)
|
|
</td>
|
|
<td>
|
|
<a href="http://en.wikipedia.org/wiki/VeraCrypt">VeraCrypt</a>,
|
|
<a href=" http://en.wikipedia.org/wiki/FreeOTFE">FreeOTFE</a></td>
|
|
<td>
|
|
<!--
|
|
Discontinued? 28/5/2014
|
|
<a href="http://en.wikipedia.org/wiki/TrueCrypt">TrueCrypt</a>
|
|
-->
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Virtual views/storage pooling</td>
|
|
<td>
|
|
|
|
<a href="https://github.com/trapexit/mergerfs">mergerfs</a>
|
|
(<a href="http://zackreed.me/mergerfs-another-good-option-to-pool-your-snapraid-disks/">tutorial</a>),
|
|
|
|
<a href="http://romanrm.ru/en/mhddfs">mhddfs</a>
|
|
(<a href="http://zackreed.me/snapraid-with-mhddfs/">tutorial</a>),
|
|
|
|
<a href="http://aufs.sourceforge.net/">aufs</a>,
|
|
<a href="http://www.greyhole.net/">Greyhole</a>
|
|
</td>
|
|
<td>
|
|
<a href="http://liquesce.codeplex.com/">Liquesce (free, BETA)</a>,
|
|
<a href="http://stablebit.com/DrivePool">DrivePool ($$)</a>,
|
|
<!--
|
|
Dead site?
|
|
<a href="http://www.poolit.com/">poolIt ($$)</a>,
|
|
-->
|
|
<a href="http://www.poolhd.com/">PoolHD ($$)</a>,
|
|
<a href="http://www.drivebender.com/">DriveBender ($$)</a>
|
|
</td>
|
|
<td>
|
|
<!--
|
|
Dead site?
|
|
<a href="http://www.poolit.com/">poolIt ($$)</a>
|
|
-->
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SMART monitor</td>
|
|
<td><a href="http://en.wikipedia.org/wiki/Smartmontools">smartmontools</a>,
|
|
<a href="http://gsmartcontrol.berlios.de/">GSmartControl</a>
|
|
</td>
|
|
<td><a href="http://en.wikipedia.org/wiki/Smartmontools">smartmontools</a>,
|
|
<a href="http://gsmartcontrol.berlios.de/">GSmartControl</a>,
|
|
<a href="http://crystalmark.info/software/CrystalDiskInfo/index-e.html">CrystalDiskInfo</a>
|
|
</td>
|
|
<td><a href="http://en.wikipedia.org/wiki/Smartmontools">smartmontools</a>,
|
|
<a href="http://gsmartcontrol.berlios.de/">GSmartControl</a>,
|
|
<a href="http://www.corecode.at/smartreporter/">SMARTReporter</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Power Control</td>
|
|
<td><a href="http://en.wikipedia.org/wiki/Hdparm">hdparm</a></td>
|
|
<td><a href="http://en.wikipedia.org/wiki/Hdparm">hdparm</a></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Data recovering</td>
|
|
<td>
|
|
<a href="http://www.gnu.org/software/ddrescue/">ddrescue</a>,
|
|
<a href="http://safecopy.sourceforge.net/">safecopy</a>,
|
|
<a href="http://www.garloff.de/kurt/linux/ddrescue/">dd_rescue</a>
|
|
</td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h3 id="bakhome">Is SnapRAID suitable to backup the home/My Documents directory?</h3>
|
|
<p>
|
|
No. If you have a limited amount of data that can be easily saved in an external USB HD,
|
|
or in online backup services, it doesn't make sense to use SnapRAID.
|
|
SnapRAID should be used when you have to backup a <b>very large</b> amount of data,
|
|
many Tera bytes, and a full backup copy of a such amount of data is not possible
|
|
in any other way.
|
|
</p>
|
|
|
|
<h3 id="bakos">Is SnapRAID suitable to backup the boot OS disk?</h3>
|
|
<p>
|
|
No. For the disk used for booting your machine and containing the OS files,
|
|
it's better to use another solution, like RAID1 or a mirror copy.
|
|
SnapRAID needs an OS to run, and then it cannot recover the OS if the OS is missing.
|
|
</p>
|
|
|
|
|
|
<h3 id="hashonly">Can SnapRAID hash files wihout parity computation?</h3>
|
|
<p>
|
|
No. It's not possible to use SnapRAID to only hash files. The hashing used by SnapRAID is meant to be used
|
|
in combination of parity computation, and it's not the best implementation for a hash only solution.
|
|
</p>
|
|
<p>
|
|
You can find a list of file verification tools at:
|
|
<a href="https://en.wikipedia.org/wiki/Comparison_of_file_verification_software">Wikipedia: Comparison_of_file_verification_software</a>.
|
|
</p>
|
|
|
|
<h2>Setup</h2>
|
|
|
|
For a setup example in Ubuntu 14.04 you can check the <a href="http://zackreed.me/setting-up-snapraid-on-ubuntu/">SnapRAID Zack's tutorial</a>.
|
|
|
|
<h3 id="howmanypar">Do I need one or more parity disks?</h3>
|
|
<p>
|
|
As a rule of thumb you can stay with one parity disk (RAID5) with up to four data disks,
|
|
and then using one parity disk for each group of seven data disks, like in the table:
|
|
</p>
|
|
|
|
<table class="download">
|
|
<tr><th>Parities</th><th>Data disks</th></tr>
|
|
<tr>
|
|
<td>1/Single Parity/RAID5</td>
|
|
<td>2 - 4</td>
|
|
</tr>
|
|
<tr>
|
|
<td>2/Double Parity/RAID6</td>
|
|
<td>5 - 14</td>
|
|
</tr>
|
|
<tr>
|
|
<td>3/Triple Parity</td>
|
|
<td>15 - 21</td>
|
|
</tr>
|
|
<tr>
|
|
<td>4/Quad Parity</td>
|
|
<td>22 - 28</td>
|
|
</tr>
|
|
<tr>
|
|
<td>5/Penta Parity</td>
|
|
<td>29 - 35</td>
|
|
</tr>
|
|
<tr>
|
|
<td>6/Hexa Parity</td>
|
|
<td>36 - 42</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>
|
|
This table takes into account that more parity levels also help to recover from unsynced array,
|
|
and that likely you are running all the disks in the same box and environment, meaning that
|
|
their failures could be correlated.
|
|
</p>
|
|
|
|
<p>
|
|
Take care that multiple failures happen. At now the worst case reported in the SnapRAID history,
|
|
is a <a href="https://sourceforge.net/p/snapraid/discussion/1677233/thread/eca5ed3d/">four disks failure, successfully recovered using four parities</a>.
|
|
</p>
|
|
|
|
<p>
|
|
Some interesting articles about number of parity levels and failure rate of disks are:
|
|
<a href="http://www.zdnet.com/blog/storage/why-raid-5-stops-working-in-2009/162">Why RAID 5 stops working in 2009</a>,
|
|
<a href="http://www.zdnet.com/blog/storage/why-raid-6-stops-working-in-2019/805">Why RAID 6 stops working in 2019</a>,
|
|
<a href="http://storagemojo.com/2010/02/27/does-raid-6-stops-working-in-2019/">Does RAID 6 stop working in 2019?</a>,
|
|
<a href="http://queue.acm.org/detail.cfm?id=1670144">Triple-Parity RAID and Beyond</a>,
|
|
<a href="http://blog.backblaze.com/2013/11/12/how-long-do-disk-drives-last/">How long do disk drives last?</a>.
|
|
</p>
|
|
|
|
<h3 id="fs">Which file-system is recommended for SnapRAID ?</h3>
|
|
<p>
|
|
For the data disks, follow these suggestions:
|
|
</p>
|
|
|
|
<table class="download">
|
|
<tr><th>Data</th><th>Result</th></tr>
|
|
<tr>
|
|
<td>Any</td>
|
|
<td>OK. In general you can use whatever file-sytem you like. Just see the following notes for some exceptions.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Btrfs</td>
|
|
<td>OK. Ensure to build SnapRAID with the libblkid library to get UUID support.
|
|
You will be warned at every run if this doesn't happen.
|
|
Note that multiple Btrfs snapshots are not supported.
|
|
</td>
|
|
</tr>
|
|
<td>ZFS</td>
|
|
<td>Partial. You won't get UUID support, but this doesn't prevent the use of the core SnapRAID functionalities.
|
|
Note that multiple ZFS snapshots are not supported.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>ReiserFS</td>
|
|
<td>Unsure. Where are <a href="https://sourceforge.net/p/snapraid/discussion/1677233/thread/194dee16">reports</a>
|
|
of speed increase when switching from ReiserFS to other file-system.
|
|
ext4 and XFS are anyway better. Use them instead.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>FAT</td>
|
|
<td>Unsure. There are <a href="https://sourceforge.net/p/snapraid/discussion/1677233/thread/455e8d63">reports</a>
|
|
of duplicate inodes cases. NTFS is anyway a lot faster. Use it instead.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>ReFS</td>
|
|
<td>No. ReFS uses <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa363788%28v=vs.85%29.aspx">128 bit inodes</a>,
|
|
and SnapRAID doesn't support them yet.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>
|
|
For the parity disks, follow these suggestions:
|
|
</p>
|
|
|
|
<table class="download">
|
|
<tr><th>Parity</th><th>Result</th></tr>
|
|
<tr>
|
|
<td>ext3</td>
|
|
<td>No. It doesn't support the <a href="http://www.kernel.org/doc/man-pages/online/pages/man2/fallocate.2.html">fallocate()</a> command needed to allocated the parity files.
|
|
You can anyway use it if you limit the use of the parity disk to contain only the parity file.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>ext4</td>
|
|
<td>OK if the disks are NOT bigger than 16 TB. The parity is stored in a single big file, and ext4 has a upper limit of 16 TB for file size.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>XFS</td>
|
|
<td>OK</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Btrfs</td>
|
|
<td>OK. But ensure to build SnapRAID with the libblkid library to get UUID support.
|
|
You will be warned at every run if this doesn't happen.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>JFS</td>
|
|
<td>No. It doesn't support the <a href="http://www.kernel.org/doc/man-pages/online/pages/man2/fallocate.2.html">fallocate()</a> command needed to allocated the parity files.
|
|
<br>
|
|
It also doesn't seem to implement at the best the <a href="http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html">posix_fadvise()</a> command.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>ReiserFS</td>
|
|
<td>Unsure. Where are <a href="https://sourceforge.net/p/snapraid/discussion/1677233/thread/194dee16">reports</a>
|
|
of speed increase when switching from ReiserFS to other file-system.
|
|
ext4 and XFS are anyway better. Use them instead.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>NTFS</td>
|
|
<td>OK in Windows. No in Linux, as it doesn't support <a href="http://www.kernel.org/doc/man-pages/online/pages/man2/fallocate.2.html">fallocate()</a> command needed to allocated the parity files.
|
|
You can anyway use it if you limit the use of the parity disk to contain only the parity file.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>FAT</td>
|
|
<td>No. You cannot store files bigger than 4 GB. It's also not journaled. Use NTFS instead.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>HFS+</td>
|
|
<td>OK</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p>
|
|
In Linux, to get more space for the parity, it's recommended to format the parity file-system with the <em>-m 0 -T largefile4</em> options.
|
|
Like:
|
|
</p>
|
|
<pre>mkfs.ext4 -m 0 -T largefile4 DEVICE</pre>
|
|
<p>
|
|
On a 8 TB disk you can save about 400 GB. This is also expected to be as fast as the default, if not faster.
|
|
</p>
|
|
|
|
<h3 id="hardware">Which hardware configuration is recommended?</h3>
|
|
<p>
|
|
For best performance it's recommended to have all the disks connected with SATA and not with USB.
|
|
</p>
|
|
<p>
|
|
Check <a href="http://lime-technology.com/forum/index.php?topic=7998.0">Raj's Prototype Builds</a>
|
|
for some examples of hardware setups.
|
|
</p>
|
|
<p>
|
|
For choosing harddisk, you can check <a href="https://www.backblaze.com/blog/what-hard-drive-should-i-buy/">Backblaze's What Hard Drive Should I Buy?</a>,
|
|
and <a href="https://www.backblaze.com/blog/enterprise-drive-reliability/">Backblaze's Enterprise Drives: Fact or Fiction?</a>.
|
|
</p>
|
|
|
|
<h3 id="cpu">Is a multi-core CPU recommended?</h3>
|
|
<p>
|
|
No. SnapRAID is usually not CPU bound. The limiting factor is the read performance from disks.
|
|
So, also a single core CPU should be enough.
|
|
</p>
|
|
<p>
|
|
For example, in my system I get a combined read speed of 400 MiB/s,
|
|
but SnapRAID is able to hash at 12000 MiB/s in a single core.
|
|
</p>
|
|
|
|
<h3 id="bit64">Is a 64 bit operating system recommended?</h3>
|
|
<p>
|
|
Yes. SnapRAID works better in a 64 bit operating system. It can access more than 4 GiB of memory,
|
|
and use faster hashing and parity algorithms.
|
|
Anyway, if you have less than 30 TB of data, it performs very well also using a 32 bit
|
|
operating system.
|
|
</p>
|
|
|
|
<h3 id="mem">How much memory SnapRAID requires to run?</h3>
|
|
<p>
|
|
Approximatively, SnapRAID requires 1 GiB of memory for 16 TB of data.
|
|
</p>
|
|
<p>
|
|
If you have less memory than required, the recommended option is to install more memory in the machine.
|
|
</p>
|
|
<p>
|
|
Otherwise you have to increase the blocksize option in the configuration file.
|
|
The memory occupation is inversely proportional at the select block_size.
|
|
For example, using "blocksize 512", instead of the default 256, halves the memory occupation.
|
|
But take care that using a bigger block size will also increase the amount of wasted space
|
|
in the parity files.
|
|
</p>
|
|
<p>
|
|
Note that running with memory swapped to disk is not recommended because it will be a huge slowdown.
|
|
</p>
|
|
|
|
<h3 id="smart">Do I have to check the SMART attributes of my disks?</h3>
|
|
<p>
|
|
Yes! 20% of the disks die before 4 years of life, as
|
|
reported by <a href="https://www.backblaze.com/blog/how-long-do-disk-drives-last/">Backblaze's How long do disk drives last?</a>.
|
|
Monitoring SMART attributes you can anticipate the failures and avoid to lose data!
|
|
</p>
|
|
<p>
|
|
If you see one of the SMART attributes
|
|
<b>Reallocated_Sector_Ct (5)</b>,
|
|
<b>Reported_Uncorrect (187)</b>,
|
|
<b>Command_Timeout (188)</b>,
|
|
<b>Current_Pending_Sector (197)</b>,
|
|
and <b>Offline_Uncorrectable (198)</b>
|
|
different than zero, replace the disk as recommended by
|
|
<a href="https://www.backblaze.com/blog/hard-drive-smart-stats/">Backblaze's Hard Drive SMART Stats</a>.
|
|
</p>
|
|
<p>
|
|
Check also <a href="http://research.google.com/pubs/pub32774.html">Google's Failure trends in a large disk drive population</a>
|
|
where is found that:
|
|
</p>
|
|
<pre>after the first reallocation, drives are
|
|
over 14 times more likely to fail within
|
|
60 days than drives without reallocation
|
|
counts.</pre>
|
|
<pre>after the first probational event, drives
|
|
are 16 times more likely to fail within
|
|
60 days than drives with zero probational
|
|
counts.</pre>
|
|
<pre>after the first offline reallocation, drives have over
|
|
21 times higher chances of failure within 60 days than
|
|
drives without offline reallocations.</pre>
|
|
<p>
|
|
that also recommens to replace the disk after the first error in the SMART attributes <b>Reallocated_Sector_Ct (5)</b>,
|
|
<b>Current_Pending_Sector (197)</b> and <b>Offline_Uncorrectable (198)</b>.
|
|
</p>
|
|
|
|
<h3 id="multios">Is it possible to use SnapRAID in a dual boot configuration, like Windows and Linux?</h3>
|
|
<p>
|
|
Yes. It's possible to use SnapRAID in a dual boot configuration. Doesn't matter the OS combination used.
|
|
</p>
|
|
<p>
|
|
In such case it's recommended to run SnapRAID only from one OS.
|
|
In theory, it should also work if run in both OS.
|
|
But it's a scenario not really tested, and there is always the risk to mess-up things,
|
|
like using different SnapRAID version, configuration, content files, and so on.
|
|
</p>
|
|
|
|
<h2>Configuration</h2>
|
|
|
|
<h3 id="fcontent">What's the SnapRAID 'content' file?</h3>
|
|
<p>
|
|
It's the file used by SnapRAID to save the list of all files present in your array with
|
|
all the checksum, timestamp and any other information needed.
|
|
</p>
|
|
<p>
|
|
These file will be of about few GiB depending of how big is your array.
|
|
Approximatively for 10 TB of data, you'll need 500 MiB of content file.
|
|
</p>
|
|
|
|
<h3 id="fparity">What are the SnapRAID 'parity' and 'N-parity' files?</h3>
|
|
<p>
|
|
They are the files used by SnapRAID to store the parity data used in recovering.
|
|
</p>
|
|
<p>
|
|
These files will grow in size as the biggest amount of data stored in a single disk
|
|
of the array.
|
|
</p>
|
|
|
|
<h3 id="samba">How to configure SAMBA to share the Pool directory</h3>
|
|
<p>
|
|
To configure SAMBA to share the pool directory, for example /pool, you should add to
|
|
your /etc/samba/smb.conf the following options:
|
|
</p>
|
|
<pre>
|
|
# In the global section of smb.conf
|
|
unix extensions = no
|
|
|
|
# In the share section of smb.conf
|
|
[pool]
|
|
comment = Pool
|
|
path = /pool
|
|
read only = yes
|
|
guest ok = yes
|
|
wide links = yes
|
|
</pre>
|
|
|
|
<h3 id="winmanydisk">How to use more disks than drive letters in Windows?</h3>
|
|
<p>
|
|
You can use <a href="http://technet.microsoft.com/en-us/library/cc938934.aspx">Volume Mount points</a>. You can mount a disk in a directory without
|
|
using a drive letter. Just like in Linux.
|
|
</p>
|
|
|
|
<h2>Use</h2>
|
|
|
|
<h3 id="guidelines">What are the most important things to do to prevent damages?</h3>
|
|
<p>
|
|
If you want to minimize the probability to lose data, do this:
|
|
</p>
|
|
<ul>
|
|
<li>Before running the first "sync", check your RAM memory with a program
|
|
like <a href="http://www.memtest86.com/">memtest86</a>.
|
|
Bad RAM is the most frequent cause of data loss when using SnapRAID!</li>
|
|
<li>Frequently run the "sync" command. From once a day to once a week.</li>
|
|
<li>Run the "scrub" command once a week.</li>
|
|
<li>Use <a href="http://en.wikipedia.org/wiki/Smartmontools">smartmontools</a> or similar utility
|
|
to monitor the SMART attributes.
|
|
At the first <b>Reallocated_Sector_Ct</b>, <b>Current_Pending_Sector</b> or <b>Offline_Uncorrectable</b>, replace the disk,
|
|
even if it still works.</li>
|
|
</ul>
|
|
|
|
<h3 id="adddatadisk">How can I add an additional data disk to an existing array?</h3>
|
|
<p>
|
|
To add a new data disk at the array, add the new "disk" option in the configuration file,
|
|
and then run a "sync" command.
|
|
</p>
|
|
<pre>
|
|
snapraid sync
|
|
</pre>
|
|
<p>
|
|
If the disk is empty, the "sync" command will be immediate.
|
|
</p>
|
|
|
|
<h3 id="remdatadisk">How can I remove a data disk from an existing array?</h3>
|
|
<p>
|
|
To remove a data disk from the array do:
|
|
</p>
|
|
<ul>
|
|
<li>Change in the configuration file the related "disk" option to point to an empty directory</li>
|
|
<li>Remove from the configuration file any "content" option pointing to such disk</li>
|
|
<li>Run a "sync" command with the "-E, --force-empty" option:
|
|
<pre>
|
|
snapraid sync -E
|
|
</pre>
|
|
The "-E" option tells at SnapRAID to proceed even when detecting an empty disk.</li>
|
|
<li>When the "sync" command terminates, remove the "disk" option from the configuration file.</li>
|
|
</ul>
|
|
<p>
|
|
Your array is now without any reference to the removed disk.
|
|
</p>
|
|
|
|
<h3 id="addpardisk">How can I add, or remove, a parity disk to an existing array?</h3>
|
|
<p>
|
|
To add a new parity level, add the proper "N-parity" option in the configuration file, and then run the "sync" command,
|
|
using the "-F, --force-full" option:
|
|
</p>
|
|
<pre>
|
|
snapraid -F sync
|
|
</pre>
|
|
<p>
|
|
The "-F" option tells at SnapRAID to recompute the full parity.
|
|
</p>
|
|
<p>
|
|
During the process you will be always protected because the existing parity is not modified
|
|
(note that this happens only from version 11.0).
|
|
</p>
|
|
<p>
|
|
If you wish to remove a parity, you can simply remove the highest
|
|
"N-parity" option from the configuration and then delete the parity file.
|
|
</p>
|
|
<p>
|
|
Take care that after removing a parity file, you cannot reuse it anymore,
|
|
because it gets outdated after the next "sync" command.
|
|
</p>
|
|
|
|
<h3 id="checkdisk">How can I verify a single data disk?</h3>
|
|
<p>
|
|
The "scrub" command verifies all the content of the array,
|
|
and it's not possible to limit the verification to a single data disk.
|
|
To verify only a data disk, you can run a "check" audit
|
|
command limited to the disk you want to verify.
|
|
</p>
|
|
<pre>
|
|
snapraid check -a -d DISK_NAME
|
|
</pre>
|
|
<p>
|
|
This command will verify all the check-sums of the files in the disk specified.
|
|
The other data and parity disks won't be read and they won't be verified.
|
|
</p>
|
|
|
|
<h3 id="repdatadisk">How can I replace a data disk?</h3>
|
|
<p>
|
|
If you lost the disk, see the recovering section in the manual.
|
|
Otherwise, copy all the files in the new disk,
|
|
maintaining the same directory structure and names.
|
|
</p>
|
|
<p>
|
|
In Linux use the command:
|
|
</p>
|
|
<pre>
|
|
cp -av /from_dir/. /to_dir
|
|
</pre>
|
|
<p>
|
|
WARNING! If you want to use the 'rsync' or 'mc' commands, ensure that they are recent ones.
|
|
'rsync' must be at least version 3.1.0 (2013), and 'mc' at least version 4.8.19 (2017).
|
|
Older versions are not able to copy the sub-second timestamps.
|
|
</p>
|
|
<p>
|
|
In Windows use the command:
|
|
</p>
|
|
<pre>
|
|
robocopy F:\from_dir T:\to_dir /e /copyall
|
|
</pre>
|
|
<p>
|
|
Then change the SnapRAID configuration to point the disk at the new mount point and run a "diff"
|
|
command to ensure that everything is placed correctly.
|
|
</p>
|
|
<pre>
|
|
snapraid diff
|
|
</pre>
|
|
<p>
|
|
If "diff" reports some "added" or "removed" files likely you have copied files
|
|
with a different directory structure.
|
|
In such case you have to fix it, until "diff" reports only "equal", "restored" or "copied" files.
|
|
</p>
|
|
<p>
|
|
Now you can check that the files were really copied correctly, you can run a "check" audit command
|
|
limited to the replaced disk to check the check-sum of all the files.
|
|
</p>
|
|
<pre>
|
|
snapraid check -a -d DISK_NAME
|
|
</pre>
|
|
<p>
|
|
Finally you can run "sync" to update the SnapRAID state. This command will be almost immediate.
|
|
</p>
|
|
<pre>
|
|
snapraid sync
|
|
</pre>
|
|
|
|
<h3 id="reppardisk">How can I replace a parity disk?</h3>
|
|
<p>
|
|
If the disk is still accessible, first ensure to have a synced array running a sync command:
|
|
</p>
|
|
<pre>
|
|
snapraid sync
|
|
</pre>
|
|
<p>
|
|
Then you can copy the big parity file to the new disk,
|
|
and configure the new parity location in the configuration file.
|
|
</p>
|
|
<p>
|
|
Then run sync again to make snapraid to recognize the new disk. This command will be almost immediate.
|
|
</p>
|
|
<pre>
|
|
snapraid sync
|
|
</pre>
|
|
<p>
|
|
In Linux a good copy command is <a href="http://www.gnu.org/software/ddrescue/">ddrescue</a>.
|
|
You can use:
|
|
</p>
|
|
<pre>
|
|
ddrescue /OLD_DISK/parity /NEW_DISK/parity /tmp/copy.log
|
|
</pre>
|
|
<p>
|
|
This will copy the parity file from the old to new location, and in case of errors,
|
|
it will continue copying what can be copied.
|
|
To retry to copy the problematic sections, you can just retry the same copy
|
|
command.
|
|
</p>
|
|
<p>
|
|
Having a partial parity file, is still beneficial, as it will still allow to recover
|
|
data as long it uses the valid part.
|
|
</p>
|
|
<p>
|
|
If you have a partially damaged or totally lost parity file, you can run the "fix" command to recreate it,
|
|
but ensure to use the -d option to fix only the interested parity and not the other disks.
|
|
</p>
|
|
<pre>
|
|
snapraid fix -d PARITY_NAME
|
|
</pre>
|
|
|
|
<h3 id="move">How can I safely move files from one disk to another?</h3>
|
|
<p>
|
|
In case you need to move files from one data disk of the array to another disk
|
|
also in the array, the 100% safe way to proceed is:
|
|
</p>
|
|
|
|
<ul>
|
|
<li>Copy the files to the new location.</li>
|
|
<li>Run a 'diff' command to verify that the just copied files are correctly identified as 'copy'.</li>
|
|
<li>Run a 'sync' command.</li>
|
|
<li>Delete the files from the original location.</li>
|
|
<li>Run again a 'sync' command.</li>
|
|
</ul>
|
|
|
|
<p>
|
|
This process gives the guarantee that even if disks die during the sync process,
|
|
you will be able to recover everything. It also verifies that the hashes of all the
|
|
moved files are matching the original ones.
|
|
</p>
|
|
|
|
<h3 id="defrag">Can I defragment the data and parity disks?</h3>
|
|
<p>
|
|
Yes, you can defragment data and parity disks. Defragmentation doesn't affect SnapRAID.
|
|
</p>
|
|
|
|
<h3 id="ionice">How can I make SnapRAID nicer with other processes?</h3>
|
|
<p>
|
|
In Linux, you can use the <a href="https://linux.die.net/man/1/ionice">ionice</a> command with Idle priority. Like:
|
|
<pre>
|
|
ionice -c 3 snapraid sync
|
|
</pre>
|
|
</p>
|
|
|
|
<h3 id="upgrade">How can I upgrade to a newer version of SnapRAID ?</h3>
|
|
<p>
|
|
To upgrade SnapRAID to a new version, just replace the old SnapRAID executable with the new one.
|
|
The new SnapRAID will use your existing configuration, content and parity files.
|
|
</p>
|
|
<p>
|
|
By time to time the format of the content file changes, but a newer SnapRAID
|
|
is always able to read all old formats. So, it's always possible to upgrade.
|
|
If necessary, the content file format is updated the next time it's written.
|
|
</p>
|
|
<p>
|
|
Instead, it's in general not possible to downgrade to an old SnapRAID.
|
|
You can anyway try, and if the old SnapRAID is not able to read the new content file,
|
|
you will be advised by a proper message.
|
|
</p>
|
|
|
|
<h2>Recover</h2>
|
|
|
|
<h3 id="undelete">How can I undelete a just deleted file?</h3>
|
|
<p>
|
|
Simply run the "fix" command using a filter for the specified file. Like:
|
|
</p>
|
|
<pre>
|
|
snapraid fix -f my_just_deleted_file
|
|
</pre>
|
|
<p>
|
|
To undelete a directory use:
|
|
</p>
|
|
<pre>
|
|
snapraid fix -f my_just_deleted_dir/
|
|
</pre>
|
|
<p>
|
|
To undelete all the missing files use:
|
|
</p>
|
|
<pre>
|
|
snapraid fix -m
|
|
</pre>
|
|
|
|
<h3 id="addandbreak">What happen if I add files and a disk breaks before I have updated the parity with "sync"?</h3>
|
|
<p>
|
|
All the files added in the broken disk after the last "sync" command are lost.
|
|
All the other data is safe and it can be recovered.
|
|
</p>
|
|
|
|
<h3 id="delandbreak">What happen if I delete files and a disk breaks before I have updated the parity with "sync"?</h3>
|
|
<p>
|
|
In the worst case, any file deleted or modified in not broken disks may prevent to recover the same amount of data in the broken disk.
|
|
For example, if you deleted 10GB of data, you may not be able to recover 10GB of data from the broken disk.
|
|
The exact amount of data lost depends on how much the deleted and broken data overlaps in the parity.
|
|
</p>
|
|
<p>
|
|
To reduce this problem you can use two parity disks. This improves a lot the chances to recover the data.
|
|
</p>
|
|
<p>
|
|
A way to be always safe, is to don't delete files, but move them to another directory in the same disk,
|
|
but outside the directory tree checked by SnapRAID. Then you can run the "sync" command and only after
|
|
its completion really delete the files.
|
|
In case you get a disk failure during the "sync", you have to just run the "fix" command specifying where
|
|
the deleted files are stored:
|
|
</p>
|
|
<pre>
|
|
snapraid fix -i dir_of_deleted_files
|
|
</pre>
|
|
|
|
<h3 id="syncandbreak">What happen if a disk breaks during a "sync" ?</h3>
|
|
<p>
|
|
You are still able to recover data. In the worst case, you will be able to recover as much data as if the
|
|
disk would have broken before the "sync".
|
|
But if the "sync" process already run for some time, SnapRAID is able to use the partially synced data
|
|
to recover more.
|
|
To improve the recovering you can also use the "autosave" configuration option to save the intermediate
|
|
content file during the sync process.
|
|
</p>
|
|
|
|
<h3 id="dataerror">What are and how to fix "Data errors" in "sync"?</h3>
|
|
<pre>
|
|
Syncing...
|
|
309505: Data error for file d4/data/index.db at position 40960
|
|
WARNING! Unexpected data error in a data disk! The block is now marked as bad!
|
|
Try with 'snapraid -e fix' to recover!
|
|
</pre>
|
|
<p>
|
|
Data errors happen when SnapRAID detects that the content of a file changed but the write time of the file didn't.
|
|
This is a condition that normally should never happen and it may be the result of a silent error in the disk,
|
|
or the signal that something got wrong at the file-system level, like when you poweroff the machine without a
|
|
proper shutdown.
|
|
</p>
|
|
<p>If a data error is found, the "sync" process continues, and erroneous blocks are marked as bad
|
|
and fixed at the next "fix" command.
|
|
To just fix the silent errors and not the whole array, you can use the "-e fix" command
|
|
that usually takes only few seconds.
|
|
</p>
|
|
<p>
|
|
If you have errors in more than on file, it's also possible that something is not working at hardware level.
|
|
The first thing to try is to check your PC memory with an automated tool like <a href="http://www.memtest86.com/">memtest86</a>.
|
|
Another thing to check is the disk cabling and the CPU heat.
|
|
</p>
|
|
<p>
|
|
Another possibility is that you are using programs that change files without modifying the time-stamp of the file itself.
|
|
<br>
|
|
In Linux this is almost guaranteed by the operating system. The only exception is for memory mapped files
|
|
not yet closed.
|
|
<br>
|
|
In Windows it's a bit trickier. Even using normal writes, you have the guarantee of an updated time-stamp
|
|
only after closing it.
|
|
See the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365747%28v=vs.85%29.aspx">MSDN WriteFile():</a>
|
|
</p>
|
|
<pre>
|
|
When writing to a file, the last write time is not fully updated until
|
|
all handles used for writing have been closed. Therefore, to ensure an
|
|
accurate last write time, close the file handle immediately after writing
|
|
to the file.
|
|
</pre>
|
|
<p>
|
|
When using memory mapped file, the program must ensure to update the time-stamp manually,
|
|
because Windows doesn't do it automatically.
|
|
See the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa366537%28v=vs.85%29.aspx">MSDN CreateFileMapping():</a>
|
|
</p>
|
|
<pre>
|
|
When modifying a file through a mapped view, the last modification time-stamp
|
|
may not be updated automatically. If required, the caller should use SetFileTime
|
|
to set the time-stamp.
|
|
</pre>
|
|
<p>
|
|
To avoid all these Windows problems, simply ensure to run "sync" when no program is using the files into the array.
|
|
</p>
|
|
|
|
<h3 id="log">How can I store in a file all the messages from a check and fix command</h3>
|
|
<p>
|
|
To generate a log file you can use the "-l" option.
|
|
</p>
|
|
<pre>
|
|
snapraid check -l mylog.log
|
|
</pre>
|
|
|
|
<p>
|
|
These log files could be really big, many GB. If they are too big to be opened for your editor,
|
|
you can use <a href="https://mh-nexus.de/en/hxd/">HxD</a>.
|
|
</p>
|
|
|
|
<h3 id="recconf">How can I recover the snapraid.conf file</h3>
|
|
<p>
|
|
There is the dedicated -C, --gen-conf command that writes a template configuration file
|
|
compatible with your content file.
|
|
Note that this configuration requires some manual adjustments to set the disk mount points,
|
|
but in the comments you'll find the required information to do so.
|
|
</p>
|
|
<pre>
|
|
snapraid -C snapraid.content > snapraid.conf.new
|
|
</pre>
|
|
|
|
<h2>Tech</h2>
|
|
|
|
<h3 id="checkinfo">If the SnapRAID "check" command says it's all OK. Is it really OK?</h3>
|
|
Yes. SnapRAID checks all your files with a 128 bit check-sum.
|
|
If it says that they are correct, they really are.
|
|
|
|
<h3 id="checksum">What integrity checksum is used?</h3>
|
|
SnapRAID uses <a href="http://code.google.com/p/smhasher/">Murmur3</a> and <a href="http://burtleburtle.net/bob/hash/spooky.html">SpookyHash</a> 128 bit hashes.
|
|
Murmur3 is the default in 32 bit platforms, SpookyHash in the default for 64 bit ones.
|
|
|
|
<h3 id="checksuminfo">Why integrity checksum are important?</h3>
|
|
Integrity check-sum are important to detect silent errors,
|
|
when the HD is returning garbage without reporting any error.
|
|
|
|
<p>
|
|
An introduction to this problem is in this article:
|
|
<a href="http://www.zdnet.com/blog/storage/data-corruption-is-worse-than-you-know/191">Data corruption is worse than you know</a>
|
|
</p>
|
|
<p>
|
|
A good analysis of this risk is in the paper:
|
|
<a href="http://www.cs.toronto.edu/~bianca/papers/fast08.pdf">An Analysis of Data Corruption in the Storage Stack</a>
|
|
</p>
|
|
<pre>
|
|
A significant number (8% on average) of corruptions
|
|
are detected during RAID reconstruction, creating the
|
|
possibility of data loss. In this case, protection against
|
|
double disk failures is necessary to prevent data loss.
|
|
</pre>
|
|
|
|
<h3 id="syncbreakinfo">How can SnapRAID recover also if a disk break during a 'sync'?</h3>
|
|
<p>
|
|
Before the sync process start, SnapRAID saves a special content file that contains
|
|
a description of both the states before and after the sync.
|
|
This allows SnapRAID to try two different recovery strategies.
|
|
</p>
|
|
<p>
|
|
For each block to recover, it first assumes that the parity was correctly computed,
|
|
just like if "sync" was completed successfully.
|
|
If this recovering fails, it then assumes that parity was not yet updated,
|
|
ignoring any new file added in the array.
|
|
</p>
|
|
<p>
|
|
Also in this case, using a double parity helps to recover when there are overlapping changes in the array.
|
|
</p>
|
|
|
|
<h3 id="syncaccess">Does SnapRAID allow to access data disks during a 'sync'?</h3>
|
|
<p>
|
|
Yes. You can safely read from data disks while a 'sync' is running.
|
|
</p>
|
|
<p>
|
|
You can also write, and if this interferes with the SnapRAID 'sync',
|
|
the process will continue anyway, just skipping that written part.
|
|
</p>
|
|
<p>
|
|
This obviously could affect a potential recovery, but it's just like if you wrote
|
|
just after the 'sync' completed.
|
|
</p>
|
|
|
|
<h3 id="retryop">Does SnapRAID retry reads or writes if a disk is not working?</h3>
|
|
<p>
|
|
No. SnapRAID never retries disk operations. It reports the error and then it tries
|
|
to continue anyway. After a limit of 100 errors, it then stops the execution.
|
|
</p>
|
|
<p>
|
|
In these conditions, it's better to allow the user to try to save manually as much as data possible
|
|
before the disk dies definitively.
|
|
Trying an automatic long sequence of retries, will likely kill the disk.
|
|
If you want to retry, you have to just repeat the command.
|
|
</p>
|
|
<p>
|
|
You can control the 100 errors limit using the "-L, --error-limit" option.
|
|
</p>
|
|
<p>
|
|
In the case of "fix" and "check" commands you can restart from the interrupted point using the "-s, --start"
|
|
option specifying the block number that generated the error.
|
|
</p>
|
|
<p>
|
|
In the case of "sync" command, the latest state is anyway saved before termination.
|
|
So, just restarting it will continue where stopped.
|
|
</p>
|
|
|
|
<h3 id="lock">What's the snapraid.content.lock file?</h3>
|
|
<p>
|
|
It's a file used by SnapRAID to check if another SnapRAID instance is already running.
|
|
It's created where the first content file is placed.
|
|
</p>
|
|
|
|
<h3 id="subsecond">What's the notice about zero sub-second timestamp?</h3>
|
|
<p>
|
|
In the 'status' command you may now get a notice like:
|
|
</p>
|
|
<pre>
|
|
You have XXXXX files with zero sub-second timestamp.
|
|
Run the 'touch' command to set it to a not zero value.
|
|
</pre>
|
|
<p>
|
|
It means that a number of your files have a timestamp approximated at the second value,
|
|
when instead your filesystem can store a more precise timestamp, with a sub-second precision.
|
|
</p>
|
|
<p>
|
|
This is not a problem by itself, but it could limit the SnapRAID effectiviness to detect
|
|
moved or copied files between different disks.
|
|
</p>
|
|
<p>
|
|
You have the option to set that subsecond timestamp to a random value using the new 'touch' command.
|
|
Note that the second part of the timestamp is not modified.
|
|
</p>
|
|
|
|
<h2>Performance</h2>
|
|
|
|
<h3 id="perfhardware">Which is the optimal hardware configuration to get the best performance?</h3>
|
|
<p>
|
|
The most important factor is to connect all the disks using (E)SATA connections,
|
|
to avoid slowdown caused by the controller. Avoid any kind of USB disks.
|
|
</p>
|
|
<p>
|
|
The second important factor is use disks with similar performance, because the read/write
|
|
speed is limited by the slowest disk of the array.
|
|
After a sync operation, it's printed a short stats with the wait times for each disk,
|
|
that could help to identify a bottleneck caused by a slow disk.
|
|
</p>
|
|
<p>
|
|
As last, a fast CPU could improve the speed when having a lot of disks.
|
|
You can detect if the CPU is a limiting factor, checking the CPU usage during sync operations.
|
|
</p>
|
|
|
|
<h3 id="blocksize">Which is the optimal blocksize to get the best performance?</h3>
|
|
<p>
|
|
The default blocksize should be already the best one.
|
|
</p>
|
|
<p>
|
|
Note that increasing it doesn't necessarily improve the performance.
|
|
In some cases, it could decrease it.
|
|
</p>
|
|
|
|
<h3 id="readahead">Which is the optimal Linux read-ahead size to get the best performance?</h3>
|
|
<p>
|
|
The default Linux read-ahead size of 128 KiB already ensures the best performance
|
|
for the default SnapRAID block size of 256 KiB.
|
|
If you use a bigger block size, you should configure the read-ahead size to be at least equal
|
|
to half of the SnapRAID block size.
|
|
</p>
|
|
<p>
|
|
For example, if you want to use a SnapRAID block size of 512 KiB,
|
|
it's recommended to configure a read-ahead size of 256 KiB for sdX using:
|
|
</p>
|
|
<pre>
|
|
echo 256 > /sys/block/sdX/queue/read_ahead_kb
|
|
</pre>
|
|
<p>
|
|
Note that if you want to use a SnapRAID block size smaller than 256 KiB, it's recommended to don't configure a specific
|
|
read-ahead size, and just use the default value.
|
|
</p>
|
|
|
|
<h3 id="speed">How fast are the hash and parity computation?</h3>
|
|
<p>
|
|
Murmur3 hash is very fast on 32 bits, SpookyHash is even faster on 64 bits.
|
|
The speed of parity computation is always good up to double parity,
|
|
even in architectures without SSE support.
|
|
Beyond double parity having a CPU with SSSE3 support is recommended.
|
|
For low end CPUs without SSE, there is a special, but incompatible, triple parity
|
|
support working well also without SSE.
|
|
See 'z-parity' in the manual for more info.
|
|
</p>
|
|
<p>
|
|
The following are the result on a Core i5-4670K @ 3.4 GHz.
|
|
You can check your values with the -T option.
|
|
</p>
|
|
<pre>
|
|
root@redstar:/root# snapraid -T
|
|
snapraid v7.0 by Andrea Mazzoleni, http://www.snapraid.it
|
|
Compiler gcc 4.8.1
|
|
CPU GenuineIntel, family 6, model 60, flags mmx sse2 ssse3 sse42 avx2
|
|
Memory is little-endian 64-bit
|
|
Support nanosecond timestamps with futimens()
|
|
|
|
Speed test using 8 data buffers of 262144 bytes, for a total of 2048 KiB.
|
|
Memory blocks have a displacement of 1792 bytes to improve cache performance.
|
|
The reported values are the aggregate bandwidth of all data blocks in MiB/s,
|
|
not counting parity blocks.
|
|
|
|
Memory write speed using the C memset() function:
|
|
memset 22233
|
|
|
|
CRC used to check the content file integrity:
|
|
table 1261
|
|
intel 9306
|
|
|
|
Hash used to check the data blocks integrity:
|
|
best murmur3 spooky2
|
|
hash spooky2 4715 14684
|
|
|
|
RAID functions used for computing the parity with 'sync':
|
|
best int8 int32 int64 sse2 sse2e ssse3 ssse3e avx2 avx2e
|
|
gen1 avx2 13339 25438 45438 50588
|
|
gen2 avx2 4115 6514 19441 21840 32201
|
|
genz avx2e 2337 2874 9803 10920 18944
|
|
gen3 avx2e 814 8934 10154 18613
|
|
gen4 avx2e 620 6204 7569 14229
|
|
gen5 avx2e 496 4777 5149 10051
|
|
gen6 avx2e 413 3846 4239 8190
|
|
|
|
RAID functions used for recovering with 'fix':
|
|
best int8 ssse3 avx2
|
|
rec1 avx2 1158 2916 3019
|
|
rec2 avx2 517 1220 1633
|
|
rec3 avx2 110 611 951
|
|
rec4 avx2 71 395 631
|
|
rec5 avx2 49 264 421
|
|
rec6 avx2 36 194 316
|
|
</pre>
|
|
|
|
<h2>Known Problems</h2>
|
|
|
|
<h3 id="panic">Why does my machine reboots or crashes while SnapRAID is running?</h3>
|
|
<p>
|
|
SnapRAID pushes the system to extreme conditions, and if the machine has a latent problem,
|
|
it could result in an unexpected system crash or reboot.
|
|
</p>
|
|
<p>
|
|
Even if the problem happens only when SnapRAID is running, it's without any doubt a hardware
|
|
or driver issue because SnapRAID is just a standard user application that cannot reboot or
|
|
crash the system.
|
|
</p>
|
|
<p>
|
|
Possible thing to checks are:
|
|
<ul>
|
|
<li>Check your system memory with <a href="http://www.memtest86.com/">memtest86</a>.</li>
|
|
<li>Check your HD cabling.</li>
|
|
<li>Ensure that your power supply can sustatin all the HDs spinning at the same time.</li>
|
|
<li>Check that the temperature of your system is not too high.</li>
|
|
<li>Update any system driver related to storage.</li>
|
|
<li>Check in systemlog or EventViewer if there is any hint of the possible issue.</li>
|
|
</ul>
|
|
</p>
|
|
|
|
<h3 id="oomkiller">Why in Linux does SnapRAID abort without any error message?</h3>
|
|
<p>
|
|
Likely you have too few free memory, and the Linux OOM (out-of-memory) killer
|
|
terminates SnapRAID because it's using too much memory.
|
|
You can use the Linux 'free' command to check how much free memory you have.
|
|
</p>
|
|
<pre>
|
|
free -m
|
|
</pre>
|
|
<p>
|
|
If it's too small, you have to install more memory in the machine.
|
|
</p>
|
|
|
|
<h3 id="pargrowerror">Why in 'sync' do I get the error 'Failed to grow parity file 'xxx' to size xxx due lack of space.'?</h3>
|
|
<p>
|
|
This means that SnapRAID needs to grow the parity file to a size that cannot be contained in the
|
|
parity disk.
|
|
</p>
|
|
<p>
|
|
The first thing to check is to ensure that no other data is stored in the parity disk.
|
|
Leave if only for the parity file.
|
|
Otherwise you have to move the files mentioned in the output to another data disk
|
|
to reduce the size of the needed parity.
|
|
</p>
|
|
<p>
|
|
If you are using Linux, an alternate approach is to reformat the parity disk using
|
|
specific options to increase the available space, like:
|
|
</p>
|
|
<pre>
|
|
mkfs.ext4 -m 0 -T largefile4 DEVICE
|
|
</pre>
|
|
<p>
|
|
The '-T largefile4' and '-m 0' options should give more space available for the parity file.
|
|
</p>
|
|
|
|
<h3 id="dupinode">Why do I get the error 'Internal inode xxx inconsistency...'?</h3>
|
|
<p>
|
|
This means that SnapRAID found two different files using the same inode.
|
|
This is theoretically something that should never happen,
|
|
but in some specific conditions is instead possible.
|
|
</p>
|
|
<p>
|
|
First ensure that the mentioned files were not modified while SnapRAID was running.
|
|
If files are renamed, deleted or recreated while SnapRAID is running, it's possible
|
|
that inodes are reused, causing this condition.
|
|
</p>
|
|
<p>
|
|
If you are using a FAT file-system in Windows, try to convert it to NTFS.
|
|
Theoretically inodes (FileIndex) are
|
|
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa363788%28v=vs.85%29.aspx">unique even in FAT</a>,
|
|
but this condition was already seen in the field.
|
|
</p>
|
|
|
|
<h3 id="xls">Why with .xls files do I get the error 'Data change at file...'?</h3>
|
|
|
|
<p>
|
|
Unfortunately the Excel application does dirty tricks when handling .xls files,
|
|
that may cause the followings data error:
|
|
</p>
|
|
|
|
<pre>
|
|
Data change at file '/xxx/xxx.xls' at position '0'
|
|
WARNING! Unexpected data modification of a file without parity!
|
|
</pre>
|
|
|
|
<p>
|
|
This happens because Excel modifies the files after opening them, even if you don't press 'Save'.
|
|
It stores the name of the last user that opened it to be able to report if another user tries
|
|
to open the same file at the same time.
|
|
To avoid to have the file triggered as modified, it restores the time-stamp to its original value.
|
|
But the file was modified, and SnapRAID reports it.
|
|
</p>
|
|
|
|
<p>
|
|
To workaround the problem you can see
|
|
<a href="http://superuser.com/questions/664549/how-to-prevent-excel-from-modifying-the-file-on-exit">How to prevent Excel from modifying the file on exit?</a>,
|
|
or you can switch to the .xlsx format.
|
|
</p>
|
|
|
|
<h3 id="truecrypttimestamp">Why are VeraCrypt containers never saved?</h3>
|
|
<p>
|
|
VeraCrypt (a fork of TrueCrypt) by default has enabled the option <i>Preserve modification time-stamp of file containers</i>
|
|
that makes impossible at SnapRAID, and at other backup programs, to detect that a file container is changed.
|
|
Ensure to disable this option in VeraCrypt.
|
|
</p>
|
|
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
|
|
<div class="column">
|
|
<span class="bold">Donate with</span>
|
|
<br>
|
|
<!--
|
|
<a href="http://sourceforge.net/p/snapraid/donate/"><img src="paypal.png" width="160" height="60" alt="PayPal"></a>
|
|
-->
|
|
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=amadvance%40gmail%2ecom&lc=US&item_name=SnapRAID&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest"><img src="paypal.png" width="160" height="60" alt="PayPal"></a>
|
|
<!--
|
|
<a href="https://coinkite.com/u/amadvance/"><img src="bitcoin.png" width="160" height="60" alt="BitCoin"></a>
|
|
-->
|
|
</div>
|
|
|
|
<div class="column">
|
|
<span class="bold">Find other resources at</span>
|
|
<br>
|
|
<a href="https://github.com/amadvance/snapraid/"><img src="github.png" width="160" height="60" alt="GitHub"></a>
|
|
<a href="http://sourceforge.net/projects/snapraid/"><img src="sourceforge.png" width="115" height="60" alt="SourceForge"></a>
|
|
<!--
|
|
<a href="https://travis-ci.org/amadvance/snapraid/"><img src="travisci.png" width="64" height="60" alt="TravisCI"></a>
|
|
<a href="https://tea-ci.org/amadvance/snapraid"><img src="teaci.png" width="70" height="60" alt="Tea-CI"></a>
|
|
-->
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|