Announcement

Collapse
No announcement yet.

Home Network Attached Storage (NAS) with FreeNAS

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Home Network Attached Storage (NAS) with FreeNAS

    About 6 months ago I consolidated all of my saved files from a couple different computers to one Network Attached Storage (NAS). I looked at purchasing a NAS but was not excited with the prices I would have to pay.

    I did not need a lot of special services like cloud access or business level technical support, so I decided to take a chance and build my own NAS using FreeNAS. I have been very happy with the setup and have a more organized media library.

    FreeNAS is open source software based upon FreeBSD. It is free to download and install. Installation instructions are available on their website and there is an entire WIKI that helps you install the system. I am not going to try and repeat the installation tutorial. Instead, I would like to provide a tutorial for what else you need to know about setting up a FreeNAS box.

    Step 1: Decide how robust you want your storage to be

    The obvious answer is “as robust as possible”, but that can be very costly. Plus, no single system can guarantee that you will not lose all your data. What if the building that you keep your NAS in burns down? You get robbed? You develop teleportation technology but in the process accidently beam your NAS into a black hole.

    There are many ways that your NAS will fail and you will lose your data. So you will need offsite storage for your very important data. The stuff that you just cannot stand to lose needs to be backed up in two locations. Stuff like vacations pictures, tax information, that porno you and your partner made 5 years ago, you know, the irreplaceable data.

    So, back to the original question, since this is only going to be ONE of your backup locations; or your only backup location for non-critical data, how robust do you need?

    You can read all about RAID levels on Wikipedia and other sources. You can have a system that for every disk you have for storage, you have a duplicate disk serving as a backup. In this case, you get to use 50% of your disk capacity for storage and 50% for backup.

    Another method is to have your data split between multiple disks where parts of each file are written to several disks and a separate disk serves as a backup. In this case, the backup disk contains information to regenerate the data on one of the storage disks if it goes bad. This method allows you to lose one disk in an array without losing your data. If you have four disks in total, three are storing data and one is serving as a backup “key”.

    You can also have the same type of array with two disks serving as backup. In this case, if you have 5 disks total, you store data on three and two are backup. You could lose two disks from this array before you lost your data.

    I recommend an array type of storage system with one (RAID-5) or two (RAID-6) disks as backup. FreeNAS uses a slightly different technology than standard RAID levels to help provide better data protection, so they call these arrays RAID-Z and RAID-Z2, respectively.

    I used a RAID-Z2 setup since I think that hard drive prices are quite reasonable and this gives me additional time in case I am not monitoring the condition of my NAS as often as I should. You should understand the various RAID scenarios and pick which system is best for your needs.

    Step 2: Picking your hardware

    You do not need a particularly powerful machine to run FreeNAS. The operating system will be run from a USB drive and you can use a processor that is a couple years old if you want. Newer is probably better, but not critical. The most critical parts of the setup are the motherboard, RAM, and hard drives.

    Motherboard
    You will have to install several hard drives into this machine to provide the storage space. Using a motherboard with a lot of hard drive connections will make your life easier. I recommend a board with a lot of SATA connections, and if you can afford the 6 Gb/s SATA connections that is probably better. If you are building a NAS with 5 drives, then make sure the board has at least 5 SATA connections.

    RAM
    Your machine will be faster if you have 8 GB of RAM. You can use less (4 GB), but it is better if you can increase to at least 8 GB.

    Hard Drives

    Your choice of hard drives (HD) is important. You can pay a lot for better, faster drives with different types of interfaces. I am using SATA drives and the system is plenty fast for home use.

    The least expensive HD’s are generally the green drives that several manufacturers sell. It is nice that they use less power, but they make poor drives for a NAS. They will power down when not in use and be unavailable when you need to write data to your NAS.

    I have a couple green drives in my array and they have worked fine, but I do not recommend them. Some HD manufacturers make a special drive series (i.e. Red Drives) for NAS systems. These are more costly. I have a couple of these and they seem to work fine. In general, I have used the least expensive non-Green drive that is available.

    I recommend that your drives be all the same size. It is possible to mix drives of different size, but then each drive will only store as much data as the smallest drive. So if you have four 1TB drives and one 750 GB drive, FreeNAS will treat all five drives as if they are 750GB each.

    If you are going to purchase new drives, I do not recommend purchasing 5 identical drives from the same store at the same time. You are likely to get all your drives from the same batch and there is a greater chance that multiple drives will fail at similar times.
    Instead, purchase new drives from a couple different stores or purchase a couple different brands from the same store.

    If you were to purchase five 2TB drives and use a RAID-Z2 setup, you would spend about $500 on the drives and have 6 TB of storage space with two drives providing the backup data. You would not lose any data if any two drives were to fail. If a third drive was to fail before replacing one of the original failed drives, then you would lose all your data.

    Limitations

    FreeNAS does have some limitations that are important to understand before you start setting up your system.
    1. Once you setup your array of hard drives you cannot add to that array. So, if you purchase 4 drives and make a RAID-Z setup you cannot later add a fifth drive and make a RAID-Z2 setup. You could add another 4 drive array to add more space, but you cannot add drives to the initial array.
    2. The initial setup instructions are quite good, but the forums are only moderately useful. A lot of the “answers” are curt, insulting, and generally tell you that only very experienced people should run FreeNAS. There are some good people there, so if you need their help, be patient.
    3. You will have to spend some time setting up your system once you install the software. The documentation is more than adequate in this case and people with a moderate amount of computer skills should be able to make it through. However, it still takes time to get everything set up. You are taking on the role of a system administrator and that takes a lot of time when you initially set up the NAS and then a moderate time commitment later to maintain the system.

  • #2
    If you dont want to buy a new NAS, you can find some really cheap ones on E-Bay and Amazon.

    Comment


    • #3
      Good move to build one. I had my Synology nas with a raid 5 of 4.2TB recently go nuts on me coz of a power failure. If high end products can still leave you up a creek then I definitely can't fault you for building yours. Nice post and keep refining and tweaking your build. You shall learn a ton from doing that.

      Comment


      • #4
        Originally posted by hk416 View Post
        Good move to build one. I had my Synology nas with a raid 5 of 4.2TB recently go nuts on me coz of a power failure. If high end products can still leave you up a creek then I definitely can't fault you for building yours. Nice post and keep refining and tweaking your build. You shall learn a ton from doing that.
        Yes, the learning is part of the reason for doing these types of projects. I try to take as much risk out of it as I can, but you still have to be prepared for surprises.

        Comment


        • #5
          Originally posted by Morslod View Post
          I looked at purchasing a NAS but was not excited with the prices I would have to pay.
          I already read a couple of time that most people think pre-built NAS are cheaper,quieter as well as easier to setup and the only advantage of a DIY solution is the customizability. I mostly disagree, however I think the sweet spot concerning price is somewhere around 3-bays. That's mainly because small NAS use extremely old and therefore slow hardware. Buying those parts as a consumer is more expensive than getting the cheapest up-to-date parts. The later are multiple times faster.
          Originally posted by MadafakinBATMAN View Post
          If you dont want to buy a new NAS, you can find some really cheap ones on E-Bay and Amazon.
          I would strongly advise against that, buying used HDDs or PSUs is pretty suicidal. The only used computer parts I would buy are server chasis, hardware raid cards or broken laptops.



          Originally Posted by hk416
          Good move to build one. I had my Synology nas with a raid 5 of 4.2TB recently go nuts on me coz of a power failure. If high end products can still leave you up a creek then I definitely can't fault you for building yours. Nice post and keep refining and tweaking your build. You shall learn a ton from doing that.




          Consumer products are never "high-end" and the OP's DIY NAS also won't protect him from what you are experiencing. The only way around those kind of errors are EEC RAM and a REAL hardware RAID controller. I stressed real because those controllers usually start at around $800, but these cards have their drawbacks too.

          Originally posted by Morslod View Post
          Step 2: Picking your hardware
          Newer is probably better, but not critical.
          Old but unused parts are usually as expensive(or MORE) than the cheapest ones from this year, while the later one is faster and uses less power.
          Originally posted by Morslod View Post
          Step 2: Picking your hardware

          You missed the most important part about a NAS: the CHASIS!!! Personally I think hot swap bays are just a huge waste of money and only block airflow, but then again, that's just me. If you want to use a lot of disks, choosing the right way to connect them (port multiplier, SAS/SATA controller, hardware vs. fake vs. software raid, portmultiplier, SAS expander ...) as well as finding the right PSU are probably the most difficult tasks.

          On a side note, I'm not a fan of FreeNAS/NAS4Free and mine is running CentOS. But my cute, little home NAS is more like a massive server monster.

          While you grossly oversimplified the issue at large, (or I'm overcomplicating things) I think you did a really nice job at explaining certain things by using plan and simple English (as opposed to confusing names and abbreviation).
          sigpic
          If you need help feel free to PM me, but keep in mind that asking for an invite is not considered help.

          Comment


          • #6
            Thank you for adding your comments. I think getting real world advice is difficult when trying to set up something like this. And I think I did oversimplify somewhat ( a lot).
            Last edited by Morslod; April 3, 2013, 04:44 PM. Reason: Locked thread for "cleanup".

            Comment


            • #7
              Closed thread to "cleanup". Thank you for the comments.

              Comment

              Working...
              X