Installing and configuring FreeNAS (network storage device). About the new FreeNAS Creating network resources

Hi all!

In continuation of our reviews about the FreeNAS network attached storage, we decided to touch on the topic of creating an FTP server. This is not as difficult as it might seem at first glance, and now we will show you how to set up FTP in just 5-10 minutes.

Just in case, our previous reviews can be viewed at the links:

  1. [this review] FreeNAS and FTP setup
  2. FreeNAS 8.2.0, configuring torrent client and dlna

FTP Options

So let's go to the FreeNAS web interface and go to the ServicesControl Services menu

Here we click on the button with the image of a wrench opposite the FTP service, after which the main settings window will be displayed in front of us:

Before adjusting these parameters, we will short description the most interesting points:

Parameter name Meaning Description
port 21 On which port the FTP server will run. Default = 21
Clients 5 The maximum number of clients connected to the FTP server at the same time
Connections 2 The maximum number of simultaneous connections from one IP address. Value = 0 removes the restriction.
Login Attempts 1 The maximum number of attempts to enter an incorrect password when logging into the FTP server. Increase this value if people often make typos.
timeout 600 The idle time in seconds after which the client will be automatically disconnected from the FTP server.
Allow Root Login Allow login as root. It is not recommended to do this.
Allow Anonymous Login Anonymous access to the FTP server (without logins and passwords)
Path You need to click on the Browse button and specify the root of the data location for the FTP server
Allow Local User Login Must be used if Allow Anonymous Login is not set.
Banner The message that is displayed to users when they log into the FTP server. If the field is left blank, the version of the FTP server will be displayed.
file permission Access template for newly created files on the FTP server. Read - reading, Write - writing, Execute - execution. Owner - the owner, Group - the group the owner belongs to, Other - all others.
directory permission Same as File Permission, but only for directories
Local user upload bandwidth Maximum download speed limit for users, KB/s. 0 = no limit.
Maximum download speed limit for users, KB/s. 0 = no limit.
Local user upload bandwidth Maximum download speed limit for anonymous users, KB/s. 0 = no limit.
Local user download bandwidth Maximum download speed limit for anonymous users, KB/s. 0 = no limit.
Enable SSL/TLS Enabling encryption of the connection between the user and the FTP server. First you need to configure certificates in SystemSettingsSSL
Always Chroot Force users to be redirected to their home directory
Auxiliary parameters Extra options

Setting up

In the Path - field, specify the root directory of the entire FTP server. Under it, you can create a separate dataset or use an existing one. We will use an existing dataset exchange, which we created in the first FreeNAS review, like this:

And when creating a new dataset, do not forget to set the necessary rights in the access rights settings. If you have never dealt with the division of rights in Unix systems, then for a start we advise you to set the maximum rights.


The same applies to the rights for the File Permission and Directory Permission parameters. If you are not sure what rights you need to assign - set the maximum, i.e. all checkboxes:


Access can be made both anonymous and by logins and passwords. To do this, check the Allow Anonymous Login and Allow Local User Login checkboxes.

All users need to register home directories. They can create separate folders, or you can enter the path to our dataset, for example, /mnt/vol1/exchange
The /noneexisten value indicates that no home directory has been set.

To assign a home directory to an anonymous user, you need to edit the built-in ftp login account.
If you want each user to get to their home folder after logging in to the FTP server and nowhere else, then check the Always Chroot checkbox.
A word about Auxiliary parameters - this is quite a powerful tool. For example, we want to prevent everyone from deleting files from an FTP server, for this we need to enter the following construction:
DenyAll

The remaining parameters should not cause you any difficulties, guided by the table above, everything can be set as it should for yourself. But if suddenly you don’t succeed, write in the comments, we will try to help and edit this review accordingly!

We encrypt information transmitted via FTP. In principle, in most cases it is not necessary to do this, but if you really want to, then we will tell you how it is done in FreeNAS. The first step is to set up an SSL certificate, for this you need to fill in some rubbish in the place shown in the screenshot below and click the Save button at the bottom of this page.

And finally, in the FTP server settings, check the Enable SSL / TLS checkbox. Then, when you enable FTP, you need to access the resource using the ftps:// protocol

By and large, the setup ends here. You just have to enable the FTP service by clicking on the OFF button, which after some thought will turn into ON.

Good luck learning!

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, as distributions of programs, multimedia files are constantly growing, which requires large amounts of storage. Moreover, home-oriented NAS servers are a convenient means of storing information. NAS easily solves the problem of lack of free space on your PC's hard drive, but also becomes a centralized storage place 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 in local network whether it's a laptop, tablet, smartphone or TV.

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

Of course, you can also use an old PC (you should immediately exclude computers from the "ancient" generation of Pentium 4 processors from this concept). But better, if possible, as hardware platform for network storage, which will be running the FreeNAS operating system, use a compact computer built around 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 work almost silently, and besides, they are not at all expensive. Volume random access memory 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 data storage. Security is important for a NAS server, but if you have something to cherish. Depending on the content, using RAID is a moot point.

How to burn OC to a flash drive

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

First you should download the archive with the image of the operating system, choosing 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 the flash drive or USB HDD to the computer and format it by selecting FAT32 as the file system (before starting the procedure, make sure that there is no important data on the flash drive, as all its contents will be deleted) - click "RMB" on the USB drive in the "My Computer" folder » to call the context menu of «Explorer» and select the «Format…» item.


You can also use similar utilities from the article.

Click on the folder image to select the *img file extracted from the archive containing FreeNAS OC. In the drop-down list on the right, select the drive letter on which the OS will be installed. Then click on the "Write" button and wait for the process of copying files to the USB flash drive.

If during recording Image program Writer for Windows randomly gives an error, repeat the procedure. At the end of the recording, you will receive a bootable USB flash drive.

Installing FreeNAS OS on a NAS Server

Insert the FreeNAS flash drive into the USB port of the computer that will be used as NAS servers. We will need to select this flash drive as a bootloader 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's BIOS settings menu.

In the menu, find the item Standard CMOS Features. Press the "Enter" key on it.

Attention! The names of the items may differ depending on the model of the motherboard (look for the word "Boot" in the name). This also applies to access to system settings. motherboard, as it may also differ from those indicated in my example. Find out about how to open bios when booting pc, you can in the manual to motherboard or while the computer is booting: at the bottom of the screen is displayed brief information about hotkeys.

Use the navigation arrow keys to assign the USB flash drive corresponding to item c as the First Boot Device as the First Boot Device. USB device(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 with the changes with the "Y" key. The FreeNAS boot process takes about 1 minute. The fact that the operating system is ready to work 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 through the web interface. Now you can turn off the monitor and keyboard, and also put the computer in a place convenient for you. The FreeNAS operating system will be launched from a flash drive in a fully automatic mode, as well as from a familiar hard drive inside a PC.

Creating an account in FreeNAS OS

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

You must first set an administrator password, as the default FreeNAS operating system administrator password missing, 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 enter the password that will be assigned to this account. To apply the changes, click "Change Admin Password". Log out of FreeNAS by clicking "Log Out".


Refresh the page in your web browser to log in again. This time, FreeNAS will ask you to enter the 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 username, password and the name of the home folder, in which he can not only view files, but also create new ones.

Given that hard disks until formatted, leave the user's default home folder name unchanged. To complete the operation, click on the "Ok" button.

The system is almost ready to go. There are only a few final steps left.

Changing 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 possibilities of FreeNAS, it is worth switching the system language from English to Russian.

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

Ready! All inscriptions in the FreeNAS menu are now displayed in Russian. Unfortunately, some Russian-language names of menu items and buttons, unlike English names, do not fit very well into the overall design of the shell, but you can put up with such inconveniences, given that the purpose of most of the items responsible for the most important functions becomes clear to anyone 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 what's right translation of the FreeNAS operating system into Russian will not keep you waiting.

Creating a Mirrored RAID

Connecting two hard drives in mode RAID 1 implies that the information on them will be duplicated one to one. Thanks to so effective way Reserve copy failure of one HDD will not result in data loss. To return to the usual mode of 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 on NAS server all your data will be stored: documents, photos 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 remember only that storing files on hard drives without merging into an array results in complete loss of data.

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

To create a mirrored RAID 1 array and format it in the ZFS file system, activate the "ZFS" and "mirror" buttons. Confirm your choice by clicking Add Volume. Formatting drives, depending on their performance and capacity, can take anywhere 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 of the users, to which only they themselves will have access. But to exchange files between computers on a local network, it makes sense to create a shared directory, access to which will be available to all users without exception.

To share the 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 the Ok button. After that, the FreeNAS operating system will prompt you to start the CIFS service. To allow it to run, click the "Yes" button. After that do shared folder home for the previously created user account. That's all. File sharing server on local network fully configured.

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

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

IN roller pushing for virtualization. There is bhyve (also available in NAS4FREE, but without webguy) and Docker (not in NAS4FREE). And not in vain. Both a full-fledged hypervisor and the most popular container paravirtualization are important and necessary. And this is cool. And here the memory requirements become clearer. To deploy a couple of virtual machines, they will have to give at least a gigabyte. Yes, zfs includes a 4 GB prefetch for ARC. And the system pool is on zroot. Yes, at least a gigabyte is needed for the axis. Yes, the FreeNAS add-on itself must also live somewhere with beautiful pictures. So 8 gig is really short, 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-in always knew everything about the hardware and the configuration of the base axis. For example, in 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 the sync. Or change the network card settings via ifconfig. Etc. and so on. So the idea seems to be good. But its sequential implementation means complete isolation of the user from the base axis. And access is only through the add-on.

The amount of FreeNAS code in the previous version exceeded the amount of NAS4FREE code by ten times. And now I'm even afraid to assume ... And anyway, IXSys is not MicroSoft, neither Windows nor PowerShell could be created. Judging by the already published documentation, only the main tasks were introduced into the gui. The rest is wrapped up in commands of their own homebrew command line. ZFS dataset is no longer created 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 the newly invented command line language? I think only if you are well paid for it at work. But definitely not at home. So the home user of FreeNAS will be limited to the basic functionality rendered in 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 superfluous (for example, a torrent client) was provided as plugins. Technically, these plugins worked on top of FreeBSD jails, which nas4free users are also familiar with. So the cell support is completely removed. Offorum is buzzing with a groan - what to do. The answer is - transfer containers to Docker. We don’t have a manual on how to translate exactly, but you hang on there. Cool? Well, not for home! And at the enterprise, a torrent client is not just not needed, it is out of place there.

By the way, the base axis of FreeNAS is FreeBSD 10. UPD This is according to marketers. I put it in a virtual machine - it turned out to be FREEBSD 11.0-STABLE / UPD It's not clear, 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. Therefore, I believe, they chose the name without the number. Corral is not about corals. It's coral, a word from American cowboy history. Livestock corral, often temporary.

FreeNAS 9.1.1- distribution kit for fast network storage deployment, based on FreeBSD, features integrated ZFS support and is fully configurable via a web interface. FTP, NFS, Samba, AFP, rsync and iSCSI are supported to organize storage access, 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 the transition to the codebase FreeBSD 9, (the last release was based on FreeBSD 8.3), as well as a lot of work to improve usability, stability, and performance. Improvements have affected almost all subsystems of the distribution, from the web interface to the plug-in connection system. The project development infrastructure has been switched to using Git.

FreeNAS can be installed on a hard drive or USB stick. 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 placed on other hard drives.
those. the freenas system itself takes 1 HDD on which nothing can be stored, and on the second one all our infa can already be stored!

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

Installation.

Insert the FreeNAS CD into the drive and boot from it. We see such a picture


The first thing that will be offered to us is to install FreeNAS on some storage medium, the following window will appear:

We agree and move on to choosing a hard drive where we will install the system. Our two hard drives will be listed.

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

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

Initial setup

After restarting, we will see the FreeNAS home screen:

Here you can perform some initial actions (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, we will change the IP address to our own, for this we will proceed to the point Configure Network Interfaces pressing button 1 and Enter.
Here we will be shown a list network cards our PC.

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

We will be told that the network is set up, but for complete happiness, we also need to set up a gateway. I'm going to the point Configure Default Route by pressing button 3. They will ask us here - do we really want to configure the gateway for IPv4 - we say yes and for the next question we enter the IP address of our router (if we have one). The next question about configuring IPv6 is answered in the negative

Control Panel

First of all, we go to the FreeNAS WEB-panel by 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 turn green, so everything is fine :)

Next we'll go to bookmark Settings and change the time zone there so that our FreeNAS logs are correct. Then click OK to save the settings. It would not be superfluous to indicate DNS server in the network settings, for this click on the button network in the top bar and in the field name server 1 and enter the IP address of our router (or a dedicated DNS server, if any) there. Don't forget to save your 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 bar). Next, click on ZFS volume manager.

We indicate volume name, then click on the plus sign in the category available disks, and then add volume

Creating network resources

FreeNAS can make resources for all platforms: for Apple (AFP), for UNIX systems (NFS) and for Windows (CIFS). And that's not counting universal FTP, etc. Now we'll 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 specify the name of the resource to be created. (name), then in the field Path you need to select the dataset that we made for file cleaning. If you want to provide anonymous access to this resource, you can check the box Allow Guest Access dropping down a bit.

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
Browseable to Network Clients- Visibility of the resource in the network environment. If the box is unchecked, then we will make a hidden ball.
Inherit permissions- inherit permissions
Export Recycle Bin- add a shopping cart, i.e. data from the balls will be deleted first to the trash
Show Hidden Files- show hidden files
guest account- guest Account. Better to leave it as is.
Allow Guest Access- allow guest entry (i.e. you can enter the ball without any passwords, etc.).
Only Allow Guest Account- guest entry only. It will not be possible to separately enter a password when entering the ball in order to increase your rights.
Host Allow- a list of IP addresses from which you can enter the ball. Space can be used as a separator.
Host Deny- a list of IP-addresses from which it is impossible to enter the ball. Space can be used as a separator.

Now let's move on to configuring the service CIFS. Let's go to the section Services, and there we 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 logins (Local User). We choose the right one.
NetBIOS Name- the name of the computer on the network.
Workgroup- name of the working group. It must be set the same as your other computers on the network.
Description- if this field is not filled at all, then FreeNAS substitutes non-informative service information instead. Therefore, we recommend that you write at least a space in this field.
Choice of encodings (DOS charset and UNIX charset) - you can set everything as shown in the screenshot above.
local master- define FreeNAS as the master computer in the workgroup.
Time Server for Domain- make FreeNAS a time server for computers on the network.
guest account- guest account, you can leave it as is.
Allow Guest Access- allow guest access to network resources. Do not check this box if you are using the 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, for directories only.

The rest of the parameters can be left as is. Move to the bottom of the page and click OK. It remains only to enable the service CIFS, to do this, 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 ball in order to safely upload files. (storage - active volumes - change premission)

In the following parts, I will tell you more about how to set up access restrictions to shares, create quotas, raise a torrent downloader, dlna mediatomb server for connecting to a TV, and many more interesting little things.

We remind you that attempts to repeat the actions of the author can lead to the loss of the warranty for 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 are not responsible for any possible consequences.

The first step is to decide on the iron component of the future NAS. We will consider installing and configuring the 7th branch of FreeNAS. Already now there are releases of the 8th branch of this distribution, but at least until version 8.1 they are not so interesting. FreeNAS is based on FreeBSD, which means that the list of supported hardware for them is the same. However, there are 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, for normal operation iSCSI requires at least 512 MB of RAM. In general, one or two gigabytes of memory will be more than enough for a home NAS, but you can get by with less.

Hard drives are better to choose capacious, with a large buffer and a speed of 5400-5900 RPM - they will be quiet and cold in operation. The time to buy an HDD, of course, is not the best, if we recall the recent flood in Thailand. The amount of storage 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 disk, install FreeNAS on it and store data there (we will consider this option), or you can install the system on a USB 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 building an array of drives.

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

⇡ Installation

Once the system is assembled, you can start installing FreeNAS. We 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, then you will need to try booting with ACPI disabled. If everything is fine, then we will see the main menu, where you need to select the 9th item to install the system.

We select the full (full) installation option and indicate the disk on which we will install the OS. For a partition with an OS, you need at least 380 MB, but you can allocate a little more, for example, half a gigabyte. If you put FreeNAS on a flash drive, you will have to refuse to create a swap partition (swap), as this can lead to rapid wear of the flash. The installation itself will take a couple of minutes at the 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 addressing other than 192.168.1.0/24. It is most logical to set a static IP address for the file server from your subnet, remembering 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 setting

Further configuration and management will be carried out exclusively through the web interface at http://ip-address-NAS/, which we set in the previous step. The default login is admin and the password is freenas. After entering, we 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 for entering the web interface and, after saving, log in again. By the way, do not forget to press the "Save", "Apply changes" and so on after changing any settings.

If you have allowed the creation of a swap partition, then you need to connect it. To do this, go to the "Diagnostics" → "Information" → "Partitions" section and carefully study the information about the partition of the disk. In our example, the disk is divided into three partitions of different sizes - for the OS, data, and swap. Orient yourself, which one, where possible in terms of volume. We need to navigate and find out the path to the swap partition. The disk name in our example is /dev/ad0 (it is visible from above), the third partition fits in size (256 MB). Thus, the path to it will be /dev/ad0s3. In general, those who are more attentive should have noticed that during the installation we were shown this path immediately after formatting the disk. Now go to "System" → "Advanced" → "Paging file", select the device in the type and specify the path. Click "Save".

It's time to deal with 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 drive from the list. If you have several of them in the 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, select UFS with Soft Updates. If you are adding another, already formatted data disk, then you must specify the appropriate file system type. Click "Add".

If you have unformatted disks in the system, then go to the "Disks" → "Formatting" section, select the desired disk (again, do not confuse anything) and format it. UFS is highly recommended, but not required. Now all drives can be mounted. We 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 FS type, and also drive in the name of the mount point, which must be unique for each disk. Click Add and Apply Changes. That's it, this completes the basic installation of FreeNAS.

⇡ Access settings

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 working group, the name of the NAS on the network, set the encodings, enable the time server and enable AIO as desired. You can leave the rest of the options as default 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 is 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 that, 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 file manager from the Extras section. The login and password for it is the same as for users in FreeNAS.

We will use SMB resources on the local network, but for access from the outside, it is better to enable the FTP server. Naturally, on the router, you will need to forward the 21st TCP port, as well as enable the DDNS service (this is also included in FreeNAS, if anything). 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 primary 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 authorizing in the FreeNAS web interface, you can use not only the administrator account, but also the details 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

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

The next step is to configure the 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 available at the link at the bottom of the page with parameters. The same Windows 7 NAS is easily defined 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 a directory for the database and folders with music. 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 shared home collection. True, access does not work in version 10.5, so switching to a younger version of iTunes may be a temporary solution.

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 in Software RAID. Then, in the "Disks" → "Software RAID" → "JBOD" section, add a new volume, for which we select a name and indicate the two disks that we have just initialized. Check the box "Create and initialize RAID" and apply the settings. If we planned to use this JBOD array in the future as a normal network drive, then we would have to format it in UFS and create a mount point for it.

mob_info