From the course: Learning FreeNAS

Planning a FreeNAS installation

From the course: Learning FreeNAS

Start my 1-month free trial

Planning a FreeNAS installation

- [Instructor] FreeNAS is a user-friendly system for providing network storage and other services to clients. But before we dive in and start setting up a server, it's important to sit back and make a plan. As with any server, it's important to consider the network situation and the hardware you'll be using. And for a storage server, we'll also need to think carefully about disks and redundancy. Let's start with the regular server stuff. A server, any server, needs to be reliably accessible by its clients, and that means that it needs to be able to respond to requests at a known address. Servers need a static IP address, one that won't change over time. There are two ways to make sure that a server has a consistent address. We can either manually configure the network interface on the server to always use a predefined address, or we can use the MAC address of the network interface to reserve an IP address on a DHCP server. I prefer the latter, so I can manage static addresses centrally. But depending on how your network and your organization work you may want to set an address manually. We also need to think about the actual computer we'll use to run FreeNAS. Storage isn't extremely CPU-intensive, so we don't necessarily need a server class processor or even a fast processor. Of course, you probably don't want to use a 10-year-old system to host important files for speed and reliability reasons. But when you're looking for hardware to host your server, don't stress out too much about the CPU speed. FreeNAS does benefit from having a good amount of RAM though. Eight gigabytes is the recommended minimum, though FreeNAS will run with less. The more RAM a system has, the more data it can keep in the read cache, allowing it to respond to requests for common files quickly. Network-based storage tends to be network-intensive, so it's a good idea to think about network bandwidth issues, both from a network segmentation perspective and from the perspective of how many network interfaces your server will need. FreeNAS supports teaming network interfaces, so if you have a switch and other infrastructure that supports it, you can help increase your bandwidth that way. You may also consider using different network interfaces for different purposes, like connecting one to a backup or replication server, one to your directory server, and another to the network where clients will be transferring data. It's also a good idea to make sure your server has a protective power supply, like a UPS with a USB connection, so it can safely inform your server of a power failure and shut things down correctly as needed. The other thing we need to think about for a storage server is disks. FreeNAS needs a minimum of eight gigabytes of space on a boot device and it's recommended that you install the operating system not on an internal disk, but on a flash drive or a pair of flash drives arranged in a mirror. Using USB disks may sound strange, but because we don't need too much space and because using an external bus frees up precious SATA ports for us inside a computer, it's a great arrangement. When we plan a storage arrangement for FreeNAS, there are a few things to keep in mind. While we need to consider the disks for bulk storage, which we'll look at in a little bit, we also need to think about the boot media and caches. These are all generally flash storage rather than magnetic disk for different reasons. As I mentioned, the boot media can be pretty small and you're unlikely to find fast eight or 16-gigabyte magnetic disks anymore. So a fast flash drive fits the bill for that. The other flash devices you might consider using are for read and write caches. The read cache would need to be a moderately sized SSD optimized for read speed and the write caches would be a pair of fairly small SSDs optimized for write speed. Neither of these caches are required, but they can help speed up operations on a large dataset or if you have a lot of people using the storage at the same time. They can be created at setup or added later. Even though we're using a bunch of hard drives, FreeNAS doesn't use a RAID hardware controller. The other part of storage is the disks that will store your data. FreeNAS uses ZFS to manage disks and store data, so when we add storage to a system, we'll create ZFS pools. These pools are made up of disks arranged in various kinds of redundant configurations in units called vdevs or virtual devices. When you're planning your storage arrangement, consider how many ports you have for disks and what amount of data you need to store. Also think about the amount of redundancy you'll need, how many disks can fail before you lose data. More redundancy means less usable space and sometimes more disks and therefore, more cost. It's all a balance, but redundancy is cheaper than data recovery in most cases. Consider reliability and replaceability of disks when you're shopping. There's an interesting writeup by the online storage company Backblaze about the reliability of different kinds of hard drives that they use in their data centers. When selecting disks for your system, keep in mind that you should use disks of the same size in any given vdev. Using disks of different sizes will result in wasted space. It's worth taking the time to run a few scenarios through a calculator like this one to see what amount of space you can get with a given number of disks of a certain size under different redundancy schemes, like mirrored, RAID-Z, and RAID-Z2. As suggested here on this calculator, it's important to note that ZFS is a little sensitive about getting close to filling up a pool. Once the free space on a ZFS pool drops below 20 to 30%, saving information will get much slower. Keep that in the back of your head as you're planning your storage capacity. You don't want to fill up a ZFS pool all the way. It's also worth thinking about where you'll back up your data. It's great to make one enormous pool that's dozens of terabytes, but that also means you may need a single place with dozens of terabytes of space to back it up. Depending on what you need to do, a series of smaller pools might make sense and they can be easier to back up and restore. FreeNAS is intended to be a storage server first and a general purpose server second. So if you find yourself planning to load up a FreeNAS server with all kinds of other services, take a moment and consider setting up a different server for those tasks instead. It's usually recommended that servers, especially storage servers, are single purpose when their roles are fairly resource-intensive. I encourage you to watch this course all the way through and develop your plan for deploying a server as you go. Everyone's storage needs are different, so you'll need to design your strategy to fit your use case.

Contents