Sign in with
Sign up | Sign in
Your question

NAS setup - FreeNas/Ubuntu Server?

Last response: in Storage
Share
June 24, 2009 1:26:37 PM

I'm looking to create a NAS box out of a spare computer I got from work. I've got a bunch of HDD's so I thought I might as well put them together in a NAS to replace that growing amount of DVDs I have storing movies. I also want this box to provide backup functionality for my main desktop

I've been looking at FreeNas as software as I like the variety of protocols it supports, Ubuntu Server also seems to extend this functionality but AFAIK Windows Home Server doesn't (which would seem like the easy option in a windows network). I'm using Acronis True Image Home to do backups at the moment but I can see myself running in to issues as FreeNas (and likely Ubuntu) wants my Hard Drives formatted as UFS. I know Windows can't directly read off of UFS, but am I likely to run in to issues with a backup/restore process with this kind of set up? Also, does anyone have any preferance of FreeNas/Ubuntu?
a c 127 G Storage
June 24, 2009 1:58:19 PM

I can recommend FreeNAS, especially because it gives you easy access to ZFS; a new filesystem with internal RAID configurations (0,1,5,6) and alot of features that add to reliability such as data checksums, redundant and checksummed metadata, and the list goes on. ZFS does very much desire a 64-bit CPU and Operating System, and also plenty of RAM memory; 2GB minimum; 4GB recommended.

ZFS is portable between FreeNAS/FreeBSD/OpenSolaris/Linux. But FreeBSD and OpenSolaris have the latest version of ZFS (version 13) while the other two are still at version 6 i believe. You can use a version 6 disk/raid on a version 13 system, but not the other way around. If you would like to access the data disks while inside windows, it would be possible by using Virtualbox, with either FreeBSD or FreeNAS as guest. Currently accessing raw disks under Virtualbox has some issues though, but once those are fixed it would give you the ability to access the data via an alternative method should your NAS fail and you want to get the data off the data disks directly. Since all important configuration data about the RAID/filesystem etc is stored on the disks, no configuration files of any kind on the system disk are required.

I would recommend ZFS if you want to peek into next generation storage software and spend some time on it. If you want a quick solution without hassle on older hardware, the UFS filesystem is a better choice, with journaling if possible. It would be less portable since few systems outside the BSD family work with UFS, and data recovery software may be hard to find.
June 25, 2009 9:04:56 AM

Quote:
it would be possible by using Virtualbox, with either FreeBSD or FreeNAS as guest. Currently accessing raw disks under Virtualbox has some issues though, but once those are fixed it would give you the ability to access the data via an alternative method should your NAS fail and you want to get the data off the data disks directly


Yes, this is a major concern of mine. While NTFS is only really used under windows I've got access to a lot of windows boxes to plug disks in to if the OS goes south, I can't say the same about UFS.

As I understand it ZFS is only available in 0.7RC1, would you consider this release stable enough to use in a live environment? Is ZFS supported by any other OSs than FreeBSD?
Related resources
a c 127 G Storage
June 25, 2009 10:23:34 AM

As i said, FreeBSD, FreeNAS, OpenSolaris and Linux, although versions vary.

FreeNAS 0.7 might be easy to learn. Do test your setup properly and simulate a disk failure, before going to store real data. Also, having a backup is worth alot more than any redundancy RAID can offer you.
a b G Storage
June 25, 2009 1:26:39 PM

speerross said:
I'm looking to create a NAS box out of a spare computer I got from work. I've got a bunch of HDD's so I thought I might as well put them together in a NAS to replace that growing amount of DVDs I have storing movies. I also want this box to provide backup functionality for my main desktop

I highly recommend FreeNAS as it has minimal hardware requirements and can run very stable and reliable on even the oldest of hardware.

speerross said:
I've been looking at FreeNas as software as I like the variety of protocols it supports, Ubuntu Server also seems to extend this functionality but AFAIK Windows Home Server doesn't (which would seem like the easy option in a windows network). I'm using Acronis True Image Home to do backups at the moment but I can see myself running in to issues as FreeNas (and likely Ubuntu) wants my Hard Drives formatted as UFS. I know Windows can't directly read off of UFS, but am I likely to run in to issues with a backup/restore process with this kind of set up? Also, does anyone have any preferance of FreeNas/Ubuntu?

UFS is the default file system for FreeNAS just as EXT4 is the default file system for Ubuntu 9.04. You are correct that windows can not read these files systems natively and regardless of whether you choose FreeNAS or Ubunutu you will need to enable a CIFS/Samba client for Windows to read the files. If you are making images of your back up and storing them on the NAS, they will still be saved/stored with whatever file extension they were created with and the fact that FreeNAS/Ubuntu uses a different file system does not matter.

speerross said:
Yes, this is a major concern of mine. While NTFS is only really used under windows I've got access to a lot of windows boxes to plug disks in to if the OS goes south, I can't say the same about UFS.
As mentioned, regardless of whether you choose FreeNAS or Ubuntu, you will need to run a CIF/Samba client to allow Windows to read the disks. Albeit you can not (simply) take the disk out of the FreeNAS/Ubuntu box and plug it into a Windows box and have it access the data, the fact is both FreeNAS and Ubuntu as OS's are super stable and the bigger concern should actually be disk failure.

I've been using FreeNAS for over a year now and I can not recommend it enough. It requires so little hardware and resources to run it can be as a virtual machine rather than on bare metal. For example, my FreeNAS box is running bare metal using a Celeron 420, 256MB RAM and I barely see it ever go above 100MB RAM usage or 50% cpu usage while copying large files and simultaneously streaming .avi's to my HTPC. Also, I've actually got FreeNAS loaded onto a 1GB compact flash card plugged into an IDE/CF adapter. My friend however is using FreeNAS as a guest OS in VMWare Server along with his firewall and router in their own virtual machines. His hardware is even less than mine, a SktA Athlon with 256MB RAM, and I've yet to see his machine use more than 90% cpu and 175MB RAM.

One thing I do recommend, whether you choose FreeNAS or Ubuntu, is getting a dedicated hardware RAID controller and plugging all your drives into that rather than the mobo. Having a hardware controller gives you the flexibility of creating RAID arrays or just using the disks as JBOD, plus the controller and drives are portable in that in the event of FreeNAS or Ubuntu crapping out, you array or disks are not tied to the mobo and can be moved from box to box.

Good luck!
June 25, 2009 2:02:35 PM

Thanks for all the info so far, definately leaning towards FreeNAS. I installed it in a VM at work and it's looks quite nice, bit of a learning curve but that's not a provlem.

Quote:
One thing I do recommend, whether you choose FreeNAS or Ubuntu, is getting a dedicated hardware RAID controller and plugging all your drives into that rather than the mobo. Having a hardware controller gives you the flexibility of creating RAID arrays or just using the disks as JBOD, plus the controller and drives are portable in that in the event of FreeNAS or Ubuntu crapping out, you array or disks are not tied to the mobo and can be moved from box to box.


I've pretty much given up on the idea of RAID; it causes more problems than it solves IMO and would sooner invest in a decent backup solution. Would you still consider a dedicated hardware controller an advantage if I definately will not use RAID? It's certainly an idea as I've got a stack of 200GB disks but I've run out of mobo ports to plug them in to!

The main concern I have now is a restore process using Acronis. How the hell do I get my files off of FreeNAS if the windows PC I want to restore won't boot? I'd use Acronis boot disk to get in to an environment where I can restore, but it seems to me getting at the files would be another matter.
a b G Storage
June 26, 2009 3:49:48 PM

speerross said:
I've pretty much given up on the idea of RAID; it causes more problems than it solves IMO and would sooner invest in a decent backup solution. Would you still consider a dedicated hardware controller an advantage if I definately will not use RAID? It's certainly an idea as I've got a stack of 200GB disks but I've run out of mobo ports to plug them in to!
That's cool if RAID isn't your thing. But I would recommend a nice RAID controller for additional SATA drive ports. If you are not going to use the controller RAID functionality, then you wouldn't necessarily need a higher end controller card like 3Ware or Areca. Since the disks would be in JBOD the a nice Adaptec or Highpoint would be perfect. I personally like hardware controllers in that I'm not bound to a particular mobo and chipset as the controller and disk array are portable. I've used the same 8506-8port SATA 3Ware card in 4 different machines over the years with multiple arrays and JBOD's. Right now it's in my NAS with 5-320GB drives in RAID 5.

speerross said:
The main concern I have now is a restore process using Acronis. How the hell do I get my files off of FreeNAS if the windows PC I want to restore won't boot? I'd use Acronis boot disk to get in to an environment where I can restore, but it seems to me getting at the files would be another matter.
Unfortunately, I do not have much experience with Acronis. I do know that you can save backup images across the LAN to a NAS but not exactly sure if you can restore images across the LAN from a NAS. Sorry on that one...
a c 127 G Storage
June 26, 2009 4:08:20 PM

Quote:
I personally like hardware controllers in that I'm not bound to a particular mobo and chipset as the controller and disk array are portable.

If that's what you want, i would put Software RAID at the first spot, because no matter where you plug your disks, on areca, on chipset controller, on jmicron/adaptec/silicon image/you name it, you can always use it in a software RAID configuration that is totally independent of hardware. Meaning: even the disks can be cloned and a totally different system (even OS) will be able to access the data.

Ofcourse, if you pick ZFS, you're pretty much stuck with FreeNAS/FreeBSD/OpenSolaris. But nothing prohibits you from using these OS in a VM solution to access to files. Even if performance isn't great, it still allows you to make an emergency recovery or something, should that need arise.

Likewise, if you ever upgrade your NAS to a more powerful system, you can just connect the disks to the new system (controller doesn't matter as long as its supported by the OS) and it will work just fine. That's something you cannot do with Hardware RAID; you are bound to one vendor, one product (family), sometimes proprietary drivers and moving the array to another vendor is totally unsupported (yet possible if done correctly).
a b G Storage
June 26, 2009 10:05:02 PM

In this article they changed from FreeNAS to Ubuntu Server on a low-speed Atom build and experienced quite an increase in write speed over GbE. Granted they were using UFS and not the very recent ZFS. Any input on that?

Regarding hardware RAID controllers, I only see them necessary when high write throughput (especially from multi-users) is required from RAID with parity.
Otherwise as sub mesa said, if that controller dies then the possibility of it not being able to be read by a different vendor is quite high (or completely unreadable for RAID with parity). For home users without a readily replacement controller at hand, that's a risk to take (which I took).
Software RAID solves that problem completely, at the expensive of slower writes if using RAID with parity only.
a c 127 G Storage
June 27, 2009 12:24:25 AM

Its not the disk speed - its samba. Samba is known to perform less good on FreeBSD than on Linux, though FTP/iSCSI/NFS/SSHFS/RSYNC and other protocols do get proper speed. So its a network issue; probably a lack of proper buffering. FreeBSD-8 might have contributed to Samba speeds i don't know; keen to test sometime. Before FreeBSD 7 the TCP buffers where static so without tuning it would be very bad performance on gigabit networks with Samba for example, so all stable FreeNAS releases are affected by this issue, since they still run on FreeBSD 6.X.

Its easy to get > 100MB/s disk speeds with FreeNAS/FreeBSD. Two disks in RAID0 or three disks in RAID5 is all you need, both read and write. If you do alot of small file transfers / working with applications on your NAS then throughput isn't all that counts; but you have to take IOps into account.

SMB/CIFS is probably a bad protocol for file transfer, it has a long history of performance issues, especially on newer systems. Microsoft is lagging in alot of areas where FreeBSD has strong cards. For example, you can use link aggregation to create a 2GBps virtual NIC from two 1GBps NICs with any network driver; while in Windows this only works for a few vendors which have hardware or driver support. Trafic shaping via altQ comes to mind which is useful if you are going to use it as a router. And SMP performance on FreeBSD is really good; where windows kernel is single threaded i believe; this can be seen when disk I/O is bottlenecked by CPU like when choosing 512 byte transfer size, while 64KiB/128KiB usually gives best performance. On a dualcore system, you would see only one core fully utilized, or 50% CPU usage. This means the storage backend in the operating system is single threaded. All current windows also ship with parts from FreeBSD, and Hotmail ran on FreeBSD quite a long time. FreeBSD lacks in PR/marketing and getting in the spot lights, but it isn't old and dusty; its actively being worked on and i'm impressed by the progress. Both the MySQL and Linux kernel projects have benefitted from FreeBSD inventions, and FreeBSD ported many good inventions by other to its own; although it cannot borrow code from GPL-sources so for Linux its a one-way street.

FYI, a software RAID5 config may well beat hardware RAID. Ive seen scores beating Areca in throughput (480MB/s versus 420MB/s write in RAID5) though you need sufficient disks for that in RAID5. Areca does alot of efficient buffering and I/O reordering that really speeds up random I/O and thus helps in realistic situations.

But all that brute force is just alot of speed you are not going to use, i'd rather sacrifise some in order to run ZFS. Where i get checksums of all my files, duplicate metadata and if i choose duplicate files as well. For example: setting copies=2 on a directory will cause two copies of each file in that directory, hidden from the user. If one copy is lost due to corruption or device inaccessibility, the copy is used to restore the file automatically (self-healing) without you having to bother or hindered. You can see which disks are showing corruption or read/write issues, which makes it very easy to use and maintain also.

Back to that copies=2, that would mean when running ZFS on a stripe (RAID-0) config of two disks, you would have a RAID-1 essentially; even better because its protected by corruption; corruption from one disk can't spread to the other like what happens with ordinary RAID-1 which knows nothing about the filesystem.

Most of the goodness of ZFS comes from the fact that its both a filesystem and a RAID engine, a unique piece of software and a very powerful combination of reliable, fast and flexible storage. I encourange everyone to try it, for example in a VM; all the software is free, you just need to grab it. :) 

Since i'm very much interested in ZFS and have some experience in this, anyone wanting to try this and in need of some assistance can PM me anytime for a live chat.
July 27, 2009 11:37:27 PM

I've used Acronis for 4 years now in my tech shop. We use it to back up client systems before repairs and I've had to do quite a bit of restores over the network. Boot the Acronis Recovery disk and then try to browse the network, if you can see your shares then it supports your nic and you will be able to access samba shares as well. If it doesn't see your nic then getting a RTL8139 to have on hand would be a good idea, it supports it natively and you won't have to worry about popping hard drives in and out of systems should you need to access your backups. Samba is slow with out tweaking so I do agree that ftp or something else would be better for regular use, but you can enable samba as a backup option for accessibility. Another option is to put one of the 200's you have on hand in your desktop and do local backups to it, then do file syncs to the NAS.
August 4, 2009 3:44:42 AM

I am in the process of building a NAS myself and just trying to figure out what the best way to go is.

I am looking to build the fastest possible NAS (essentially for READ rather than write, for streaming video) using SATA II interface/drives. The server is to be around 4TB (5 x 1TB drives on RAID 5) and store mainly video (540p and some HD). This is on a home gigabit lan with an unmanaged switch. There are about 4 windows PC's which will need to access the server and 2 Macs.

The mobo has 6 x SATA II ports. I also have an old Adaptec 2810SA SATA Raid PCI card which has 8 ports. I have the option of using either a 2Ghz D Core Celeron or a 2.5Ghz Quad Core. I have anywhere up to 4GB of RAM.

I was planning on having a separate backup server (eg: using rsync) to a Drobo unit hanging off an iMac either native or a VM guest using Fusion. Expensive I know, but I have the drobo which will stay at work and come home every odd week or so to replicate changes. Overkill too, but I have gone through the pain of having a 2TB Raid 5 server loose 2 disks at once and loose data and I am now absolutely paranoid about data loss. To cut along story short the NAS i am building will not need to worry about redundancy because the data will be backed up else where..and so I am only interested in SPEED.

Not sure:

1. Whether to go with freeNAS or Openfiler, or a linux distro?

2. What file system to use? Is ZFS a faster file sysyem (for read) than UFS or even NTFS? Can the windows and Mac PC's access the data if ZFS is used?

3. Whether to use 6 ports on the mobo for the main array or whether to use the Adaptec? I would assume the mobo because the Adaptec would be limited to the PCI bus and SATA I interface?
a c 127 G Storage
August 5, 2009 1:56:21 PM

If you want speed, using linux md-raid5 with XFS filesystem will certainly give you read speeds. With 5 disks that should be close to 500MB/s at the outer tracks. Writing would be slower, but still higher than 100MB/s (gigabit).

Important is what protocol you will use, rsync is fast, ntp is fast, iscsi is fast, but samba (cifs/smb) is not. At least that's my experience. So pick rsync/NFS by preference.

You can try FreeNAS too, but i would consider ZFS being more about reliability and control, than about raw performance. Since ZFS guarantees it won't return corrupt data to applications, it has to do more work before it can pass the data. So sequentially it won't be as fast as simpler filesystems.
August 5, 2009 11:22:06 PM

sub mesa said:
If you want speed, using linux md-raid5 with XFS filesystem will certainly give you read speeds. With 5 disks that should be close to 500MB/s at the outer tracks. Writing would be slower, but still higher than 100MB/s (gigabit).


Do you actually notice this sort of speed over a gigabit lan, ie: assuming 2 or 3 pc's are accessing data from the server? What CPU and RAM would I need to use and would this be using the on board SATA II ports ?

If I went down the linux md-raid5 path, is openfiler a good choice or is another distro better? I have dabbled with allot of different linux distros but I am very much a novice and have not ventured very deeply.. but am a quick learner.

sub mesa said:
You can try FreeNAS too, but i would consider ZFS being more about reliability and control, than about raw performance. Since ZFS guarantees it won't return corrupt data to applications, it has to do more work before it can pass the data. So sequentially it won't be as fast as simpler filesystems.


What would the typical read and write speeds be using freeNAS with ZFS? Would it depend on what hardware I ran with (eg: what CPU and RAM)? Would there be much of a practical difference in "Real" use between these two setups, assuming say 3 PC's accessing data from the server (say 540p video streaming)? I like the sound of ZFS and would run with it unless there was going to be a big difference in speed.

thanks for the info.
September 13, 2010 11:08:48 AM

hi..im using freenas for 2 weeks now... ive been writing for the discs (making backups for freenas) ..but im worried about some things.
1st- can i trust putting all software there if something happens, can i take the software from there to other disks?
2nd- Why, when im seeing some mkvs, the movies eventually stops some microseconds, its like some cache or buffer isnt working well ...
im using CIFS/SMB services.
I open "finder" in max osx, i open the disk in question, and start reading the mkv for example...
I watch the graph inside Freenas software, and the readings and writings are always with high peaks, down and up...
Is this normal ?

I use for freenas a dual core 2.8 + 4gb ram + asus p5q-em board + 500gb + 500gb + 1500gb + 1000gb.
im using gigabit connection.
sorry for my english and thanks in advance.
!