Surely many wondered what to do with the old hardware after a complete upgrade. Sell? The feeling of ownership is higher. You, with your old but reliable platform, have seen a lot in this world. Passed through the fire of Skyim and the water of Tommy Vercetti. Set aside your old hardware until you think, “Why do I need a NAS (Network Attached Storage)?” When a second question appears, the first one will become rhetorical and disappear, like cubes in Tetris.
NAS – why is it needed
The first thing to decide is what tasks the NAS will solve. Its main functions:
Removing the load from the working computer a. Some clients can be transferred to NAS. In the case of torrents, you can forget about fine-tuning speed, caching, connection.
media server . A great opportunity to get a home library and share media content over your home network. Watch movies from where you last left off, regardless of device. Transcoding consumes CPU resources. Even if there is a gigabit network at home, and the speed of the external network reaches 500 Mbps, this does not guarantee the correct operation of the media server if the processor is busy with other tasks. For example, let’s take one of the most popular PLEX media servers. System requirements – 2 GB of RAM and a processor no slower than Intel Core i3.
Backup . Probably the most important operation in a NAS. Man is a lazy creature. No one wants to get an external storage device off the shelf on a daily basis and transfer files that have accumulated over the day to it. It is much better to perform backup operations automatically by a task in the scheduler or by separate software. Even better, when the backup storage consists of several disk devices and is managed by a RAID controller.
Distribution of files . Shared workspace.
There are two types of RAID controllers – hardware and software. Each type has its own advantages and disadvantages. Good hardware RAID is expensive. Software RAID will be slower. The RAID controller from the motherboard (hardware) is capable of failing, and no other controller will read the data. For low-end systems it is sufficient to use software RAID.
In this case, low-end is the determining factor. We are building a NAS on a regular computer, that is, it is supposed to use DDR3-DDR4 memory types without ECC support. If you plan to use the NAS for business-related tasks, then you should reconsider your approach and be puzzled by the issue of purchasing buffered memory.
The software part is built on *nix/GNU/Linux operating systems. There are many builds for implementing NAS that avoid redundancy. Each has its own advantages, but a product has not yet been created that no one would complain about. Any OS for NAS will fit our list of basic tasks.
List of popular operating systems for NAS:
XigmaNAS (FreeBSD; он же NAS4free)
FreeNAS от Ixsystems (FreeBSD)
Xpenology (build from NAS manufacturer – Synology)
Building a NAS using FreeNAS as an example
FreeNAS supported 32-bit architecture up to version 18.104.22.168 (still available for download). At the time of this writing, the current version is 11.3-U3.1.
FreeNAS is portable. The operating system can be installed on a USB drive, isolated from the main drives. In the event of a breakdown, for example, of the motherboard, the operating system can be run on any other equipment. Useful feature when using disk encryption. The load on the flash drive is minimal, it does not threaten rapid wear. The main OS settings can be backed up and changed if the USB drive is replaced with a new one (the entire configuration is stored in one xml file).
Minimum hardware requirements:
With basic performance for 1-4 users.
64 bit processor.
One operating system drive (8 GB minimum; USB drive).
8 GB RAM will support up to 8 hard drives; for each additional drive, the manufacturer suggests adding 1 GB of RAM.
SATA or SAS disk controller with disabled hardware RAID functionality (this is due to the peculiarities of the ZFS file system).
At least one direct-attached drive.
One physical network port.
The choice of hardware is determined by a set of tasks.
Download the ISO image (750 MB) from the official website and install it.
Something like “how to draw an owl”, but there are no nuances. There are a lot of installation instructions, it’s easy to google for the word FreeNAS.
It is better to set a static IP address through a DHCP server (separate or pre-installed on the router). This will allow you to transfer the NAS configuration to another hardware, to another network and to other conditions without unnecessary manipulation.
10 minutes of installation and the operating system is ready to go.
The login for the first authorization is root (you can manage users in the Accounts tab). The password is set when the operating system is installed.
What’s in the box, and is it really a “running out-of-the-box” solution?
Comfortable, modern, intuitive. You can change colors. The main monitoring elements are placed on the main screen.
Before the operation of any NAS, it is required to collect a pool (Storage/Pools/Add).
The system disk cannot be used in pool creation.
The more drives in the system, the wider the choice of RAID level (aka ZFS RAID-Z). You cannot change the number of disks in an array.
Article about RAID-Z and mirrors from Ixsystems: Part 1 , Part 2
Network Drive Access (SAMBA)
A NAS without shared resources is not a useful NAS. After creating the pool, we have the possibility of network balls.
Создаем Dataset (Storage/Pools).
You can add a zvol (a ZFS volume), but a zvol is block storage (a chunk of space). Used for replication and export.
Share Type — SMB.
Переходим в Sharing (Sharing/Windows Shares (SMB)/Add).
We choose Windows, because I use it. Yes, and most home clients are controlled by this particular operating system.
At the moment of creating a share, a certain set of access rights is given, including for unregistered users.
SMB is disabled by default, FreeNAS will ask you to enable the service the first time you create network shares.
The service can be disabled at any time in the Services tab.
The network resource has been created.
Edit ACL – Access Control List. Also an important point in case you have a multi-user NAS – users are constantly changing and have a division of rights into groups.
Through the explorer, the network resource is also available.
Third party plugins
List of plugins
Of the interesting … Yes, everything is interesting here and there is nothing superfluous. Ranging from home needs in the form of a torrent client and home PLEX media server to Jenkins developer tools for CI/CD.
Asigra Backup and BackupPC are two very powerful data backup tools that work on different principles and are designed for different tasks. Asigra Backup works with API. Backups can be taken with Snapshots (this requires creating a Storage/Snapshot). Snapshot is a saving of the current state of the file system. All changes made after the snapshot are written physically to another (free) disk space. That is, after deleting a file in a snapshot, its position on the disk is saved, and new information will not be written to this place. In case the file is modified, the differences from the original snapshot file will also be written to a different location, allowing the file to be rebuilt back to its original state later.
Snapshots do not take up very much disk space, since only the changes made are saved, and not several copies of the same file (however, if a file is deleted, it is saved in a snapshot).
PLEX Media Server
Two-click installation. Jail is created automatically, installation through the terminal is not required.
The PLEX server is available by http request http://[YOUR_IP_FREENAS]:32400/web.
Once installed, available at http://[YOUR_IP_FREENAS]:8080/.
Login/password is admin/adminadmin by default.
Out of the box, we got a web interface, a software RAID raised by SMB with convenient user rights management, and the very creation / editing of users and groups. Add here the presence of virtualization, monitoring and support for third-party software plugins. The output is a solid NAS that covers any need. It remains only to bring the RAM in time with the growing needs.