Build Your Own Home/SOHO NAS

December 4, 2006 by · 17 Comments 

If you're like me, you're probably got more than one computer at home. In fact, if you're like me, you've probably got a half-dozen or so. Wait, that's still not quite right, let me try one more time... If you're like me, you've got a half-dozen computers at home, running a few different operating systems, and you use them all. Yeah, that one's right.

If so, you will, no doubt, have run into the nasty little problem of keeping your files synchronized. If you keep a copy of everything on every machine then that's a huge waste of space. If you don't, you no doubt will need something from a machine that you can't easily access. You've probably thought about setting up a file server but the thought of dishing out $200 (plus hardware) for a copy of Windows isn't really appealing, nor is the thought of taking an old box lying around and installing Linux on it. Luckily, there is a solution that lies half-way in the middle. Its name is OpenFiler.

OpenFiler is a linux-based software appliance that aims to bring connectivity to everyone. With the ability to connect via SMB/CIFS (Windows File Sharing), FTP, HTTP(S) WebDAV, NFS, and even iSCSI, it's sure to allow you to connect all your systems together. The hardware requirements are low, just 256MB of RAM for x86 systems, so it should install on just about any old hardware you've got lying around, as long as it's a 686-class CPU or higher (no Pentium Pro or Via C3 chips, sorry). Keep in mind though that if you're planning on having multiple people connecting, or if you're going to use iSCSI over Gig-E, that better hardware is going to provide better performance.

The install is relatively simple. Just burn the install image to a CD-R, toss it in the CD-ROM drive of the computer you want to convert to a file server, and walk through the options. The installer doesn't let you choose what packages you want (as it is a fixed set) so all you really need to do is tell it what timezone you're in, what kind of network settings you want, etc. The only thing you may want to change is the partition scheme. I'd recommend a 100MB partition for /boot, a 2GB partition for /, and a 1-2GB partition for swap. You should leave the remainder of your drive blank as that will be configured for use as storage from within the OpenFiler web GUI. Unless you're using a REALLY old computer, the install shouldn't take more than 20 minutes.

Once you've got the machine up and running you'll need to finish the configuration through the web GUI (at this point you can also remove your CD-ROM drive if you'd like as it won't be used again). The web GUI runs at https://ipaddress:446. The default username is "openfiler" and the password is "password". However, before you start creating shares you'll need to set the time, tell the system which networks will be connecting to the system, and setup an access account back-end (if any). As of now, OpenFiler supports several authentication methods including LDAP (external or using the built-in server), Active Directory, Kerberos, Hesiod, and NIS. All those, of course, are WAY overkill for a home network and if all you want is guest access (where any user/machine can do anything), all are unnecessary and can be ignored.

Once you're ready to configure your storage, navigate over to the "Physical Storage Management" section and create a new partition (or multiple, if you should feel the need) to fill out your remaining disk space. Keep in mind that you can have multiple shares on a single volume, so most users will just want to fill out the remainder of their disk with a single physical partition. if you plan to use software RAID, here would be your chance (create "raid partitions" instead of "physical"). From there (assuming that you didn't choose RAID partitions), you can move over to create a volume group. Again, there are quite a few reasons why you would want multiple volume groups, none of which are really applicable to home/soho use. As such, you can just create a single volume group to fill out your partition.

Now's where it gets interesting. Here's where you get to create the actual volumes on your disk(s). If you want to use this system as a simple NAS, I'd recommend a single volume with the ext3 file system. OpenFiler supports several other file systems (such as ReiserFS, XFS, and JFS) but none are as mature as ext3. If you were planning on using iSCSI then you could also create a volume of that type. Keep in mind that you grow a volume (except iSCSI) but you can't shrink one. If you plan to have multiple volumes, you've got to make up your mind now (or leave part of your disk empty).

That said and done, all that's left is to create your shares using the "Shares" tab. When configuring them, make sure that you enable access for your local network and that you set them to guest access (assuming that you didn't configure LDAP or something like that).

For those of you who aren't convinced, the distro comes with the option of several pre-built virtual machines (available for VMWare, Xen, and Qemu/Parallels) for you to try out. I'd recommend the VMWare version since VMWare now offers VMWare Server for free (you'll need this instead of the Player version as you'll need to add a virtual hard drive to the image if you want to really test the package). Once you're ready to install, you can have your choice of x86 and x86-64 install CDs.

So far I've rolled out two OpenFiler systems. The first one at home on a Dual Opteron box w/ Hardware RAID 5 and the second one at work in a branch office with a spare box I had lying around. Given the success I've had with both installations, OpenFiler is now my first choice for any future storage needs.

Digg this story

Comments

17 Responses to “Build Your Own Home/SOHO NAS”
  1. Mike Brown says:

    This is really a great article I'm interested in openfiler because it will allow me to learn more about storage systems. I want to build a openfiler box that I can do icsci over this will allow me to do some testing with vmware ESX and also test some Microsoft clustering. I also will store a few files on the system namely iso's. What type of hardware do you think I need in order to achieve good performance. I have 2 systems I can use one is a p3 1gigahertz and a p4 2.4. The p3 has 512 the p4 has 768 and maxes at a gig I will be installing at least 4 sata 2 16 meg cach seagate drives as I want to use the software raid option. You talked about using multiple volume groups can you tell me why I would want to do such?

  2. Jason says:

    Software RAID 5 requires a significant amount of power in order to get reasonable performance. Likewise, iSCSI takes quite a bit of power. If you are planning on using both together then you are definitely going to want to use the fastest box possible.

    For reference, my system at home is an Opteron 165 w/ 2GB of DDR400, a HW RAID 5 array, and dual Gig-E network interfaces.

    As to using multiple volume groups, the only reason I could think of is if you have more than one class of attached storage and don't want your performance to vary greatly across the volume group. For example, if you had a 5 disk RAID 5 array and then a single disk, you probably wouldn't want to make them part of the same volume group. On the other hand, two 3 disk RAID 5 arrays would offer similar performance so sticking them in the same group would be OK.

  3. Mike Brown says:

    Let me ask you this how do you have your network configured for iscsi. I was doing some research on this and most people are putting the iscsi traffic on it on vlan. Also what gig switch did you go with and what do you use your iscsi setup for I'm assuming vmware and ms clustering?

  4. Jason says:

    My network at work is built from Dell PowerConnect 2700-series switches. You can usually get the 24-port version for less than $300. That's where I did my initial testing (on a vlan), but there is no longer any iSCSI traffic there. My iSCSI usage at home is passed over a direct connection on a pair of extra Gig-E cards (one in my machine and one in my server).

    As to my usage, at current the only thing I'm using iSCSI for is as a remote scratch disk for photo and video editing. It keeps me from having to have an array of drives in my local machine to get reasonable performance, but allows me to avoid having to deal with mounted drives and/or UNC paths.

  5. David says:

    I tried openfiler when it first came out, even before it really worked. I came back later and found it on CentOS and working. In my search for a NAS, I found a few others and finally freeNAS. http://www.freenas.org

    For the soho, I still find this the most simple and effective package.

    I am always looking and testing so will try openfiler again...

    Thanks for the information...

  6. Jason says:

    I'll agree that earlier version of OpenFiler left quite a bit to be desired. That said, at this point in time, I believe it to be a better product than FreeNAS.

    As an embedded NAS product, FreeNAS (based on m0n0wall) is very good. That said, if you have brand-new hardware (see the FreeBSD 6.1 HCL) or want functionality that is more of a SAN domain than NAS, it's not going to work for you.

    Finally, I also like the fact that Openfiler seems to be updated quite a bit more than FreeNAS. Back when I was evaluating software for my home server, FreeNAS had only received one update in the prior 6 months and that worried me a bit.

    Let me know if you try out OpenFiler and how it compares to the newest version of FreeNAS.

  7. Majid Ikram says:

    Thanks for the post Jason. One thing that really has me puzzled is how to set up the users and accounts for my home set-up. Openfiler has local LDAP support but I cannot seem to even do a sample task of just mounting to my Mac computers the share I created (even with no security settings, etc). For now I would just be happy to be able to mount the shares on my Mac and access and transfer data like that.

    Any input would be much appreciated.

    Thanks!

  8. Jason says:

    @Majid,

    Unfortunately, I'm not a Mac user, so I don't really know anything about getting one to connect to an OF server. If you configure yours as I described above, for guest-only access, can you see it from your Mac? If so, the next step would be to create some users and groups and then switch from guest-only access to authenticated. I know that there is more info on configuring the built-in LDAP server in the OF forums.

  9. Chakrit says:

    Hi. I've got to the openfiler 2.2 by accident as I've stumbled across the rPath 1.0.7. I've tested openfiler on xen, vmware and as an individual machine on the 4 cpu Intel(R) Xeon(TM) CPU 2.40GHz. The problem I found is the SQLite3 which got corrupted when I ran the update either from the command line or from the GUI. I've checked and there's a workaround on openfiler rather than a fix.

    Furthermore, each SCSI controller can support up to only 7 devices which 4 are already taken by /boot, root, swap and extended. That really leaves me with 3 physical partitions of LVM type.

    Local LDAP on openfiler balk with some password error when I tried to reset them, not a big problem for testing. I've yet to test it with sun directory server DS5.2 or openldap would be nice.

    SSL cert. This looks like a manual job for generating a self sign certificate. I wonder why there's no GUI for this. Again, not a problem it's in /opt/openfiler/etc/httpd/conf.

    It's good for noncritical storage but I'd rather have netbackup or NetApp Filer running alongside.

  10. Jason says:

    @Chakrit,

    I had an issue with a corrupted conarydb a while back but it was completely my fault (I accidentally tried to rollback my entire system and then pressed [Ctrl]+[C] to abort). I've never come across that issue from normal updates, although I've never used the Xen version.

    Your comment on SCSI drives is a bit confusing. Unless you are sticking each partition on a drive of it's own, there's no reason why you should have used 4 of the 7 allowed devices on a SCSI chain. The recommended partition scheme with a single drive would be /boot, swap, and / as primary partitions and then a single physical partition for LVM and your data volumes. With multiple drives I'd suggest sticking those three main partitions on a single drive and then all of your data on other disks with LVM.

    Finally, as to running NetApp, that would be great, but it also costs a small fortune.

  11. Nice post; in fact, after a few hours of searching for a low cost iscsi solution yours is the only one that's really helped.

    I was wondering if I could get your opinion or how insane (or not) this idea is:

    I'd like to present on Microsoft high availability (i. e., clustering) at user groups. I'd run Virtual Server 2005 R2 (or VMWare's ESX) with three VMs: 2 Windows Server 2003 and one for Openfiler. This would all (hopefully) happen on my Asus V1S laptop (with 4GB RAM). Of course, this wouldn't perform anywhere near production levels, but the transactions would be small and single threaded. The main goal would be to show how to configure the cluster and demonstrate failover, including a rolled back transaction being picked up on the newly activated server.

    Thanks for any help,
    Dave

  12. Jason says:

    @David,

    Well, I used to compile all of the packages for this site on my notebook (Core 2 Duo 7200, 2GB RAM) and that ran fine (4 VMs running at a time). It was slow but it worked.

    If you have the option between Virtual Server and ESX though then I'd go with ESX; you'll get better performance out of your virtual machines.

  13. world poker tunica tour says:

    poker borgata world tour world poker tour channel

  14. Garey Ahler says:

    Leading dedicated servers hosting directory, Top10DedicatedHosting.com today announced dedicated web hosting award winners. The prestigious awards are given to the best service providers for the chosen categories. DedicatedNow was awarded as the best managed hosting provider; eSecureData was named as the best dedicated server provider, whereas the award for best virtual private server went to WebIntellects. These will be the companies to look at in 2009.

  15. John Doyle says:

    Has anyone tried this with the 3ware stuff and the new 2TB SATA enterprise drives,I was thinking of building with openfiler.
    Thanks

  16. Garfy says:

    I disagree with the comments above about "software raid" and "software iscsi" = bad..

    Many people seem to think that software raid is the poor cousin of "hardware raid".. because they have been told this by raid controller vendors...

    However, if you look at mid-high end systems from vendors such as NetApp and EMC they use "software raid" (and software iSCSI) on a much larger number of drives (100-1100 x 15K FC drives) with only 2-4 Intel/AMD Dual/Quad core CPUs.

    So now ask youself if a single dual/quad core Intel/AMD CPU is sufficient for the 4-8-12 x 7200rpm SATA drives you might find in a typical power-users Home NAS (Openfiler)... Go figure....

Trackbacks

Check out what others are saying about this post...
  1. [...] AsteriskNOW combines the simplicity of the rPath Linux distribution (the same used by OpenFiler), the power and flexibility of Asterisk 1.4 (a much newer version that provided by most commercial vendors, SwitchVox included) with an easy-to-use web GUI (not cluttered by any applications or options unrelated to Asterisk).  In browsing around, there were very few mainstream features that cannot be accessed through the web GUI.  In less than 10 minutes I was able to have a VMWare image up, running, and configured to use my VoIP account. [...]



This site is no longer updated. If you have a need for RHEL/CentOS LAMP Stack updates outside the normal channels, I recommend ART. https://updates.atomicorp.com/channels/