FreeNAS - setting up an FTP server. FreeNAS: building a reliable data storage system ⇡ Additional features

We remind you that attempts to repeat the author’s actions may lead to loss of warranty on the equipment and even to its failure. The material is provided for informational purposes only. If you are going to reproduce the steps described below, we strongly advise you to carefully read the article to the end at least once. The editors of 3DNews do not bear any responsibility for any possible consequences.

The first step is to decide on the hardware component of the future NAS. We will look at installing and configuring the 7th branch of FreeNAS. There are already releases of the 8th branch of this distribution, but at least up to version 8.1 they are not so interesting. FreeNAS is based on FreeBSD, which means the list of supported hardware is the same for them. However, there are still some minimum requirements. The smallest amount of RAM required is 96 MB. In fact, as usual, the more memory, the better. Some services impose additional restrictions - for example, iSCSI requires at least 512 MB of RAM for normal operation. In general, for a home NAS, one or two gigabytes of memory will be more than enough, but you can get by with less.

It is better to choose capacious hard drives, with a large buffer and a rotation speed of 5400-5900 RPM - they will be quiet and cool in operation. The time to buy a HDD is, of course, not the best, if you remember the recent flood in Thailand. The storage capacity depends solely on your needs. You can also collect all the old hard drives and combine them into a disk array. Please note that for SATA drives it is best to set the BIOS to IDE compatibility mode. You can buy one capacious drive, install FreeNAS on it and store data there (we will consider this option), or you can install the system on a flash drive or CF card (with a CF-IDE adapter) with a capacity of 2 GB or more. The second option is preferable if you are assembling an array of drives.

You don't need a lot of computing power for a NAS. You can get by with an old Pentium 4 or a similar Athlon. To assemble a new machine, it is better to purchase a board with an Intel Atom processor on board and passive cooling - again, you will get a quiet, cool, and economical platform. Naturally, it is better if the network interface is gigabit. Since we only need a video card at the very first stage of installation, and will not be used in the future, the video memory “bitten off” from the system memory will need to be reduced to a minimum. For such a filling, you will need to choose some compact mini-ITX case, of which there are quite a few on the market. We will also need a CD drive during installation.

⇡ Installation

Once the system is assembled, you can begin installing FreeNAS. Download a fresh ISO image of the system, write it to a blank, set the BIOS to boot from the optical drive and reboot. The bootloader will offer several options for starting the system. If FreeNAS does not boot in default mode, you will need to try booting with ACPI disabled. If everything is fine, then we will see the main menu, where we need to select the 9th item to install the system.

We select the full installation option and indicate the disk on which we will install the OS. For the partition with the OS you need at least 380 MB, but you can allocate a little more, for example half a gigabyte. If you install FreeNAS on a flash drive, you will have to avoid creating a swap partition, as this can lead to rapid wear of the flash drive. The installation itself will take a couple of minutes at most, after which you can reboot, turning off the optical drive along the way. Please note that all data on the disk will be erased!

First of all, after installation, you need to change the network interface settings by selecting item number two in the menu if your local network has an address other than 192.168.1.0/24. It is most logical to set a static IP address for the file server from your subnet, not forgetting to specify the address of the main gateway and DNS server. Once these settings are applied, you can disconnect the monitor and keyboard from the NAS.

⇡ Basic setup

Further configuration and management will be carried out exclusively through the web interface at http://ip-address-NAS/, which we specified at the previous stage. The default login is admin and the password is freenas. After logging in, go to the System → General Setup section, where we change the interface language, set the time zone and enable synchronization with the NTP server if desired. Click Save and refresh the page in the browser. Then, just in case, we change the password to enter the web interface and, after saving, log in again. By the way, do not forget to click the “Save”, “Apply changes” and so on buttons after changing any settings.

If you have allowed the creation of a swap partition, then it must be mounted. To do this, go to the “Diagnostics” section → “Information” → “Partitions” and carefully study the information about the disk partition. In our example, the disk is divided into three sections of different sizes - for the OS, data and swap. Find out which one and where by volume. We need to navigate and find out the path to the swap partition. The disk name in our example is /dev/ad0 (it can be seen at the top), the third partition is suitable in size (256 MB). So the path to it will be /dev/ad0s3. In general, those who are more attentive should have noticed that during installation we were shown this path immediately after formatting the disk. Now go to “System” → “Advanced” → “Swap file”, select the device type and specify the path. Click “Save”.

It's time to understand the logic of working with drives. First, we need to add disks to the system. Go to “Disks” → “Management” and click on the list. Select our disk from the list. If you have several of them in your system, then try not to confuse anything and select the one you need. Enable SMART support and select FS. In our example, there was only one disk on which we installed the OS. In this case, you need to select UFS with Soft Updates. If you are adding another, already formatted data disk, you must specify the appropriate file system type. Click “Add”.

If you have unformatted disks in your system, then go to the “Disks” → “Format” section, select the desired disk (again, do not confuse anything) and format it. Using UFS is highly recommended, but not required. Now all drives can be mounted. Go to “Disks” → “Mount Point”, click on the plus sign, select the disk as the type, then the drive itself, indicate the partition number (see above, in our case it was 2) and the file type, and also enter the name of the mount point, which must be unique for each disk. Click “Add” and “Apply changes”. That's it, the basic installation of FreeNAS is complete.

⇡ Setting up access

To open network access to our NAS, you need to enable at least the CIFS/SMB (NetBIOS) service. In the settings, you will need to change the name of the workgroup, the name of the NAS on the network, set the encodings, enable the time server and enable AIO. You can leave the rest of the settings at their defaults and click “Save and Restart.” Then you need to add at least one network resource, specifying the name and comment, as well as the path to it. Initially, all our mount points are located in the /mnt directory, so the path to the root of the drive will look like /mnt/mount_point/ (in our example it will be /mnt/data/). It’s better, of course, to create several folders in the root of the disk and add them to network resources, but this is a matter of taste. If you have several disks, then do not forget to “share” them in the same way. After this, our file server with full access should already be visible in the Windows network environment.

To manage files and folders directly from the web interface, use the file manager from the “Advanced” section. The login and password for it are the same as for users in FreeNAS.

We will use SMB resources on the local network, but for access from outside it is better to enable an FTP server. Naturally, you will need to forward TCP port 21 on the router, and also enable the DDNS service (this is also included in FreeNAS, if that happens). In the FTP service settings, you must allow only authorized users to log in and do not forget to save the settings.

User management is located in the “Access” → “Users” section. For user access to the FTP server, you must specify ftp as the main group. And place the home directory on the data disk, having previously created it. If you check the box “Give access to the user portal”, then when logging into the FreeNAS web interface you can use not only the administrator account, but also the details of this user. True, he will not be able to manage the NAS - only change his password and launch a file manager that will only work within the user’s home directory.

⇡ Additional features

There is no point in considering absolutely all the capabilities of FreeNAS. We will only touch on some of them. For example, let's enable the built-in Bittorrent client Transmission. In its settings you will need to specify the folder where the downloaded files will be stored. You can also select a directory to track torrent files - as soon as a torrent is uploaded to it, Transmission will automatically add the download. The link to the Bittorrent client web interface is displayed at the very bottom - by default it is http://ip-address-NAS:9091/.

The next step is setting up a UPnP media server. Here, too, everything is simple - just specify the folders with media files and select the directory where the database of this service will be stored. Also be sure to specify the appropriate profile for compatibility with network media players, set-top boxes or game consoles. Additional settings are available via the link at the bottom of the settings page. The same Windows 7 NAS is easily identified as a network media device and allows you to directly listen to music from it, view videos and pictures.

Finally, a DAAP server will be useful for some. The setup is the same as in the case of UPnP: select the directory for the database and the music folder. In the advanced settings (link below), you can, for example, create playlists. You can listen to music over the network in any of the DAAP clients, and in the same iTunes the server is displayed as a home collection with shared access. However, access does not work in version 10.5, so a temporary solution may be to switch to a lower version of iTunes.

Finally, let's look at creating a simple JBOD array and connecting it using iSCSI to Windows 7. For example, let's add two physical disks of different capacities to our system - 40 and 60 GB. Then you need to connect the disks as described at the beginning of the article, specifying Unformatted as the file system, and then format each of them into Software RAID. Then in the section “Disks” → “Software RAID” → “JBOD” we add a new volume for which we select a name and indicate the two disks that we just initialized. Check the box “Create and initialize RAID” and apply the settings. If we planned to use this JBOD array as a regular network drive in the future, we would have to format it in UFS and create a mount point for it.

Even despite the willingness of users to spend a considerable amount on ready-made network storage, probably no one would refuse to turn their old or unclaimed computer into it using the operating system FreeNAS.

At the moment, this class of devices is in great demand, since distribution kits of programs and multimedia files are constantly growing, which requires large amounts of storage. Moreover, NAS servers aimed at home use are a convenient means of storing information. Network storage easily solves the problem of lack of free space on your PC's hard drive, but also becomes a centralized storage location for your collection of music, videos and photos. And most importantly, all these files, collected in one place, will be available for viewing from any electronic device on the local network, be it a laptop, tablet, smartphone or TV.

Yes, NAS servers are quite expensive, but it can be done DIY network storage as an alternative to the factory solution, without being limited in functionality. We will need the most ordinary computer and the FreeNAS operating system. I wrote about solutions in a suitable case in the article ““.

Of course, you can also use an old PC (you should immediately exclude from this concept computers of the “ancient” generation of Pentium 4 processors). But it is better, if possible, in quality hardware platform for network storage, which will run the FreeNAS operating system, use a compact computer built on an energy-efficient Intel Atom or AMD Brazos processor. I justify this by the fact that these components consume a minimum of electricity, and they operate almost silently, and are not at all expensive. The amount of RAM is not so important, since FreeNAS is not demanding on RAM. You should take care of hard drives, at least two, which can be combined into a mirrored RAID array for more reliable storage of information. Security is important for a NAS server, but if you have something to treasure. Depending on the content, using RAID is a controversial issue.

How to write OC to a flash drive

We will install FreeNAS on a USB flash drive so that when replacing hard drives the functionality of the NAS server will not be disrupted. The use of a flash drive is justified by its silent operation (unlike a hard drive), and most importantly, if the hard drive fails, the installed operating system outside the data storage array will be able to operate normally. To install FreeNAS OS, any flash drive is suitable, not necessarily high-speed (as is the case with heavier operating systems), with a capacity of at least 2 GB.

First you should download the archive with the operating system image, selecting the OS version (32 bit or 64 bit), according to the supported processor architecture. If you need a 64-bit version of FreeNAS, then go to the official website. Unpack the downloaded archive, for example, using the 7-Zip program.

Now let's prepare the USB drive:

connect a flash drive or USB HDD to the computer and format it, selecting FAT32 as the file system (before starting the procedure, make sure that there is no important data on the flash drive, since all its contents will be deleted) - right-click on the USB drive in the “My Computer” folder " to bring up the context menu of "Explorer" and select "Format...".


You can also use similar utilities from the article.

Click on the folder image to select the extracted file with the *img extension containing OC FreeNAS. In the drop-down list on the right, select the letter of the removable drive on which the OS will be installed. Then click on the “Write” button and wait until the process of copying files to the flash drive is completed.

If Image Writer for Windows accidentally generates an error during recording, repeat the procedure. Once recording is complete, you will receive a bootable USB flash drive.

Installing FreeNAS OS on a NAS server

Install a USB flash drive with FreeNAS into the USB port of the computer that will be used as NAS server. We will need to select this flash drive as a boot loader in the BIOS; to do this, immediately after turning on the PC, press the “F1”, “F2” or “Del” key (depending on the manufacturer) to open the computer BIOS settings menu.

In the menu, find the Standard CMOS Features item. Click on it with the “Enter” key.

Attention! The names of the items may vary depending on the motherboard model (look for the word “Boot” in the name). This also applies to access to system settings. motherboard, since it may also differ from those indicated in my example. Find out about how to open BIOS when PC boots, you can see the manual for motherboard or while the computer is booting: a summary of the hotkeys is displayed at the bottom of the screen.

Using the navigation arrow keys, assign the First Boot Device to the flash drive that corresponds to the USB device item (for example, Removable Device or USB HDD). Press the "Esc" key to return to the main BIOS settings menu, and then the "F 10" key to save the changes made, or go to the "Save & Exit Setup" item, agreeing to the changes with the "Y" key. The FreeNAS boot process takes about 1 minute. The fact that the operating system is ready for operation is indicated by a message about the IP address assigned to the device.

Be sure to write down the IP address in a notepad, as you will need it later to configure the NAS server via the web interface. Now you can turn off the monitor and keyboard, and place the computer in a place convenient for you. The FreeNAS operating system will be launched from a flash drive in fully automatic mode, just like from a regular hard drive inside a PC.

Creating an account on FreeNAS OS

Let's get started setting up FreeNAS. To access the web interface of the server operating system, enter the IP address of the network storage that you saved after installing the operating system in the address bar of any web browser.

You must first set the administrator password, since by default FreeNAS operating system administrator password is absent, and the security issue should not be ignored. To create an administrator account, click on the “Account” button on the toolbar. Then go to the “Change Password” tab and specify the password that will be assigned to this account. To apply the changes, click "Change Admin Password". Log out of FreeNAS by clicking on “Log Out”.


Refresh the page in your web browser to log in again. This time FreeNAS will ask you to enter your login (admin) and password (the one you specified earlier) to access the network storage settings.

I recommend creating at least one more user account with limited rights. Click on the “Account” button and go to the “Users” tab. Click on the “Add New User” button to open the window for creating a new account.

Specify the login, full user name, password and the name of the home folder in which he can not only view files, but also create new ones.

Given that the hard drives are not yet formatted, leave the default user home folder name unchanged. To complete the operation, click on the “Ok” button.

The system is almost ready for use. There are only a few final steps left.

Changing the language in FreeNAS OS

Once the FreeNAS administrator account has been assigned a password, you have secured your data from unwanted guests. But in order to thoroughly configure the OS and explore the capabilities of FreeNAS, it is worth switching the system language from English to Russian.

Click the button on the toolbar and go to the tab. In the “Language” drop-down menu, select “Russian” to apply the changes, click on the “Save” button. After this, refresh the page in your browser.

Ready! All text in the FreeNAS menu is now displayed in Russian. Unfortunately, some Russian-language names of menu items and buttons, unlike the English names, do not fit very well into the overall design of the shell, but such inconveniences can be easily tolerated, given that the purpose of most of the items responsible for the most important functions becomes clear to anyone to the user.


In addition, do not forget that FreeNAS is an open project, which means that any user can take part in the development of the program or help the authors with the translation. So it's correct translation of the FreeNAS operating system into Russian will not keep you waiting.

Creating a mirrored RAID array

Connecting two hard drives in RAID 1 implies that the information on them will be duplicated one to one. Thanks to such an effective backup method, failure of one HDD will not lead to data loss. To return to normal operation, you just need to replace the failed hard drive with a new one. Of course, in RAID 1 mode, only one of them will be available for manual copying of files. But considering that NAS server All your data will be stored: documents, photographs and videos, then you should not regret the lost capacity.

Of course, you yourself are free to choose the organization of the disk system, but just remember that storing files on hard drives without array joining entails complete loss of data.

To create a mirror RAID array of two hard drives, click on the “Storage” button on the toolbar. Then click on Volume Management to create a new disk partition. In the window that appears, specify the partition name and, while holding down the Ctrl key, select both hard drives with the mouse

To create a mirrored RAID 1 array and format it with the ZFS file system, activate the "ZFS" and "mirror" buttons. Confirm your choice by clicking "Add Volume". Formatting disks, depending on their performance and capacity, can take from a few seconds to one minute.

How to share folders on FreeNAS

As we have already found out, FreeNAS allows you to create personal folders for each user, which only they themselves will have access to. But to exchange files between computers on a local network, it makes sense to create a common directory that all users without exception will have access to.

To share a folder, click on the "Sharing" button in the toolbar, go to the Windows (CIFS) tab and click on "Add Windows Share (CIFS)". In the window that appears, specify the name of the folder and its location on your hard drive.

The disk partition created earlier based on the RAID array is located at:

For the changes to take effect, click on the “Ok” button. After this, the FreeNAS operating system will prompt you to start the CIFS service. To allow it to run, click on the “Yes” button. After this, make the shared folder the home folder for the user account you created earlier. That's all. Server for sharing files on a local network fully configured.

FreeNAS is an operating system often used for network file storage, based on the ZFS file system with built-in open source RAID support. The FreeNAS operating system is completely based on BSD and can be installed on both virtual and physical machines to give users the full ability to share their files, for example for collaboration on a computer network.

Using FreeNAS you can easily create your own data storage, which can be used not only on the enterprise local network, but also, for example, on a home network. Management is carried out through a special web interface, originally written in PHP, but more recently in Python/Django.

FreeNAS is supported by Linux, Windows and MAC OS, as well as numerous virtual systems such as VMware and XenServer, using protocols such as CIFS (Samba), FTP, NFS, Rsync and others.

On your home network, you can also build FreeNAS storage, store videos and files there for later use, for example, video streams, in any network devices or even on a TV that supports Smart TV. If you are planning to create a torrent portal, you can also use FreeNAS for these purposes.

There are several plugins available for FreeNAS, which consist of the following improvements:

  • Own-Cloud - to build cloud data storage
  • Plex Media Server - for creating your own streaming video server
  • Bacula - used as a backup server
  • Transmission - to create your own torrent server

FreeNAS Features

  • ZFS file system support.
  • Supports built-in RAID with support for parity, crowns, smart tests.
  • Supports directory services such as LDAP, Active Directory, NIS, NT4.
  • Support for services such as NFS, SSH, CIFS, FTP and iSCSI.
  • Supports file systems such as NTFS and FAT.
  • Periodic creation of snapshots (copies of systems) and support for replication, rsync.
  • Web interface with GUI and SSL support.
  • Reporting system for subsequent notification by e-mail
  • Data encryption and many functions to keep your data safe
  • UPS support
  • Rich GUI interface with graphical reports on the use of computer resources (CPU, Memory, Hard Disk, Network, etc.)

The article will be large, therefore, I will divide the article into parts, I will start with installing and configuring FreeNAS, and then advanced setup, installing and configuring a video streaming server and torrent server, updating the FreeNAS server.

In my case, I will create a virtual machine on VirtualBox, the machine will be 64-bit, the operating system is FreeNAS 9.3 (beta version, the latest one is on the manufacturer’s website), IP address 192.168.0.200, 1 5 GB disk for the operating system and 8 disks ( 5 GB each) for a data storage system (we will need them in the following articles), there may naturally be fewer disks in a real machine, for example 1 system disk and 2 hard disks for organizing a mirror RAID.

Download FreeNAS 9.3

To install the FreeNAS operating system, we need to download the latest version, if you are installing on a work machine, then of course I recommend that you install the latest stable version, but I hope that version 9.3 will soon become so, therefore, I consider it as the latest possible for installation version. So, let's go to . And download the latest version, I repeat once again - in my case this is the beta version of FreeNAS 9.3, if you need a stable one - look for it there, it is available for download in the “Stable” section

After which, an ISO image of the OS is downloaded, which you can later burn to a CD or use for further installation on virtual machines (in my opinion, they all support ISO disk images). Just below you can download an image for a USB flash drive, which can be written using many utilities in Linux and Windows:

By the way, the size of the ISO image of the stable version of FreeNAS 9.2.1.8 is 199 MB, and the beta version 9.3 is 381 MB, that is, the changes should really be interesting :)

So, after downloading, we will create a virtual machine using the parameters specified above.

FreeNAS Installation - Initial Virtual Machine Preparation

First, I'll create a virtual machine in VirtualBox. I will go through this installation moment very quickly and will try not to get hung up on any unnecessary things, since most likely your installation will take place on a real machine. Let's go to VirtualBox, click on the "Create" button, create a machine with the following parameters:

Next, in the settings, click “Do not connect a virtual hard disk” - we need to select, later, a SCSI controller, since on an IDE controller we will not be able to connect a lot of hard drives (it will be possible to connect 4 devices to the IDE controller)

After that, the machine is created, we go into the settings of our newly created virtual machine, in the “Media” tab and add our SCSI controller, 8 disks of 5 GB, one system disk also of 5 GB and one optical disk for our ISO image (but already on the IDE controller, since it still didn’t start on SCSI), that is, it all looks like this for us:

And we launch our virtual machine. Then we move on to the next chapter.

FreeNAS Installation - Installation Process

To install FreeNAS we select Install/Upgrade. This will install or update the OS.

Next, we agree that all data on disk da0 will be cleared and this disk cannot be used to allow shared access to the disk (it cannot be used as a file storage), select “Yes” and press Enter:

Returning to the menu, simply click on “Reboot” or reboot our computer/virtual machine.

After the first launch, the system will take some time for initial setup. And soon you will see this menu:

Setting up a network on FreeNAS

Let's configure our network interface to the address that I said earlier - 192.168.0.200 (in your case - of course, it may be different, you can edit these parameters yourself, maybe the settings that your DHCP server will give you will be enough for you). In my case, I will still write the address 192.168.0.200 in my 0th grid.

In the menu I press “1” and configure the network, initially, select the interface (I have one - em0), then refuse to delete the interface (n), refuse to reboot the network interface (n), refuse configuration via DHCP (n) , and then agree with the IPv4 (y) setting. We leave the interface name the same if you don’t want to change its name (em0), then specify the IP address of the future file server (192.168.0.200 in my case), specify the mask 255.255.255.0, and by pressing Enter we then refuse to configure the IPv6 address (if it is not used by you) - (n):

after that, the system will think a little and configure everything according to your data, and after that you will see a new IP address:

Next, we configure the Default Route - where we indicate the gateway of our network, in the menu we press “4”, where we agree with the configuration of the IPv4 gateway (y), write the gateway address - 192.168.0.100 in my case, and then refuse to configure the IPv6 gateway (if it is you are not using):

Next, set up DNS, press the “6” button in the menu, then write our DNS prefix, in my case let it remain “local” and then enter the DNS servers in accordance with our network, I specified public DNS as DNS 2 and 3 Google (8.8.8.8 and 8.8.4.4)

In order to be sure that the settings are applied (I still use the Beta version), I will reboot the machine by selecting item 11 in the menu and pressing Enter.

Next you will see general parameters - about your system, and many interesting tabs, I hope you, like me, are seized by the desire to click on them and see what each of the settings means, but this ends this part of the installation and the next one, on advanced FreeNAS settings I will write a little later, however, I will please you with the fact that the setup is not difficult and you can do it yourself:

Unfortunately, it is not easy to fully test a product in a virtual environment. The hardware requirements, if at the very, very minimum - 8GB RAM and a multi-core processor, are simply minimal - 16GB of memory. Recommended - 32GB minimum. On the other hand, for a real home system, this is a lot, but not prohibitive. NAS4FREE at my house is installed on a machine with 16GB of memory (but there are slots up to 32), although the minimum requirements for NAS4FREE are 512Mb, and it can already run at 2Gb.

The first thing that catches your eye is the completely redesigned interface. Beautiful, and this is a clear plus.

IN video are pushing for virtualization. There is bhyve (NAS4FREE also has it, but without a webguy) and Docker (NAS4FREE does not have it). And for good reason. Both a full-fledged hypervisor and the most popular container paravirtualization are important and necessary. And that's cool. And here the memory requirements become more clear. To deploy a couple of virtual machines, they will have to give at least a gigabyte. Yes, zfs includes a prefetch with 4 GB for ARC. And the system pool is on zroot. Yes, you need at least a gigabyte for the axis. Yes, the FreeNAS add-on itself should also live somewhere with beautiful pictures. So 8 gig is really just enough, we need more.

Now let's see what we had to pay for it. The main idea of ​​the developers was to make sure that the add-on always knew everything about both the hardware and the configuration of the base axis. For example, on NAS4FREE (and FreeNAS 9) this is not always the case. I can create a ZFS pool on the command line - and the system won't know about it until synchronization. Or change the network card parameters via ifconfig. Etc. and so on. So it seems like a good idea. But its consistent implementation means complete isolation of the user from the basic axis. And access is only through the add-on.

The volume of FreeNAS code in the previous version was ten times greater than the volume of NAS4FREE code. And now I’m even afraid to imagine... And still, IXSys is not MicroSoft, neither Windows nor PowerShell could be created. Judging by the already published documentation, only the main tasks were added to the gui. The rest was wrapped in our own homebrew command line commands. The ZFS dataset is now created not by the zfs command, but by the volume command. Instead of ifconfig you need to type network and so on.

Are you ready to learn a newly invented command line language? I think only if you get paid well for it at work. But definitely not at home. So a home user of FreeNAS will be limited to basic functionality brought into the webgui. But is such a basic user ready to buy a NAS with these hardware requirements? And does he really need the main feature of the product - virtualization? So, one to one, the purpose of FreeNAS Corral is purely corporate. And the fate of the plugins of the previous version clearly shows this.

The fact is that for many years, from the very beginning of the existence of FreeNAS in the hands of IXSys, the box provided only basic storage and access functionality. And everything that was considered unnecessary (for example, a torrent client) was provided as plugins. Technically, these plugins worked on top of FreeBSD cages/jail, which nas4free users are also very familiar with. So the cell support has been completely removed. The offorum is buzzing with groans - what to do. The answer is to transfer containers to Docker. We don’t have a manual on exactly how to translate, but hang in there. Cool? Well, not for home! And in an enterprise, a torrent client is not only not needed, it is inappropriate there.

By the way, the base axis of FreeNAS is FreeBSD 10. UPD This is according to marketers. I installed it in a virtual machine and it turned out to be FREEBSD 11.0-STABLE /UPD It’s not clear whether it’s 10.3, 10.2 or even older. But FreeBSD 11.0 was released last October. So leaving 10 in the product name is somehow not cool. That’s why, I think, they chose the name without a number. Corral is not about corals. This is a corral, a word from American cowboy history. A pen for livestock, often temporary.

FreeNAS 9.1.1- distribution kit for quick deployment of network storage, based on FreeBSD, features integrated ZFS support and is fully configurable via a web interface. To organize access to the storage, FTP, NFS, Samba, AFP, rsync and iSCSI are supported; software RAID (0,1,5) can be used to increase storage reliability; LDAP/Active Directory support is implemented for client authorization.

Version FreeNAS 9.1.1 notable for its transition to a codebase FreeBSD 9, (the last release was based on FreeBSD 8.3), as well as doing a lot of work to improve usability, stability and performance. The improvements affected almost all subsystems of the distribution, from the web interface to the plugin connection system. The project development infrastructure has been switched to Git.

FreeNAS can be installed on a hard drive or USB flash drive. In this case, the system occupies the entire volume of the media on which it is installed, regardless of capacity, and all network resources for storing information are located on other hard drives.
those. the freenas system itself occupies 1 hard drive on which nothing can be stored, and the second one can already store all our information!

I hope I didn’t bore you too much with such a long introduction, so let’s move on to the installation. First download the FreeNAS iso image and burn it, for example, to a CD.

Installation.

We insert the FreeNAS CD into the drive and boot from it. We see this picture


The first thing we will be asked to do is install FreeNAS on some storage medium, the following window will appear:

We agree and proceed to selecting the hard drive where we will install the system. Our two hard drives will be listed.

We select the desired hdd for installation, then we will be warned that all data on it will be lost.

We agree and continue. The installation process goes quickly, and upon completion we will be prompted to remove the CD and reboot.

Initial setup

After restarting we will see the FreeNAS start screen:

Here you can perform some initial steps (options from 1 to 11), a little lower the current IP address of this PC will be displayed if it was able to obtain it via DHCP. First of all, let’s change the IP address to our own, to do this, go to the point Configure Network Interfaces by pressing button 1 and Enter.
Here we will be shown a list of network cards on our PC.

Because we only have one, then the list will consist of only one item, in my case number 1 will be the adapter em0(as in the screenshot above). Select it by pressing 1 and Enter.
FreeNAS will then ask if we want to receive an address automatically via DHCP or not? - we answer no.
The next question is Configure IPv4 - The answer is yes.
Next, you need to specify the interface name - write the name.
Next, write the desired IP address.
For the next question, enter the subnet mask.
The next question is whether we want to configure IPv6 - we say no.

They will tell us that the network is configured, but for complete happiness we need to configure a gateway. Let's go to the point Configure Default Route, by pressing button 3. Here we will be asked whether we really want to configure a gateway for IPv4 - we say yes and to the next question we enter the IP address of our router (if we have one). We answer the next question about configuring IPv6 in the negative.

Control Panel

First of all, we go to the FreeNAS WEB panel using the IP that we just assigned.

We see a red flashing traffic light (alert), it asks us to put a password on our WEB panel
Find the button on the left account – change password

And we change the password, after changing the password the traffic light will start to light green, which means everything is fine :)

Next we will go to the bookmark Settings and change the time zone there so that our FreeNAS logs are kept correctly. Then click OK to save the settings. It would not be amiss to indicate DNS server in the network settings, to do this, click on the button Network in the top panel and in the field Nameserver 1 and enter the IP address of our router (or a dedicated DNS server if there is one) there. Don't forget to save the settings.

Now we need to add hard drives to the system and define the file system. This is done in the section Storage(button in the top panel). Next, click on ZFS volume manager.

Let's indicate Volume Name, then click on the plus sign in the category Available disks, and then add volume

Creating network resources

FreeNAS can create resources for all platforms: for Apple (AFP), for UNIX systems (NFS) and for Windows (CIFS). And this is not counting universal FTP, etc. Now we will look at creating a resource for Windows computers.
Let's go to the section Sharing, Windows and press the button Add Windows Share

A window will appear in front of us in which we will indicate the name of the resource to be created (name), then into the field Path we need to select the dataset that we made for the file dump. If you want to provide anonymous access to this resource, you can check the box Allow Guest Access going down a little.

Just in case, here is a list of interesting parameters that you can specify when creating a resource:
Export Read Only- make the resource read-only
Browsable to Network Clients- Visibility of the resource in a network environment. If you uncheck this box, we will make a hidden ball.
Inherit permissions- inherit permissions
Export Recycle Bin- add cart, i.e. data from the shares will be deleted first to the trash
Show Hidden Files- display hidden files
Guest Account- guest account. It's better to leave it as is.
Allow Guest Access- allow guest login (i.e. you can log into the share without any passwords, etc.).
Only Allow Guest Account- guest entrance only. It will not be possible to separately enter a password when logging into the share in order to increase your rights.
Host Allow- a list of IP addresses from which you can access the share. You can use a space as a separator.
Host Deny- a list of IP addresses from which you cannot access the share. You can use a space as a separator.

Now let's move on to setting up the service CIFS. Let's go to the section Services, and then click on the wrench icon opposite the service CIFS

In the window that appears, we need to specify a number of parameters:
Authentication Model- access scheme. Possible options: anonymous access (Anonymous) and by logins (Local User). We choose what we need.
NetBIOS Name- computer name on the network.
Workgroup- name of the working group. It must be set the same as on your other computers on the network.
Description- if this field is not filled in at all, then FreeNAS substitutes uninformative service information instead. Therefore, we recommend that you write at least a space in this field.
Selecting encodings (DOS charset and UNIX charset) - you can set everything as shown in the screenshot above.
Local Master- define FreeNAS as the main computer in the workgroup.
Time Server for Domain- make FreeNAS an accurate time server for network computers.
Guest Account- Guest account can be left as is.
Allow Guest Access- allow guest login to network resources. Do not check this box if you are using a login and password access scheme (Local User).
File Mask- access mask for created files. At first it is better to set this value to 0777
Directory Mask- the same as File Mask, only for catalogs.

The remaining parameters can be left as they are. Scroll to the bottom of the page and click OK. All you have to do is enable the service CIFS, to do this you need to click on the icon OFF next to the service name. After a couple of seconds its status will change to ON.

Now you can try to access our created folder from any computer on the network.

Upd. I completely forgot, you may need to set the rights to the created share in order to safely upload files. (storage - active volumes - change premission)

In the following parts I will tell you in more detail about how to set up restricting access to shares, creating quotas, setting up a torrent download, dlna mediatomb server for connecting to a TV, and many more interesting little things