Jump to content

DIY FreeNAS

I am planning a DIY FreeNAS build and have a couple questions:

 

Do any of you use FreeNAS? Do you like it?

 

If I am using 4 drives, is there a particularly compelling reason to go with RAID 1 over RAID 10?

 

Thanks.

FX 8350 | 16 GB | EVGA 970 superclocked | Corsair 200r | 240 GB Crucial M500 | 1 TB Toshiba | 500 GB Hybrid Drive |  Crossover 27" 1440p AH-IPS panel | Roccat Ryos w/ cherry mx blacks | Razer DeathAdder

  •  
Link to comment
Share on other sites

Link to post
Share on other sites

Im building a nas using freenas check out the log here if your interrested. 

If you read the same things as others and say the same things they say, then you're perceived as intelligent.

I'm a bit more radical... Woz

Link to comment
Share on other sites

Link to post
Share on other sites

I am planning a DIY FreeNAS build and have a couple questions:

 

Do any of you use FreeNAS? Do you like it?

If you go for FreeNAS you want ZFS. If you go for UFS (standard RAID like RAID5 or RAID 10 or RAID6) another solution

might be better for you. FreeNAS basically is developed to run ZFS. You have the option to go for UFS but like I said the

whole development of this platform didn't really focus around that.

 

If you want to go for ZFS you have to pay attention to a few things. You need rigid hardware. The kind of hardware that's

server grade. ZFS works different than other systems. Every data package that's been written gets a checksum to make

sure the data cannot be damaged in any way and what you get when reading from drives is what you originally stored

for 100% of all packages read. That is the biggest advantage for ZFS in my opinion but it comes at a cost. A system that's

focussed on undamaged files is very vulnerable to any kind of corruption.

 

Then again ZFS is far more speedy than standard systems. This is because ZFS isn't just a RAID system. It's the combination

of a filesystem and a volume manager. This gives deep access in the way how the data is accessed to. This becomes obvious

when you look at how the accesses are handled. Data isn't just read from drives like in standard RAIDs, it's being cached into

the RAM before it's even read. For example you store a file to your ZFS raid. What happens is: your server creates a checksum

for every data package, then metadata is created to see what data is in connection to it. You store data package 1 and since

it's a file consisting of multiple packages you have to write package 2 and 3 and 4 and 5 to the drive as well. So your meta

data will be: package 1 is accessed so packages 2 3 4 and 5 will be accessed as well. So what ZFS does is: it takes all this

information into account when accessing package 1 and schedules all other packages to be read. This can happen in the fast

way possible, so for example the actual order of accessing the packages is 1 4 3 5 and then 2 because it's faster accessible

from the way how the data is stored to the drives. Because of that you can get an immensely higher speed of accessing your

data. For writing data it's different as well. Data is cached into the RAM first, dependencies and metadata + checksums is

generated by the CPU and after that it's written to the drives in a way that focusses on being able to access it as fast as possible.

Yet again this comes at a price. RAM! You need lots of it and in general the more the better. For private users there is a cap

somewhere since the overall data being sent is going to be limited. You don't have 10k virtual machines accessing the drives

continuously. But you can say for data handling purposes you shouldn't go for less than 1GB RAM per TB of storage (not usable

storage, I mean raw storage). This sums up to 32TB+ easily and you have to take this into account when building a FreeNAS

solution, especially with 5TB+ being available and with the option of extending your storage in the future.

 

Another big feature of ZFS RAIDs is the way they are rebuilt if a drive fails on you. It's far faster and more secure than with standard

RAIDs. Since FreeNAS knows what's written on the drives since it's not only a volume manager but a file system as well. This means

that not every single sector on the drive needs to be replicated but just the written ones. Then you got checksums which makes it

possible to add another layer of security for really rebuilding the data without mistakes. This doesn't come with any cost.

 

 

So as a summary: you want hardware that eliminates any sorts of errors. That means at least ECC RAM, a server grade CPU and a

quality board. Then you need lots of RAM and a slightly stronger CPU than you would need for UFS based RAIDs.

 

What you get for it is an immensely increased amount of data security and a respectable amount of speed increase even when not

working with SSD drives for caching purposes. In other environments it's likely to be your drives limiting the transfer speeds, in ZFS

RAID environments it's most likely Samba instead since it's basically single thread, if not configured manually (so CPU core speed

is the deciding factor). Even then it's at least +50MB/s (in smaller environments) so it's definitely respectable). 

 

 

 

If I am using 4 drives, is there a particularly compelling reason to go with RAID 1 over RAID 10?

 

Thanks.

 

Ok what's RAID1? It's mirroring the files of one drive to another. When writing you have to write it on both drives simultaneously.

When accessing data you can read package 1 from drive 1 and package 2 from drive 2 at the same time. Theoretically that means

double speed.

 

OK! what's RAID10? It's a combination of RAID0 and RAID1. Since the advantages of RAID1 are obvious I continue to RAID0. It

splits data packages to 2 drives. So part 1 is stored on drive 1 and part 2 is stored on drive 2. That means that writing and reading

the files will be doubled in theoretical environments since both can happen at the same time. For RAID10 that means data is written

with twice the speed of 1 drive and read 4 times as fast as from 1 drive.

 

So what should you go for? Make sure what you need. Do you access your data from a single client in home use? In that case you

will be fine with RAID1 since the limiting factor will be the network for most of the times. Do you access your data from multiple

clients? If so, do you plan on bonding multiple network interfaces? If not, RAID1 will still do the job since the network will still be the

limiting factor. If you plan on bonding, RAID10 will be better.

 

A note: Consider using JBOD. I will contribute with a post i did recently:

For home usage it should be all right to

go for RAID1 instead of a RAID5 since your network connection is the bottleneck. You are able to transfer a maximum of 120MB/s over ethernet so as long as you don't access it with multiple devices at the same time, you won't profit from it at all. Current HDDs have a speed of roughly 150MB/s max and you can expect a 110MB/s-ish performance from them on avarage. At this point I want to mention a Greyhole based JBOD system. So first: what is JBOD? It's a drive pooling technology that treats every drive as a standalone drive, like a RAID array it appears as a single drive though. That makes it easy to expand them and set them up since it's not a RAID array. You can use drives of different sizes and speeds, from various manufacturers and in case you need more storage, just put in another drive and you are ready to go. What it doesn't have is redundancy. That's the point where Greyhole steps in. It's purpose is to distribute the files across all drives in the pool. To provide redundancy your can chose a number of drives and your file is copied to this number of drives in your pool and since your data is copied to other drives as well, you won't lose data in case of a hard drive failure. Another advantage is that if your system breaks down you can still access all your drives since it's not in a RAID array. Just plug them into another computer and you will be able to fully access the data stored on the drives since the whole system is software based. But JBOD's biggest advantage is the ease of expanding your storage. Just put in another drive, add it to Greyhole and you're ready to go. If you want a simple NAS setup with Greyhole integrated in it, try out Amahi.

 

For hardware recommendations: Madmanchris1 is building pretty much the go to build. I saw him contributing in

lots of discussions for FreeNAS and ZFS based solutions. He knows what he does since we discussed this matter over and over

with lots of information and with a lot of guys on the forums. Use a forum search for FreeNAS to get a lot of information on this

regard. It's sleeping somewhere on later forum pages. For even smaller environments the AsRockRack C2550D4I board with an

embedded Avoton CPU (Server Atom) can be the go-to solution but just judging the price-performance ratio Madmanchris1

is going with the best option. The difference will mainly be: 200MB/s vs. 350MB/s maximum transfer speeds and being able to

transcode 3 1080p streams to mobile devices simultaneously vs 1 stream. Not too much of a difference so it's more a future orientated

build with taking 10gbe networking into consideration. Like I said, replicate his build and you are fine.

 

 

/edit: hope I helped you out, just ask if something isn't clear

My builds:


'Baldur' - Data Server - Build Log


'Hlin' - UTM Gateway Server - Build Log

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×