Best software raid and how to set it up?

lachdanan

Limp Gawd
Joined
Nov 3, 2012
Messages
240
Hi,

I am not a raid expert. I did a little research and snapraid seems to claim it's superior. Not sure if it's true? I am on windows and I don't wanna be an IT expert to set this up.

I found a GUI for snapraid, so I am wondering if there is an easy guide that shows how to set it up. All I am trying to do is to have 5 x 8tb drives to show up as a single drive in Windows with parity protection and avoid bit rot if possible.

Currently I have a drobo with 5 x 3tb but it seems like the max limit for my device is 32tb, and they don't list 8tb drives as supported.

Also with my 5 x 8tb setup, I want to add the drives one by one. So not sure if I can do this without rebuilding the whole array each time.

Drobo asks you to specify the size beforehand, and it's capped at 32tb so not sure the same thing has to be done for other solutions.

This is only for media files, nothing else.


Thanks a lot.
 
Also with my 5 x 8tb setup, I want to add the drives one by one. So not sure if I can do this without rebuilding the whole array each time.

With snapraid you can start with 2 disks and add 1 by one. Although I would not recommend having less than 2 parity disks at all times. So I say 3 disks are a minimum. Snapraid does not require all disks to be the same size so you could start with the drives from the drobo and mix in larger drives. For my array that I use for my linux based pvr I have a mix of 2TB to 5TB drives with 2 external USB3 drives as the parity disks. The parity disks have to be at least as big as the largest disk but the data disks can be smaller.

I found a GUI for snapraid, so I am wondering if there is an easy guide that shows how to set it up.

I think the command line utility is easy enough to use that a GUI is not needed. There are only a handful of commands that you use.

Code:
snapraid diff
snapraid sync
snapraid scrub
snapraid status

are the commands I use the most. If there is a problem with a sync or scrub snapraid will tell me the exact command to run to fix the problem.

All I am trying to do is to have 5 x 8tb drives to show up as a single drive

There is a way to make a virtual pool but I do not use that since my pvr software supports more than 1 storage location and automatically balances among the storage locations. I can't really help with the single drive virtual pool option.
 
Last edited:
Thanks a lot, if I use 3 for parity then I will only have 2 disk for data no?

After I install snapraid, I don't know what commands to run to setup the raid. So say I installed 2 drives and they showed up as M, N drives. Then I just type a command and they are now maintained by snapraid?

Also AFAIK SR doesn't run automatically like schedule, right?

I will try to see if there is any guide for pooling drives as I would like that.
 
I found a GUI for snapraid, so I am wondering if there is an easy guide that shows how to set it up. All I am trying to do is to have 5 x 8tb drives to show up as a single drive in Windows with parity protection and avoid bit rot if possible.

Currently I have a drobo with 5 x 3tb but it seems like the max limit for my device is 32tb, and they don't list 8tb drives as supported.

Also with my 5 x 8tb setup, I want to add the drives one by one. So not sure if I can do this without rebuilding the whole array each time.

..
This is only for media files, nothing else.

For a pure mediaserver a backupmechanism like Snapraid is an option. You can use any filesystem, add disk by disk and do a "Snap" what means that it creates a backup of the current filestate over all disks + parity disks. If a disk fails, you can rebuild that disk based on this backup state.

It lacks protection between the snaps as it is not realtime. If bitrot happens between storing a file or if you delete something between snaps (they last some time as they must process the whole data) you cannot restore.

The other option is realtime raid what offers realtime protection where performance scale with number of disks. Only some realtime raids offer an "add disks by disk".

If you need bitrot and crash protection and this is independent from the raid question, you need a new gen filesystem like btrfs, ReFS or the current state of the art filesystem ZFS (origin of these features) with checksums in the filesystem and CopyOnWrite.

This offers pooling as well but you cannot add disk by disk, only vdev by vdev (a vdev can be a single disk, a mirror or a raid-Z). So this may be the best current software raid regarding data security, crash security on a power outage, expandability (up to Petabyte) and performance.

But its not available on Windows, only on Solaris (the origin), BSD, OSX and Linux. If this is an option check the web-appliances

On BSD
FreeNAS, NAS4Free

on Solaris or a free fork
Oracle Solaris, currently the ZFS OS with most features + my napp-it Web-UI
OmniOS, a free Solaris fork + my napp-it Web-UI
NexentaStor (a comercial storage server with a community option)
 
Last edited:
You could try Windows software RAID-5 to see how it works for you (at least it would be damn simple to set up). RAID-5 is obviously different beast than RAID-0 but I've been really happy with Windows software RAID-0 since I ditched Intel RST.
 
Thanks a lot, if I use 3 for parity then I will only have 2 disk for data no?

You can use 2 for parity to start and the rest for data.

I don't know what commands to run to setup the raid.

You do this by creating a text file similar to this (single parity example from the manual http://www.snapraid.it/manual):
Code:
parity E:\snapraid.parity
content C:\snapraid\snapraid.content
content F:\array\snapraid.content
content G:\array\snapraid.content
disk d1 F:\array\
disk d2 G:\array\
disk d3 H:\array\

To add a second parity to the example above use for example:
Code:
2-parity I:/snapraid.parity

BTW, you can start with a single parity and add additional parity later. It will not destroy your snapshot during the increase or decrease of parity (or even data disks) so you will be protected during and after the change.

So say I installed 2 drives and they showed up as M, N drives. Then I just type a command and they are now maintained by snapraid?

You type
Code:
snapraid sync

to make your snapshot.

Code:
snapraid scrub
To verify that that there is no bitrot in the data that was already synchronized. I do this 1 time per week if that. If there is a problem snapraid will tell you the command to fix the problem.


Also AFAIK SR doesn't run automatically like schedule, right?

You could schedule a snapraid sync. However I lilke to do this manually. Most of the time I do a snapraid diff before the sync to see what files have changed and to verify that I did not accidentally delete files I did not intend to do so. snapraid diff tells me every file that is added or removed or its date has changed.

Here is an example done at this time:
Code:
jmd0 ~ # snapraid diff
Loading state from /mnt/mythtv/hitachi_2t_3_0/content...
Comparing...
add /mnt/mythtv/zfs_4t0/database/mythtv-2015-12-30.bz2
WARNING! UUID is unsupported for disks: 'd1', 'd3', 'd4', 'd5', 'd6'. Move operations won't be optimal.

   10473 equal
       0 moved
       0 copied
       0 restored
       0 updated
       0 removed
       1 added
There are differences!
jmd0 ~ #

I can see that 1 file has changed. This (/mnt/mythtv/zfs_4t0/database/mythtv-2015-12-30.bz2) is the nightly database backup for MythTV (my pvr software)

Now the sync.

Code:
jmd0 ~ # snapraid sync
Self test...
Loading state from /mnt/mythtv/hitachi_2t_3_0/content...
Scanning disk d1...
Scanning disk d2...
Scanning disk d3...
Scanning disk d4...
Scanning disk d5...
Scanning disk d6...
WARNING! UUID is unsupported for disks: 'd1', 'd3', 'd4', 'd5', 'd6'. Move operations won't be optimal.
Using 576 MiB of memory.
Saving state to /mnt/mythtv/hitachi_2t_3_0/content...
Saving state to /mnt/mythtv/jmd0_vg_2t0_0/content...
Saving state to /mnt/mythtv/zfs_5t0/content...
Saving state to /mnt/mythtv/jmd0_vg_2t3_0/content...
Saving state to /mnt/mythtv/jmd0_vg_2t4_0/content...
Saving state to /mnt/mythtv/zfs_4t0/content...
Verifying /mnt/mythtv/hitachi_2t_3_0/content...
Verifying /mnt/mythtv/jmd0_vg_2t0_0/content...
Verifying /mnt/mythtv/zfs_5t0/content...
Verifying /mnt/mythtv/jmd0_vg_2t3_0/content...
Verifying /mnt/mythtv/jmd0_vg_2t4_0/content...
Verifying /mnt/mythtv/zfs_4t0/content...
Initializing...
Syncing...
100% completed, 181 MB processed
Time for disk: 0% 0% 0% 0% 0% 7%
Time for parity: parity:91% 0%
Everything OK
Saving state to /mnt/mythtv/hitachi_2t_3_0/content...
Saving state to /mnt/mythtv/jmd0_vg_2t0_0/content...
Saving state to /mnt/mythtv/zfs_5t0/content...
Saving state to /mnt/mythtv/jmd0_vg_2t3_0/content...
Saving state to /mnt/mythtv/jmd0_vg_2t4_0/content...
Saving state to /mnt/mythtv/zfs_4t0/content...
Verifying /mnt/mythtv/hitachi_2t_3_0/content...
Verifying /mnt/mythtv/jmd0_vg_2t0_0/content...
Verifying /mnt/mythtv/zfs_5t0/content...
Verifying /mnt/mythtv/jmd0_vg_2t3_0/content...
Verifying /mnt/mythtv/jmd0_vg_2t4_0/content...
Verifying /mnt/mythtv/zfs_4t0/content...

Since it was only 1 small file the sync was less than 1 minute. If you change more data the sync is longer.

Now lets look at the status of snapraid

Code:
jmd0 ~ # snapraid status
Self test...
Loading state from /mnt/mythtv/hitachi_2t_3_0/content...
Using 574 MiB of memory.
SnapRAID status report:

   Files Fragmented Excess  Wasted  Used    Free  Use Name
            Files  Fragments  GB      GB      GB
     722     155     704       -    1377     425  76% d1
    1165     135     807       -    1540     431  78% d2
     217      46      90       -     689    1508  31% d3
     758      76     481       -    1561     422  78% d4
     907      62     348       -    1575     413  79% d5
    1322      19      26       -    2006      92  95% d6
 --------------------------------------------------------------------------
    5091     493    2456     0.0    8749    3293  72%


 22%|  *
    |  *
    |  *
    |  *                                                                o
    |  *                                                                *
    |* *                                                                *
    |* *                                                                *
 11%|* *                                                   *            *
    |* *                                                   *       o    *
    |* *                                                   *       *    *
    |* *                                                   *       *    *
    |***                                                   *       *    *
    |***                                                   *       * o  *
    |****         *        *          *   *        *   *   *       * o  *
  0%|****_________*________*_*_*_*_*__*___*________*___*___*_______*_o_o*oo
    32                    days ago of the last scrub/sync                 0

The oldest block was scrubbed 32 days ago, the median 17, the newest 0.

No sync is in progress.
The 8% of the array is not scrubbed.
No rehash is in progress or needed.
No error detected.
jmd0 ~ #

It does not show on the status but both the parity disks and at least 2 of the data disks are 4TB or larger. For now I have set quotas on the zfs filesystem to make the drive smaller so MythTV does not use only the larger newly added disk.
 
Last edited:
You could try Windows software RAID-5 to see how it works for you (at least it would be damn simple to set up). RAID-5 is obviously different beast than RAID-0 but I've been really happy with Windows software RAID-0 since I ditched Intel RST.

Software RAID5 in Windows runs horribly. I would avoid RAID5 on anything but a hardware RAID controller. It sucks to do it via Intel chipset controllers or in software. At least with regard to Windows.
 
I'm using StableBit Drivepool with duplication turned on. Crashplan is used for cloud backups. Used to use FlexRAID but too much hassle.
 
I also recommend Stablebit Drivepool, i have been running it for three years now, and worked well. You can add and remove drives from the pool, but there is no parity, only duplication.

If you are looking for something simple with parity, i would recommend unraid, It has been used a lot to store media, it has very good support and very friendly community. Its all GUI based and really easy to setup and get it running.

Not that i recommend the following, but you can even run windows as vm over unraid, if you want an all in setup, personally i like all my nas/pc to be serparted, but to each to its own, Use your Gaming PC's Extra Power as a NAS Ultimate Guide
 
Thanks everyone and especially drescherjm. Ok I just got a chance to set up my HDDs recently, still moving some data that I don't need to protect but for others I will use snapraid.

It does seem like it's easy after I read some more stuff about it and this thread.

But a few things are still unclear to me:

1. If there is bitrot in one of your files, will snapraid fix it automatically when you run the scrub command?

2. I saw it was mentioned here that snapraid doesn't have pooling but in the docs, and some websites, it says that it does. Any ideas? I can copy the files to specify disks, it's ok. I just want to access them using a single drive if possible.

3. How big are the "content" files? Will there be only a single content file for say an array of 4 disks? Can I store these content files in every disk with data except the parity disk? If small, maybe even upload to dropbox? I just don't know where I am allowed to store these.

4. I saw an option to stop scrubbing after X GBs. Is it possible to do with X files? Because what if it stops in the middle of that file and then in the next scan, it will start incorrectly especially if new files were added? I might be overthinking this though.

5. Lastly can bitrot leak into your array between scrubs and syncs? For example you sync and scrub 1 month ago, and then perform 10 more syncs till now, and one file you didn't change has bitrot and you didn't run scrub yet. Would snapraid shove this into your content file?

Thanks a lot for your help guys, really appreciate it :)
 
1. Yes it will fix bitrot. When you scrub it will identify any files that have bit rot and tell you the exact command to type to fix the situation.

2. Pooling in snapraid is done by symbolic links that make it look like everything is in a single folder but it is not. I do not use this feature since my PVR software supports more than 1 storage device.

3. My content files are 541MB for ~5500 video files in 9.3 TB of space.

4. I just use the default or a percentage. It does record how long ago a block was scrubbed and uses that to determine what to scrub next. It probably would restart on the file if the file was not completely scrubbed.

5. No. Each block has a checksum. So snapraid would detect a bad checksum if it uses the block with bitrot. In this case it will tell you about it and tell you how to fix. Snapraid also checksums the parity blocks so it knows what is bad.
 
Last edited:
Thanks a lot man, I understand it better now. Just 2 more questions:

For #3, where should I store my content files? Can I store them in the data disks protected by snapraid, except the parity disk? So I will store it on E, F, G drives that are protected by snapraid, and also say C OS drive.

Lastly, if a disk fails, with single parity you can recover all of the data completely? Because in their manual it seems like you can only recover what overlaps in the parity, but my understanding is you can recover any single disk completely, and any 2 disks using 2 parity drives.

Thanks again man, appreciate it :)
 
For #3, where should I store my content files? Can I store them in the data disks protected by snapraid, except the parity disk?

Yes, I store the content files on every data disk.

Lastly, if a disk fails, with single parity you can recover all of the data completely?

You would lose any new file (added since the last sync) that exists on the failed disk. The synchronized data would be fully recoverable except for the unlikely chance that one or two files were wiped out from bitrot that occurred between your last scrub. In dual parity with a single failed disk the bitrot would be fixed.
 
Last edited:
Thanks a lot man. But if you have single parity, you can't fix bitrot problems? I wanna start with one parity first.
 
But if you have single parity, you can't fix bitrot problems?

If you have a failed disk there is a small chance of a small amount of files corrupted by bitrot. If you scrub regularly this chance will be very close to 0.
 
Btw I ran the sync command, it's pretty easy now. But the pool line in my conf file errored saying there was no T:\. I thought whatever drive name I want, I could use it? Do I have to have this drive existing? If so, how does it work though? Will it override it?


Thanks again guys.
 
I can't help with the pooling (since I have never used that) sorry. Maybe ask on the SNAPRaid forum.
 
Back
Top