Build a Fileserver

Revision as of 08:41, 18 September 2016 by Kipkis (Kipkis | contribs) (importing article from wikihow)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

With the growing size of media in many homes, especially with the advent of Hi-def media and HDTVs, the amount of space needed to store even a moderately-sized collection of movies or music is growing rapidly. Hard drive capacities have been growing as well, but there is little room for many of them in small PCs or HTPCs. A file server offers a nice, convenient way of providing lots of space that can be tucked away somewhere.

Steps

  1. Think about your needs. Do you have to server hundreds of movies to multiple independent PCs throughout a house, or do you just need a convenient place to put your music to play on your HTPC? The use of a home fileserver will strongly guide the next steps.
  2. Think about storage space. How much do you need? This is also tied closely to the last question. If all you have is a couple HD movies (or many DVD-quality movies) and a bit of music, you could probably get away with a single 500 GB drive. For many HD movies, a large music collection, and lots of family photos, a larger hard drive or an array of many hard drives may be better suited.
  3. Think about multiple drives/RAID arrays. If you decided you need a lot of space in the previous step, a RAID array might be what is needed.
  4. Decide about RAID level. RAID 1 mirrors the content in all disks, offering the most reliability with capacity of the single disk only. For less paranoid, RAID 6 tolerates as much as two disk failures without data loss. RAID 5 gives the most capacity (just one disk less than total number of disks). RAID 10 provides the most performance, offering half of the capacity. Finally, RAID 0 is fastest but loses data in all disks after any single disk fails, so is generally not a good choice if you have no other backup source. Not all levels are possible with any number of disks - usually the more disks, the more choices you have. There are also more levels - read up on the standard RAID levels on a web.
  5. Think about a RAID controller. Hardware controllers are fast, reliable, easy to install and offer wider choice of possible RAID configurations. However they are not cheap and if your motherboard has enough hard drive ports you can also try software RAID without controller. It will outperform the cheapest hardware RAID cards. However you need to search the web for setup instructions and likely use Linux. You may also save money by using software RAID with non-RAID controller that usually will be bundled with all required software.
  6. Think about the rest of the PC. A fileserver tends to require little power, so a budget CPU + motherboard is usually sufficient. Ensure it has a slot (usually PCI-Express) for the RAID card if applicable. 1-2GB of RAM is often enough, unless the server will also be running applications. Gigabit Ethernet allows for future expansion and high speeds when loading content from the server. A power supply needs to provide enough power for all your hard drives. The 3.5' drives vary in power consumption from 7W till as many as 25W so search the web for the precise model you have.
  7. Think about a case. Will this server be in a rack, or just in a desktop case? The rack enclosure is optimized to stack many servers on a shared rack (it is low, flat and wide). Such rack can be bought but for a single server may not make sense. However if you plan to place your server to some server centre, the "desktop shape" server will be at least way more expensive to house, if accepted at all.
  8. Build! Airflow is especially important in servers, as hot spots can easily develop when many hard drives are running continuously. Ensure there are enough fans, that they blow the air in a straight path from front to back, and that they all work. A dead fan can cause a lot of headaches later! Don't skimp here.
  9. Install an OS and software. Linux is usually a solid choice. Any Linux server distro should work fine and get you up and running quickly. Alternatively, Windows Server OSes are very configurable, but require significantly more power and resources. Finally, Windows Home Server is a new kid on the block, but it has many powerful features. With WHS, you don't need a RAID card or any sort of controller to create a large array, but be aware if the OS dies, so does all your data with it.

Video

Tips

  • Redundancy is far more beneficial than reliability. 2 de-localised servers running RAID0 arrays are much better than 1 running a RAID10 array.
  • If you're building a RAID array, get the absolutely largest drives you can afford. An array of 3 1TB drives has the same space as an array of 6 500GB drives, but with the 1TB drives you have much more room to expand. And, when you run out of controller ports but still want to expand, you'll have to replace all the drives with higher capacity models. You're building this fileserver to last, so think of the future!
  • RAID with redundancy tolerates a single or sometimes even double hard drive failure without data loss. Hot swappable bays are for replacing the failed drive easy, quickly, even without shutting down the server. Use them if you can.
  • When choosing cases, remember to think about the number of hard drives. You may be tempted by a tiny, out of sight case, and order it only to find it only fits 4 drives instead of your planned 5 drives. Do your research.
  • Remember airflow! Hotspots in a server are a recipe for disaster.
  • RAID0 may not offer any redundancy, but if you cannot afford to lose your files, you absolutely should have a backup system external to your server. There are many risks to your data even with the limited redundancy offered by any raid; such as a controller failure, lightning/flood etc. Since with raids you also tend to use a number of the same disk, it's probable that drives will fail together, many raids are sensitive to this kind of failure.
  • Linux may be difficult to learn for a relative newcomer, so take caution and don't put any critical data on the server until you're sure you know what you're doing!

Warnings

  • Avoid static electricity when working with computer components.
  • You can also find SAS hard drives in a server market. They are in general good but require an appropriate controller. Only high end RAID cards allow to connect both SAS and SATA drives without caring.
  • Make sure you allow ample airflow outside the server, as well as in. Putting it in a closet with the door closed is NOT a good idea, and could potentially lead to a dead server or even a fire!

Things You'll Need

  • A plan
  • Hard drives (I assumed SATA throughout the article since it is the new standard)
  • RAID controller (if applicable)
  • Motherboard, CPU, RAM
  • Power Supply
  • Computer Case
  • A copy of a Linux Server Distro (like Ubuntu Server) or Windows Server