FreeNAS versus unRAID as the operating-system for a DIY NAS?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
beckstown Offline
Junior Member
Posts: 8
Joined: Jun 2010
Reputation: 0
Post: #161
darkscout Wrote:The security quote was from the fact that you have mis matched sized drives.

Say you have (for extreme). 1GB, 1GB, 1GB, 2TB drives. How much space does unRAID give you? If it's more than 3GB, something isn't being backed up.

Your example is correct. But only because the largest drive is always used for parity. So if you have mismatched drives that are 1GB, 20GB, 500GB, 2TB you will have 521GB of storage (=sum from first three drives) and all of the data is backed up.

darkscout Wrote:Nope. Not even that. I could physically yank those drives and still have access to my volume.

Yes from my understanding you can yank as many drives as you have parity drives in one vdev and you could still access the data. However, from how I read gadgetman`s post, he wanted to point out something else. If you read any file from your vdev, all the hard drives from that vdev have to be spinning as the file is spread among all drives. This is different from Unraid. Unraid stores one file on one hard drive. This means only one hard drive has to be spinning when you read the file while the other hard drives can stay spinned down.
find quote
gadgetman Offline
Junior Member
Posts: 16
Joined: Nov 2009
Reputation: 0
Post: #162
jvdb Wrote:Not just FreeNAS. ZFS supports RAID 0,1 vdevs.. You can also add vdev stripes with a single drive to a ZFS pool. So essentially a single volume with all the space of your drives combined (doesn't matter if they're different sizes). The downside is that this method has no parity/mirror, and if a single drive fails you lose everything.

Good point, thanks.

Quote:Nope. Not even that. I could physically yank those drives and still have access to my volume.

You misunderstand this point (again and again). We're talking about idling the drives to lower their wear & tear and lower the machine's power consumption.

@beckstown: thank you Smile that was exactly the point.
(This post was last modified: 2010-10-16 15:59 by gadgetman.)
find quote
TugboatBill Offline
Posting Freak
Posts: 788
Joined: Oct 2009
Reputation: 3
Post: #163
Costs of the unraid software shouldn't be considered as a significant part of the comparison. Even buying the most expensive version is insignificant vs the costs of media and hardware.

IE (actual costs may vary, but will probably be higher)

MB, CPU, Memory, chassis $400
4 2TB HDD $400
6TB of BR rips ~$1350 (assumes 1.8TB usable/drive & 40GB rips & $10 per disk)

That's $2150 vs a $90 license. As the number of drives goes up the significance of the license costs becomes less and less.
find quote
v0lrath Offline
Member
Posts: 81
Joined: Sep 2008
Reputation: 0
Location: Redmond, WA/Provo, UT
Post: #164
Would anyone be interested in splitting a 2-pack of unRAID Pro? It would be $70 each. PM me or email s((DOT))m((DOT))shaw@gmail.com. (remove the ((DOT))s)
find quote
PatrickVogeli Offline
Fan
Posts: 532
Joined: Jul 2010
Reputation: 6
Location: Cambrils, Tarragona (Catalonia)
Post: #165
beckstown Wrote:I have read the whole thread and it seems like the same concerns regarding Unraid and ZFS reappear quite often. So I will try to explain how they both work from what I gathered through this thread. I have to point out that my knowledge regarding ZFS nearly exclusively stems from this thread. I will edit the information if somebody points out flaws.

Similarities of how Unraid and ZFS function
1. Unraid and ZFS both work via SOFTWARE. So you don't have to worry with either of them too lose all your data if you change your motherboard.

2. Both protect your data via parity drives. You can lose as many drives as you have parity drives without loosing data.

Differences in how they protect data and hard drives are added

1. Unraid
a) Unraid only offers one parity drive.

b) Data is not spread among several drives. As a consequence, you can access the data directly from the drive without Unraid. Additionally, if you access a file, only one drive has to be spinning. As a negative side effect, the read/write speed is worse than with ZFS.

c) If you lose more than one non-parity drive, you lose the data on these drives. However, you can still access the remaining data (see b).

d) As long as the parity drive is as big as your biggest non-parity drive, you can add any hard drive you want and your storage increases by the whole amount of storage offered by the new hard drive. So expending storage is pretty inexpensive. The data stored on the new drive is protected by the parity drive already in place.

2. ZFS
a) ZFS arrays (combined storage of several had drives) are called vdev.

b) One vdev offers up to 3 parity drives (RAIDZ3= 3 parity drives, RAIDZ2= 2 parity drives, etc.).

c) You store your data in pools which you can assign any name. The data of one pool can be spread among several vdev.

c) Data is spread among several drives. You cannot take out a single drive and read from it. If you read/write data, all drives of the corresponding vdev have to be spinning. Faster than Unraid when it comes to read/write of files.

e) If you lose more non-parity drives in a vdev than you have parity drives, all the data stored in that vdev will be lost.

f) If you create a vdev with drives of different sizes, the smallest drive capacity will be the limit of capacity for the other drives.
Example: If you create a vdev with one 500 GB and three 2 TB drives, you will only be able to use 500 GB per drive.

g) Adding hard drives: You cannot add hard drives to an existing vdev. Instead, you can create a new vdev and add it your pool.
Example: You have already a vdev with RAIDZ3 and six 2 TB hard drives. This means you have 6 TB of storage and another 6 TB for parity. Now you buy 4 new 2 TB drives which you would like to add to your storage. For this, you have to create a new vdev. The question is then if you still want to use RAIDZ3 for the new vdev as that would mean you would only get 2 TB of new storage as 6 TB would be used for parity. Consequently, you either settle for less parity protection or buy more drives. For the example, let us assume you create a RAIDZ2 vdev. So you know have a new vdev with 4 TB of storage and 4 TB of parity. In total you know have 5 disks used for storage and 5 disks used for parity. However, you don't have to lose more 5 disks to lose data. If you lose more than 2 drives on the on the RAIDZ2 vdev, you will lose all of its data. So while there is an additional safety in this setup, it is not as save as 5 parity drives protecting all the data. Additionally, every time you add a new vdev, you have to pay extra for new parity disks and lose Sata ports due to them. This makes expending storage more expensive in relation to Unraid.

Data Protection

1. ZFS is superior regarding data protection when no drives fail because of additional features that prevent bit rot and other issues. This is not debatable.

2. DRIVE FAILURE
Well this is a heated debate throughout this thread and really depends on what the end-user is more afraid of. For an illustrative example, let us assume a data security paranoid individual (seem to be quite a few around here Laugh ) who can either choose between RAIDZ3 vdev from ZFS (3 parity drives) or Unraid. Let us further assume that money is of no issue and no other means of backup are used as they are available for both systems. Then the question boils down to what you are more afraid of:

a) The unlikely event of losing the data of 2 drives in the case of 2 non-parity drives failing with Unraid. You would not lose any data with your RAIDZ3 ZFS vdev in this scenario.
b) The even less likely event of losing the data of 3 drives in the case of 3 non-parity drives failing with Unraid. You would not lose any data with your RAIDZ3 ZFS vdev in this scenario.
c) The very unlikely event of losing all your data of your RAIDZ3 ZFS vdev array if 4 drives fail. You would "only" lose the data of the failed 4 non-parity drives in the case of Unraid.

The risks are seen relatively. I do not know how probable it is that 2,3, or 4 drives fail at the same time. But I think we can all agree that it is more likely for 2 drives to fail at the same time then 4. Furthermore, some people claim that the likeliness of multiple drive failure increases if you buy multiple drives from the same manufacturer and batch as you often do with ZFS. However, all these additional risk considerations are more of a feeling thing than anything else. So far I have not seen any statistical tables exactly quantifying for example the threat of bit rot or multiple drive failures from a bad batch. If anybody reading this is looking for a master thesis topic, data security of media NAS seems interesting Wink
thanks! You made it a little more clear to me Smile

After reading this, I'm sure that if I ever build a NAS (and I will, sure), I'll go with unRaid. I'm a home user, unRaid is OK for me, and has a few advantages over Freenas with ZFS.

I can't consider having a 2 or 3 drive parity setup and I can't consider adding a drive and not getting its full capacity from the very begining.

Also, I'm curious to know how a 2/3 drive parity works... 1 parity drive is easy, you simply count how many bits are '1' over the drives and the parity bit will be '1' or '0' depending if it was even or uneven parity. How does that work when you have 3 parity drives?
find quote
osirisjem Offline
Senior Member
Posts: 166
Joined: Oct 2008
Reputation: 0
Post: #166
If my UNRAID had a drive that failed, and it is stored in the basement .... how would I know a drive died ?

ASrock Ion 330HT - XBMCFreak 10.1 Lucid LiveCD. Everything works but System sounds over HDMI.
find quote
beckstown Offline
Junior Member
Posts: 8
Joined: Jun 2010
Reputation: 0
Post: #167
gadgetman Wrote:@beckstown: thank you Smile that was exactly the point.

You are welcome Smile


PatrickVogeli Wrote:thanks! You made it a little more clear to me Smile

After reading this, I'm sure that if I ever build a NAS (and I will, sure), I'll go with unRaid. I'm a home user, unRaid is OK for me, and has a few advantages over Freenas with ZFS.

I can't consider having a 2 or 3 drive parity setup and I can't consider adding a drive and not getting its full capacity from the very begining.

Also, I'm curious to know how a 2/3 drive parity works... 1 parity drive is easy, you simply count how many bits are '1' over the drives and the parity bit will be '1' or '0' depending if it was even or uneven parity. How does that work when you have 3 parity drives?

Glad that the post was informative for you Smile

While writing the guide I actually asked myself the same question. I also don't know how several parity drives function. However, I am sure someone in this thread will have an answer for us.
find quote
TugboatBill Offline
Posting Freak
Posts: 788
Joined: Oct 2009
Reputation: 3
Post: #168
osirisjem Wrote:If my UNRAID had a drive that failed, and it is stored in the basement .... how would I know a drive died ?

Most users will notice it when they do their monthly parity check. IIRC, you can also add the ability to have it email you.
find quote
gabbott Offline
Team-XBMC Member
Posts: 1,547
Joined: Jul 2007
Reputation: 26
Post: #169
osirisjem Wrote:If my UNRAID had a drive that failed, and it is stored in the basement .... how would I know a drive died ?

There are scripts that can be setup to notify you via email.
find quote
froggit Offline
Senior Member
Posts: 164
Joined: Sep 2010
Reputation: 0
Post: #170
beckstown Wrote:I have read the whole thread and it seems like the same concerns regarding Unraid and ZFS reappear quite often. So I will try to explain how they both work from what I gathered through this thread. I have to point out that my knowledge regarding ZFS nearly exclusively stems from this thread. I will edit the information if somebody points out flaws.

Similarities of how Unraid and ZFS function

...<SNIP>

Thanks for that good summary of features beckstown.

I have reviewed your original ZFS section, and made corrections and additions - see below. I am awaiting confirmation that the info in section e) is correct and will update this if it's incorrect:

2. ZFS

a) ZPOOL: With ZFS, on one NAS, you may have one or more 'zpools' (ZFS storage pools). It is usual to have one data spool, however.
Some users also create a separate spool for their Boot Environment, allowing multiple GRUB boot entries, and rollback of a failed OS upgrade if required.
The zpool is the top level component in ZFS storage. A zpool is composed of one or more virtual devices, or 'vdevs' as they are known.

b) VDEV: each vdev may employ varying types and levels of redundancy:
i) stripe with no parity.
ii) stripe with parity: (1) RAID-Z1 = capacity of one drive used for parity (single parity), (2) RAID-Z2 = capacity of two drives used for parity (double parity), (3) RAID-Z3 = capacity of three drives used for parity (triple parity).
iii) mirror using n drives. A drive in a mirror may be removed and read on another system.

c) ZFS can address virtually infinite amounts of data. In fact it's been proven that you would never be able to exceed ZFS' capacity limits: http://blogs.sun.com/bonwick/entry/128_b...ge_are_you

d) To read or write data, drives must be spinning. However, with a home NAS, there are often long periods of inactivity, and this is where the OS power management can be used to spin disks down to reduce power consumption. Faster than Unraid when it comes to read/write of files due to striping/mirrors.

e) Because parity data is distributed (striped) across all RAID-Z1/2/3 vdev drives, ZFS has no concept of a parity drive.
If you lose more drives in a vdev than you have parity, all the data stored in the pool will be lost! This is where backups are important. RAID != BACKUP. Due to this, some ultra-paranoid users insist on use of mirror vdevs, typically a 3-drive mirror vdev, to give the equivalent of double parity, but the added advantage is that drives can be removed and read on another system. However, 3-way mirrors quickly become very expensive for large amounts of data, so are best used only for critical irreplaceable data. And backups should always be done for irreplaceable data.

f) If you create a vdev with drives of different sizes, the smallest drive capacity will be the limit of capacity for the other drives.
Example: If you create a vdev with one 500 GB and three 2 TB drives, you will only be able to use 500 GB per drive. This is why people creating ZFS vdevs use same-sized drives.

g) Adding hard drives: You cannot add hard drives to an existing vdev. Instead, you can create a new vdev and add it your pool.
Example: You have already a vdev with RAID-Z3 and six 2 TB hard drives. This means you have 6 TB of storage and another 6 TB for parity. Now you buy 4 new 2 TB drives which you would like to add to your storage. For this, you have to create a new vdev. The question is then if you still want to use RAID-Z3 for the new vdev as that would mean you would only get 2 TB of new storage as 6 TB would be used for parity. Consequently, you either settle for less parity protection or buy more drives. For example, let us assume you create a RAID-Z2 vdev. So you now have a new vdev with 4 TB of storage and 4 TB of parity. In total you now have 5 disks used for storage and 5 disks used for parity. However, you don't have to lose more 5 disks to lose data. If you lose more than 2 drives on the on the RAID-Z2 vdev, you will lose all of its data. So while there is an additional safety in this setup, it is not as safe as 5 parity drives protecting all the data. Additionally, every time you add a new vdev, you have to pay extra for new parity disks and lose Sata ports due to them. This makes expanding storage more expensive in relation to Unraid.

h) Capacity expansion: As well as adding new drives to expand pool capacity (see g. above), it is also possible to expand an existing vdev by replacing each of its drives, one at a time, and doing a scrub after each drive is replaced. Once all drives are replaced, the new increased capacity is available.

i) Using ZFS snapshots provides protection against accidental deletion of any files. Snapshots are virtually instant and consume no space initially. Snapshots (1) prevent accidental deletion, and (2) allow full and incremental backups to be made to any ZFS-based file system by specifying its IP address. Snapshots also allow a rollback to a last known good state, assuming snapshots are taken regularly.

j) Scrubbing the pool once a month is recommended for home users. A report is displayed giving a list of read/write/checksum errors for all drives within each vdev for the pool. This gives the user clear information about drives which have read/write/bit-rot problems, enabling the user to determine when to replace drives proactively, rather than reactively when it may be too late. Data is still available during a scrub operation, but will be accessed more slowly, but fine for watching movies.

k) ZFS automatically self-heals any corrupted data it reads. Example: you watch a movie that has one or more dropped bits caused by bit rot. When ZFS reads the file, it will automatically detect and correct the corrupted data. This is also done during a scrub operation, which reads all the files and so detects and corrects all corrupted files.

l) Hot spares can be specified when the data pool is created, or added to the data pool later, and are used automatically if drive failure is detected. This minimises the chance of there being two failed drives at the same time, because as soon as a drive fails, it is automatically detected and rebuilt onto the spare drive without user intervention.

m) ZFS data pools can be shared via NFS, SMB/CIFS (Samba) and iSCSI.

n) ZFS has strong mechanisms to help ensure that what you intend to write to disk, is actually what gets written to disk, and read back again later. This is called end-to-end data integrity: http://blogs.sun.com/bonwick/entry/zfs_end_to_end_data
(This post was last modified: 2010-10-17 23:20 by froggit.)
find quote
Post Reply