Posted by JTSF at Friday, May 31, 2013
Read our previous post
Quote:
Mast C (my gang) said, "If there is no RAID, it is a normal desktop!"
Yes! I do agree with that. =) I cannot emphasize more than enough how crucial the role of RAID is in your NAS. The type of RAID you configure on your DIY NAS is highly dependent on the OS. My own preference is to maximize the data capacity, which will be RAID 5 or equivalent.
Comparison of RAID
For reference, here's a comparison table from SnapRAID that provides an overiew of different RAID file systems.
Do I Need Hardware RAID? ZFS vs Hardware RAID
During my early days in IT as a Server Administrator, I remembered handling IBM "X" series servers which come with dedicated RAID cards. The procedures to configure the RAID controller and mount HDDs with data are always tricky and worrying. One wrong step might result in erasing your HDDs down to nothing. There are also instances where the controller card breaks down and we have to rely on vendors to do a 1-to-1 swap. Below are a list of references which discuss software RAID against hardware RAID:
10 Things About RAID
A PDF on Software RAID Versus Hardware RAID
ZFS Mirroring VS ZFS-RAID and Advantages of ZFS Over Hardware RAID
ZFS needs Hardware RAID?
FreeNAS Setup - Hardware RAID or ZFS?
ZFS VS Hardware RAID Users' Opinions
Benchmark - ZFS RAID 10 VS Hardware Raid 10
To sum it up, software RAID is my preferred choice mainly because:
- Resiliency - RAID controller card is vendor dependent and it is a single-point-of-failure in a RAID file system. If it dies, you will spend time searching all over Ebay for the same model. To build a resilient system, a RAID card is a NO NO unless you have two of it or regular backups for restoration purpose.
- Cost - Software RAID is significantly less expensive.
- Adaptability - with software raid you can generally move from system to system easily.
1st Setup: ZFS RAID with FreeNAS
Recall that I will setup 3 different Operating Systems. This leads to 3 types of RAID file systems to fiddle around. To start off, I picked ZFS RAIDZ.
ZFS RAID Type
- RAID-Z Similar to RAID5, but uses variable width stripe for parity which allows better performance than RAID5.
- RAID-Z2 Similar to RAID6, and allows 2 drive failures before being vulnerable to data loss.
- RAID-Z3 Allows 3 drive failures before being vulnerable to data loss.
- Data integrity - ZFS eliminates typical RAID 5 "write hole" errors that hardware controller could not prevent.
- Self-healing RAID - ZFS can detect silent data corruption and fix them on the fly.
- The largest drawback of ZFS RAID would be storage scalability; adding HDDs to your storage requires careful planning.
- ZFS is also always hungry for RAM - but RAM is never a problem as it's cheap and can be expanded easily. The general rule of thumb is 1GB of RAM for every 1TB of data in your storage. 8GB as the minimum recommendation.
ZFS is not for the faint hearted and beginners. My advice is if you are not prepared to understand it, don't use it despite the fact that you can easily set it up via GUI on FreeNAS. Read the following guides to strengthen your understanding of this technology.
Wikipedia - ZFS
ZFS RAIDZ Administration
FreeNAS - Working with Volumes
Lastly, I strongly recommend that you plan your ZFS RAID and NAS build before you start configuring and using it! If the references given above are too dry, study this excellent powerpoint to grasp a strong concept of ZFS.
2nd Setup: Synology Hybrid RAID (SHR)
Next, I have Synology Hyrbid RAID that comes with Synology DSM.
Synology has also developed a very neat RAID Calculator here.
Key features of SHR are highlighted below:Synology has also developed a very neat RAID Calculator here.
- SHR automatically maximize the data capacity of your RAID with different sizes of HDDs used.
- Before Synology DSM 3.1, SHR allows for 1-disk worth of redundancy - meaning that the SHR volume can suffer the lost of one disk, and the data volume will still be available for use.
- Starting from Synology DSM 3.1, a 2-disk redundant version of the SHR is available.
If setting up of Synology DSM goes all well with my DIY NAS, this is the RAID setup plan:
Unlike ZFS, the flexibility of SHR amused me. Being able to combine HDDs of different sizes and also maximize the data space is fantastic. Thumbs up to Synology who has made configuring RAID so easy, unlike some rocket science technology.
3rd Setup: U-NAS LVM+RAID+JBOD???
On U-NAS OS product page wrote:
U-NAS adopts a powerful LVM+RAID+JBOD system architecture for better data management. It supports multiple volume groups/volumes and can mix different RAIDs into a single transparent storage space to the users. U-NAS provides the max flexibility of management for enterprise users.
Honestly, I have no idea what is LVM + RAID + JBOD. There's no need to guess, I will discover as soon as I install it. We'll see...
"1GB of RAM for every 1GB of data"
ReplyDeleteSo you are caching all the data on your hard drives in memory ?? :-)
I guess you meant 1Gb or RAM for every 1Tb of data.
Anyway, thanks for the diy. Very interesting.
Hi! Great Post. I believe you mean "1GB of RAM for every 1*T*B of data" instead of "1*G*B of data"
ReplyDeleteYes, thanks for spotting that. =)
ReplyDeleteThe synology hybrid raid, is that software i can get for free? and load it to my byob nas? Great article. I think you have got me motivated to build my own NAS.
ReplyDeleteYes, it's free (on the rebuild version). You can even try it on VM before deciding to build or to buy. =)
DeleteFor setting up Raid-5 don't you need a server grade motherboard and ECC memory? I'm thinking of building my own NAS and debating between the use of Raid 1 (or 10) and Raid 5. Cause with Raid 5 you will need a Server grade motherboard, more memory (And ECC memory at that) but with Raid 1 you can go with less memory and a consumer level motherboard.
ReplyDeleteThe RAID which I've tested in this project are all based on software RAID without ECC.
DeleteECC is required if you have a concern over the integrity of your data.
So far, I have yet encounter any data integrity issue on my NAS.
It really depends on your budget and how you want to setup your NAS.
How many HDDs are you looking at for your NAS?