How to make nas from a windows 7 computer. Should I build a mini-server or NAS with my own hands or choose a ready-made one? Comparison of self-assembly Mini-ITX and I-Stor IS607. Implementation of the software part

This is another article about building another NAS for home use. What prompted me to write it? Starting to assemble a NAS for myself, I re-read all the googled articles in which people told how they chose and assembled storage for themselves. Thanks to these articles, I avoided some mistakes when choosing hardware and software. I assembled the configuration from the first time, which completely suits me to this day. Therefore, I am sure that my article may be useful to someone.

True, I must say that I am a system administrator by profession and this imposed certain requirements on the configuration, and on the article - the details in the descriptions with ~2 Mb illustrations. So yes, I assembled the NAS myself. But without fanaticism. In the article, I did not limit myself to describing the hardware, but also told how I use the resulting machine. Everyone interested is welcome under the cut!

In the life of every IT specialist, there comes a moment when the space for disks runs out in the case

Before running to the store, I tried to decide what I want to get from the device Now and what i might want Then.

  1. Storage of a large amount of data. It is obvious.
    But there was a small nuance in that I had a certain number of hard drives. Let's just say, nasysadmin. Those are the ones I was going to use. All discs are of different sizes, manufacturers and working time. In total, they gave me a volume of 2-3 terabytes that was quite sufficient for me.
  2. Torrents.
    The device must have a sane client for these purposes.
  3. Flexible settings and additional features.
    Such a vague criterion, just the same for the future, for the possibility of using additional services, for example, cloud storage or a media server.
  4. Low power consumption.
  5. Low or no noise level.
  6. Minimum price.

Ready NAS

By that time, I had experience at work with Synology DiskStation DS411 and D-Link DNS-320. I was in love with the Synology OS! Stable, convenient, understandable, its own repository with applications, useful updates - it's all about it. The iron itself also pleased with its uptime and silence. Only the price was not pleasing (end of 2014). I was not ready to give 20,000 rubles. for simply storing movies with music there. Naturally, there were cheaper models for two disks, but there are four disks for honor storage, and there are two in a stationary computer.

Using the DNS-320 as an example, I saw that if I choose the cheapest one, then I will get a more than modest device. Actually, distributing files in a local area is the only thing that this box can do more or less normally.
At this stage, it became clear that the NAS would have to be assembled from computer components.

HDD issue
While researching the prices of branded storage, I was also thinking about the configuration of disks in the system. RAID? JBOD? Separate volumes? On the one hand, it's wasteful to store movies with music on raid. In case of loss, they can be downloaded again. On the other hand, there are a couple of folders that need to be preserved and preferably without developing special backup scripts (backups need to be monitored and checked). In addition, the disks I already have are of different sizes. Accordingly, after assembling any RAID, I will lose hundreds of gigabytes by "cutting" disks to the smallest and the whole disk to checksums (for example).

Performance can not be objectively assessed. It handles NAS tasks on Windows Server remarkably well. I did not do synthetic tests.


The case with optimal price/quality ratio was quickly found. CoolerMaster Elite 120.

I looked at the cases and more compact, but their prices were no longer so compact. The case is comfortable and good quality. Three HDDs are inserted regularly.

The fourth one, through an additionally purchased adapter, into the CD-ROM compartment. (yes, yes, the adapter had to be collective farmed, there was no other in the stores)

The case comes with 2 fans. One for 120 mm for the HDD and one for 80 for the motherboard heatsink (you already noticed it in the previous photos).

A nice little thing in the kit were two adapters from 3.5 "to 2.5" HDD. A special pleasantness is that the adapters are suitable for any other case. They have bolt holes in a standard place, and the height of the structure with the installed disk does not exceed the height of a conventional HDD.

There were no problems during the build process. All wires are long enough, installation and subsequent access to components is convenient (except for the obvious things). In general, a building for people!

I had all the rest of the hardware, namely disks, power supplies and RAM (SO-DIMM). In total, I got into 5 085 rubles.

I note that two gigabytes of RAM is noticeably small. I keep the minimum possible set of programs on the servers. I do not have any Updaters from Google and Adobe, some applications from drivers, etc. hanging. The minimum set, only the most necessary. With all this, in a calm state, 800 megabytes of memory are occupied. It is clear that with a certain user activity, the active use of the swap file begins with all the consequences. In general, take more memory.

Noise
He is. Do not put next to the bed. The noisiest of fans blows over the heatsink on the motherboard. The fan in the power supply and on the hard drive cage is not audible over the sound of the drives themselves. It is a pity that the case fans from the kit do not support PWM. Then the motherboard would control their speed:

And I'm sure I would always keep it to a minimum. I also tend to believe that the heatsink on the processor does not require additional cooling provided in the case. Be that as it may, the issue with noise faded into the background. I put the system unit where its noise does not interfere at all and forgot about it for now. When the time comes, either the fans will be replaced with PWM-enabled ones, or a controller for them will be purchased. Well, for example:

Soft

To work with torrents, I first installed the classic μTorrent. It has a wonderful feature in the settings: you can specify a folder that µTorrent will constantly monitor for the presence of a torrent file. As soon as a new file is found, the program starts downloading. And there is one more checkbox "Delete the torrent file when the download started". What happens. I'm at my computer, downloading the torrent file and putting it in a special folder on the NAS. After 5-10 seconds it disappears. This means μTorrent "took" it and started downloading. Another checkbox called something like “Add a random extension to a file until it is completely downloaded” allows you to see in the download folder which files are still downloading and which have already been downloaded. According to this scheme, I did not need the μTorrent interface at all to download torrents.

I went even further and installed YandexDisk on my server, instructing μTorrent to look for torrent files in the YaDisk folder. Now, sitting at work and picking up a film for myself for the evening, I put the torrent file on YaDisk and after 20-30 seconds it disappeared ...

The HWMonitor program was very useful, displaying a nice window on the desktop with the temperature of the sensors and the speed of the fans (by the way, about the temperature in the case):

When you enter via RDP, you can immediately appreciate that everything is spinning, spinning and not engulfed in the flames of a fire.

Unfortunately, the author in the new versions of the program divided it into paid and free. In the free version, only the minimum basic functionality remained. And all the buns like the small screen as on the screen, apparently, have been transferred to the paid one. I have version 0.6.0 beta.

wake-on-lan

This scheme did not work for me for a long time. I thought about the fact that most of the time the server just sits and wastes electricity. He certainly distributes torrents, but those unfortunate couple dozen of my favorite films that I keep for myself are not even a drop in the ocean. In general, the torrent network will not become poor at all if I stop distributing.

So, I want the NAS to work only when I need it. And slept the rest of the time. And wake him up over the network, and not with a button. There is Wake-on-LAN technology for this. This feature must be supported by the motherboard and the network controller (if it is external). Fortunately, many models have this function, as well as mine. The computer wakes up using a "magic packet" sent to the network indicating the MAC address of the network card. There are specialized free programs for this, or, for example, my Asus router has such a function. But during operation, it turned out that Windows itself sends this magic when accessing a network resource. And when accessing RDP and when accessing a network folder. This is both good and bad. The good thing is that no additional programs are needed. And here's the bad thing, if the shared folder is connected on the client as a network drive, or added to favorites:

Then when the client is turned on, a “magic packet” will automatically be sent to the server and wake it up. I found this out when I was trying to figure out why my NAS was waking up on its own. In the case of a network drive, the behavior is clear - the client tries to get information about the drive in order to display its status (size, availability). But why Windows checks links in favorites is not clear to me. Although this feature may come in handy for someone - he turned on his working machine, the NAS started automatically with it.

The server can restlessly “sleep” not only because of windows machines on the network. There were times when the NAS went to sleep for several days in a row and immediately woke up. I sin on the router, but there is no evidence yet.

The server goes to sleep by its standard means if there is no network activity during the specified time.

μTorrent has been replaced by Free Download Manager. It has a checkbox "Close program when download is complete". I start the download, check the box, disconnect from the remote desktop. Free Download Manager closes when download is completed, NAS goes to sleep on inactivity timer.

YandexDisk naturally also had to be removed from the server.

wifi

When I thought about where to put the NAS in the apartment, I decided to try Wi-Fi. Fashionable, comfortable, modern. TP-LINK TL-WN881ND was purchased:

Everything was connected through the Asus RT-N12 router. Everything was great until I sat down to watch the movie in good quality. Regular .mkv 1080p ~ 20 GB in size. In the middle of the movie, the picture and sound began to break. Media Player Classic showed that all its buffers were empty and barely pulled up the next piece of video. It was like that with all the "heavy" films. On simple copying of a large amount of information, I also noticed that after a while the speed sagged significantly. A superficial search for information on this problem did not give any results, and it was easier for me to throw a twisted pair cable to the server than to deal with Wi-Fi further.

In no case do I want to slander wi-fi and make loud statements about its readiness for a long and high load. But if you are going to connect your NAS through it, then be aware that there may be problems.

For example, banal data backups. If locally, then the same Cobian Backup is scheduled to a special folder. If over the Internet, then BitTorrent Sync. In the case of Cobian, do not connect the backup folder as a network drive. In the case of BitTorrent Sync, use shadow copies on the server (what is it and how to set it up). Encryption viruses will no longer be so scary.

A home server at work often comes in handy for me when I need to check access to work resources from another IP from the Internet. Any VPN, OpenVPN, etc.

Media server. In tandem with Smart TV, all multimedia functions can be completely shifted to them. If the TV has a normal browser and keyboard and mouse support, then you can even download content through the TV.

CCTV server in the peephole. Or a video recording of the cat’s activity…

The publication is intended for people who are far from system administration. This post demonstrates the basic features of the wonderful NAS4Free operating system, which allows you to deploy a home NAS even on low-powered hardware, with no knowledge of FreeBSD and the command line. The first part of the publication is located.

So, we have a box with the following characteristics:

  • Chassis: Thermaltake Core V1;
  • Power supply: Chieftec HPS-350NS;
  • Motherboard: GIGABYTE GA-J1800N-D2H;
  • RAM: Transcend SO-DIMM 2Gb DDR-III 1333Mhz x 2;
  • HDD: WD Re 2004FBYZ x 2 (before making round eyes, read the first part);
  • Cooling: TITAN DC FAN (80 mm, 2000 rpm) x 2.
It's time to turn it into a home NAS that's as reliable as it gets under the circumstances. And Zettabyte File System will help us with this - perhaps the best solution for organizing a fault-tolerant and, at the same time, productive file storage. Developed by Sun Microsystems for Solaris, ZFS was later ported to Linux and FreeBSD. Among its many advantages, we will be interested in the following:
  1. Creation of datasets, thanks to which it becomes possible to selectively control file compression and deduplication, set disk quotas, all without the participation of managers like LVM;
  2. Data integrity check using 256-bit checksums;
  3. Automated creation of backups based on snapshots;
  4. The ability to combine disks into RAID-like arrays at the software level.
Among specialized solutions capable of working with ZFS, two competitors clearly stand out - FreeNAS and NAS4Free. Such "mirror" names are by no means accidental - both builds are based on FreeBSD, and NAS4Free itself is a fork of FreeNAS 0.7, which originated at the time when the original operating system came under the wing of iXsystems and embarked on a commercial footing. NAS4Free is my personal favorite. Why? Let's figure it out.

I think the above arguments are enough to make an unambiguous choice. Now let's deal with the installation and initial configuration of the system.

Installing NAS4 Free

Since there are only two disks in the system, we will use a USB flash drive as a boot drive. Which one - absolutely does not matter, any antiquity from 2 GB will be quite enough. If there are doubts about the health of the device, you can use the same Rufus by running several tests. Then everything is simple - and proceed to the installation. First you will see the following screen:

After a while, the text menu appears on the display:

We are interested in the 9th point - we select it. The installation process starts:

Expert mode is not touched, but the choice between GPT and MBR depends on the age of the motherboard of your machine. If you are an adherent of the “classics” represented by the BIOS, choose the second item. Worth UEFI - choose the first one. After confirmation, NAS4Free will kindly inform you what operations it is going to do - we agree to everything:

Then you should specify the USB flash drive on which the installation will be performed. It is easy to distinguish from the system drive by size and name:

The next step is to set the size of the paging file. The rule is simple: if you use a 2 GB drive - put 512 MB, 4 GB - put 1024 MB, if 8 - 2. In the comments, many had a fair question, but how reliable is it to install the operating system on a USB flash drive, all the more so to do a swap on it ? I consider it necessary to clarify this point. Firstly, the peculiarity of the embedded version is that a disk image of the system is created in RAM, that is, the flash drive is accessed only at the time of loading the NAS, as well as when saving the settings. Secondly, the installer requires the creation of a paging file without fail, while determining its size incorrectly. Make an 8 gig swap on a 4 gig device? Easily! In any case, according to the program, it's worth a try. To avoid errors, the easiest way is to set one of the correct values ​​​​given above. And, finally, the paging file is connected manually in the settings - it will not be used, which means that the flash drive will not be killed.

The installation process will begin, after which you will see the following screen:

You can turn off the flash drive and reboot - the installation was successful.

Now let's work with the NAS itself. Since we chose a budget option for a thin client as the motherboard, we will have to start by setting the boot parameters by connecting not only a USB flash drive to the device, but also a monitor with a keyboard. D-Sub and HDMI are present as video outputs, so there should be no problems. After turning on the machine, we hold down “Delete”, and set our USB flash drive as the main boot device in the “Boot” menu (the UEFI Shell will be loaded by default, but we don’t need it). We save the changes, reboot the NAS, and if everything is done correctly, we see the already familiar menu:

You can connect the NAS to your working environment in any way: through a router, a switch, a null hub - it all depends on your personal needs. Since you will probably want to bring the machine to your home network, the best option is a router, so let's set up a static IP address in step 2. Answer the questions asked by the system in sequence:

  • Do you want to use DHCP for this interface? – No (we want to set a static IP)
  • Enter new LAN IPv4 address - 192.168.1.250 (set by default, if your network already uses it - enter any free one)
  • Enter new LAN subnet mask - 24 (subnet mask 255.255.255.0)
  • Enter IPv4 default gateway - 192.168.1.1 (specify the address of the router)
  • Enter DNS IPv4 address - 192.168.1.1 (also specify the address of the router)
  • Do you want to configure IPv6 for this interface? - No (we simply do not need IPv6 in our home network)
This screen will indicate the successful completion of the setup:

This completes the preparation of the NAS - now you can connect the storage to the network and start setting it up.

Setting up disks

All operations are carried out through a convenient WebGUI - just type the previously set IP in the browser (in our case, 192.168.1.250) and you will immediately be taken to the authorization form:

The default login is admin, the password (who would have thought) is nas4free. We log in and see the system monitor:

Let's immediately switch to the great and mighty: we go to “System” –> “General”, and change the language to Russian:

Here you can also set a new username and password for the web interface.

Now let's start setting up the disks. We go to the “Disks” -> “Management” section, and ... we find nothing:

But don't panic - in NAS4Free everything needs to be done by hand. The easiest option is to click on “Clear configuration and import drives”, but I recommend clicking on the blue plus sign on the right and adding drives one at a time. The menu looks like this:

Let's go through the options:

  1. You don't have to fill in the description at all, I typed in the abbreviated name of the disc;
  2. Leave the transfer mode as Auto;
  3. You can specify the period for putting drives into standby mode depending on your personal needs. However, it should be taken into account: frequent restarting does not benefit even reliable WD Re, so it makes no sense to set 5-10 minutes - this will only accelerate HDD wear;
  4. Power management - I set Level 127 - a compromise between performance and power consumption;
  5. Noise level - I do not consider it necessary to use it, since WD already work very quietly;
  6. If you want to enable S.M.A.R.T. - put a tick;
  7. Since the disks are new, we leave Unformated (unformatted) in the last line.
Now click the “Add” button and repeat the procedure for the remaining disks. You don’t need to add a flash drive to avoid any misunderstandings (you format it in a hurry, and you have to start everything from scratch).

After all the manipulations, we see the following in the disk settings menu:

We read the warning in the screenshot. Yes, this is a feature of NAS4Free: first we make the settings, then we confirm the choice by clicking “Apply changes” - you will have to get used to it. After that, we observe the result of our actions:

If you want to receive S.M.A.R.T. data by monitoring the status of disks, go to the tab of the same name.

Check the “Enable” checkbox, select the Standby power mode (so as not to disturb the hard drives in standby mode) and save the changes. It is also possible to set alerts. Now you can view detailed data for each drive in the “Diagnostics” -> “Information” -> “S.M.A.R.T.”

So, both disks are Online, all systems work fine. But this is only the beginning of the journey. Let's go to the "Format HDD" tab. As we agreed at the beginning of the article, we will use ZFS. Select both drives and click "Next":

In the next step, we set the volume label - I chose WDREZFS%1. The construction “%1” means that the disks that we are formatting will receive serial numbers starting from one. That is, the first one will be named WDREZFS1, the second one WDREZFS2, and so on. If you do not specify the starting point by putting a “%” sign without a number, the system will number the HDD itself. You can also give names by serial numbers. For example, ")

Liked the article? Share with friends: