Make nas from a computer. NAS server from an old PC

Instructions

To configure a web server, you must install a suitable operating system. Distributions from the Linux family may be best suited. For example, for a web server, Red Hat, Fedora and Ubuntu Server are good packages. Select the Linux variant that suits you and download it from the Internet. You can also install a server-ready Debian Wheezy system.

Write the selected distribution onto a storage medium. You can record to a flash drive, CD or DVD. Among the most popular programs for burning operating system images, it is worth noting UltraISO and UNetbootin, which allow you to correctly extract the selected image onto any removable media.

Open the downloaded distribution using the selected program and burn the disc following the instructions in the interface. To do bootable USB flash drive in UltraISO, use the “Burn image” section hard drive».

Insert the storage medium into your computer and boot from it. Perform the installation operating system according to the instructions on the screen. To boot from the disk you will need to go to BIOS settings by pressing the F2, F8 or F10 button (depending on the motherboard model). Use the First Boot Device section to set the necessary parameters. Indicate your drive or USB reader in the list, then save the changes and restart your computer.

After installing the operating system, you will need to install an application package to run the server (Apache, MySQL, PHP). To do this, call a terminal and enter the following commands:

Sudo apt-get install tasksel
Sudo tasksel

In the list that appears, use the keyboard buttons to select LAMP Server and press Enter. The installation process will begin, during which you will be asked to set a password to access the MySQL panel. After completing the operation, you can begin setting up and configuring your server, as well as installing your own website.

note

After raising LAMP, all files of your resource will be located in the /var/www directory. You need to copy the data to launch the site into this folder.

Helpful advice

The terminal is called using the corresponding system menu item by pressing the Ctrl and T key combination. In the absence of a graphical environment, command line starts automatically.

Sources:

  • Ubuntu Server
  • Debian Wheezy
  • UNetbootin

Sooner or later, any person who is involved in Internet projects has the idea of ​​​​creating his own server. And here you can stumble upon pitfalls, because architecture server but should differ from the architecture of a regular home computer.

You will need

  • Case with power supply, motherboard, processor, coolers, RAM, hard drives

Instructions

Before assembly server But you need to decide whether to take the body or the platform. The platform is a specially adapted motherboard and the case itself. For a more suitable assembly, a housing with power supply and separate contents for it.

The power supply must be at least 350-400W in order for it to withstand the load (if server will have 4 hard drives, then it will be at least 400W).

After installing the power supply, you should select the motherboard. The fee must be server Naya, because in its structure it differs from boards for computers (more ceramics for cooling and removal of excess electricity). Server boards sometimes have more network ports and SATA connectors. When choosing a board for server but it is necessary to choose models in which the memory is located perpendicular to the case wall. This promotes better cooling.

Next, you should select a processor for the motherboard (by socket) and a cooler. The cooler should be selected according to the blowing of hot air - a cooler for server and the air will blow out vertically, not sideways. When installing the cooler, it must be applied between the radiator and the processor. The radiator has fins perpendicular to the rear wall of the case so that it is blown by other coolers.

Next, RAM is installed, preferably at least 4 gigabytes for standard needs and less. Then hard drives of the required size are installed. For security and information protection, it is advisable to have several hard drives combine into RAID-.If necessary, CD-ROM. The server is ready.

Video on the topic

note

Cooling is important for a server, so you should install several additional coolers.

Surely your closet is full of different junk. Don’t rush to throw it away, because among the trash there may be things that only at first glance seem useless and unnecessary, but in fact they may be useful to you.

You will need

  • screwdriver, RAM, system unit, scrap metal collection point

Instructions

First, check your computer for availability of working parts. After all, they may be useful to you for upgrading a new computer.

Select the operating system for the server. This often depends on preference and the level of comfort required. Linux or other operating system, UNIX-like, will be able to run on modest hardware with high performance if you don't install GUI.

Pick up HDD with the ability to share files. If most of the files that will be used by the server are spreadsheets or text documents, then a 60 or 80 gigabyte hard drive will be sufficient since these file types are relatively small. However, if you plan to exchange or large databases, then choose a disk with several hundred gigabytes.

Buy a new or used computer, or build your own. If you plan to use Linux or a similar system, the server will require computers with lower performance and fewer numbers. You can also purchase used equipment. The main thing here will be the presence of an Ethernet card to connect to your home or office network.

Install additional memory, if required. Smaller file servers work well with 256 megabytes random access memory, and for higher performance you will need 512 megabytes or more. More users - more RAM.

Configure the server in the Control Panel, enable access to files and printers using administrative tools.

Sources:

  • Server from your computer

If you decide to turn your mobile computer into a home server, then consider several features. Pay special attention to setting parameters network adapters your laptop.

You will need

  • - network hub;
  • - network cables.

Instructions

First, purchase a special USB-LAN adapter. This is necessary if your mobile computer There is only one LAN port. Select a network hub and purchase this device. It will allow you to connect several desktop computers. Prepare the required number of network cables.


Helpful advice: before setting a price for an old PC, look for similar configurations on the same Avito.


2. Give away for free.


By posting an ad on specialized websites, you can quickly get rid of your old computer by handing it over to a poor private individual, or in this way help a nursing home or charitable organization.


But why get rid of equipment that can perform many more functions?


3. Use as a typewriter or other simple tasks.


Not good powerful computer may well help you perform many tasks, such as working with documents, searching for information on the Internet, etc. The main thing in this matter is choosing the right software, that is, one that is undemanding in terms of hardware parameters.


4. Use as a file server or media player.


Don't throw away your old PC, but allocate it for storing files - books, movies, photos, that is, everything that takes up a lot of space. It is easy to organize such a server remote access and you will be able to view necessary files from a brand new tablet or laptop.


By the way, it will be convenient if you transfer the torrent client to the same file server.


5. Use your old PC as a server, firewall, router...


If you have multiple computers in your home but only one printer, connect that printer to your old PC and set up general access. Now everyone will be able not to run with flash drives to a computer with a printer or switch the printer to their PC, but to immediately send a print job without any hassles.


It is equally useful to install old computer and for distributing the Internet, as a proxy server, etc.


Note! If you need two powerful PCs in your home, but don't have the money to buy a second one, the old computer can be configured as a terminal to connect to a more powerful machine.

Today, dear reader, we will talk about how you can build a server from your home computer.

It’s not strange, but if you’ve read the article about, then you already know how to host websites on your home computer. It turns out that all that is needed for the site to load not from some server of the hosting provider, but from your familiar home computer is to configure the apache+php+mysql combination in the manner described in the article and connect Domain name with the IP address of your home computer.

I repeat:

  • I wrote about how to configure Apache + PHP + MySQL.
  • I wrote about how to connect an IP address and a domain name.

So you are fully armed with knowledge, all that remains is to apply it correctly.

It’s great if the computer is connected directly to the provider via a network cable and an external static IP address is specified in the network settings. It is this IP that will need to be specified in the domain name settings.

But, it’s a common thing when the computer that will act as a server is located either on a local subnet, or there is some kind of ADSL modem in front of it and an external IP address (which you can find out using the myip.ru service) - this is the address of the router or ADSL modem address. The IP address of the computer is local (either 192.168.0.ХХХ or 10.0.0.Х). It’s more complicated here, but you can still achieve your goal and set up a branch of your hosting provider at home.

It is necessary to implement the so-called port forwarding. Those. configure the router or ADSL modem as follows:

  • The user entered the website address.
  • The name server reported the IP address. This IP address is the external static address of either a router, an ADSL modem, or a gateway through which the server computer accesses the Internet.
  • The request came to the router on port 80 (it is through port 80 that the http connection is made).
  • The router is configured in such a way that all requests coming to port 80 are redirected to a computer on the local subnet with a specific IP, for example 192.168.0.200.
  • The request went to the local server computer, and there Apache happily greeted it and returned the desired site.

But we will deal with port forwarding a little later. For now, let's dig into the server computer itself.

Characteristics of the server computer

It is very difficult to talk about any exact parameters here.

If you are going to play hosting provider, then the server must be a quad-core computer with 4 GB of RAM and several hard drives combined into a RAID array. Such a computer is divided into several virtual servers, control of which is given to clients.

If you are planning to host a couple of sites, such as a website, then an ordinary modern computer will be enough. And then you need to experiment to achieve the optimal result.

I would like to direct your attention to the following feature: the amount of RAM on the server is important. Because The process of a visitor loading the same website page can be accelerated by storing data in RAM. The more RAM, the better.

The reading speed from the hard drive and its reliability can be increased with the same RAID arrays.

But the undeniable fact is that Windows OS, due to the huge number of security holes, many viruses, and instability, has no place on the server.

Therefore, operating systems of the Linux family rule the roost on servers. But don’t be alarmed, the principles of working in Linux are not as complicated as they seem, and setting up Apache + PHP + MySQL is practically no different from setting up on Windows.

Installing ArchLinux

Come on, dear reader, I will introduce you to installing the ArchLinux operating system.

There are many operating systems developed based on Linux. This includes the well-known Ubuntu and openSUSE and many others. One of the distributions that has gained popularity is ArchLinux. We will get to know him.

Why ArchLinux:

  • In my opinion, the optimal distribution for the server. There is no extra weight in it, everything is configured and installed by the user himself (leaving only what is really necessary).
  • Powerful Pacman update installation system.

Now I will describe in detail the process of installing ArchLinux on a future server.

In the case of an ordinary home computer from which we plan to make a server, the distribution kit will be suitable Core ISOs: i686, a Torrent link to which can be obtained on this page.

This distribution is a 32-bit version with the necessary installation files present in the downloaded image (in short, this is what we need).

As I already wrote in the article about my programs, I will use the .

To begin with, I launch the Torrent client from TCUP and after about an hour the distribution is on my hard drive.

Now, as you probably guessed, you need to cut the distribution onto disk. An ordinary CD would be ideal, but where can I get one in our progressive times, so I use a blank DVD (for the sake of such a thing, it’s not a pity).

We will cut it using the same TCUP plugin.

Launch the plugin BurningCD/DVD. Next, select the item Project: ISO/CUE Image and, directly into the contents of the item that opens, copy the downloaded ArcLinux distribution (using the familiar F5 button).

We start recording, naturally, by clicking on the item Burning a disc.

I choose a low recording speed, we have nowhere to rush. And we went to transform the disk image into an ArcLinux boot-installation disk.

After completing all these simple operations, we have a disk with the distribution kit, which needs to be inserted into the experimental computer and booted from it.

It is believed that having reached the understanding of the need to install Linux, the user knows where exactly in the BIOS of the experimental computer he can enable booting from CD.

Booting from CD.

Select an item Boot Arch Linux Live CD. After which we observe the process of loading the operating system.

Note to the hostess root is the login of the superuser, who has the broadest rights to configure the system.

In installation mode, the root user account does not have a password. We will create a password during one of the last steps of installing the Arch Linux OS.

If you pay attention to the beautifully designed inscription that appears after authorization, it will become clear that the installation must be started by entering the command / arc/setup and confirm the input by pressing, you won’t believe it, Enter.

That's it, let's proceed directly to the installation.

We will sequentially perform each of the installation menu items.

1. SelectSource

At this stage, we are asked to choose between installing from a CD or from the Internet. Because We downloaded the full distribution, then select CD-ROM or OTHER SOURCE and press Enter.

2. Set clock

Select region and timezone. Here you need to select a time region. I choose Europe and after Kiev (since geographically I am in Ukraine).

Set time and date Here, without further explanation, I select UTC. In manuale mode I edit the date. After the adjustments, I return to the date and time setting submenu by selecting return.

I finished setting the time and date, select the 3rd item Return to Main Menu.

Now the most interesting and difficult part is partitioning the hard drive. But we will quickly overcome this science.

I select an item

3. Prepare Hard Drive(s)

We will break it up in manual mode. Therefore, in the submenu, select item 2. Manually Partition Hard Drives.


I have an 18 GB disk, which the disk partitioning program happily informs me about.

At this stage, I would like to explain the principles of working with Arch Linux equipment and file hierarchy:

In Linux there are no drives C:, D:, etc., as we are used to seeing in Windows. Here the entire hierarchy starts from the root, denoted / Everything is inside this slash and distributed into folders.

Surprisingly for a Windows user, all hardware is stored in the /dev folder. My only hard drive is designated sda. This is why I see the inscription /dev/sda: 18GiB, which indicates that there is one device on the computer recognized as an 18 Gigabyte hard drive and it, like all devices, is put in the dev folder.

Now we will proceed directly to creating partitions on the hard drive.

I select the /dev/sda drive and press Enter. After this, the cfdisk program is launched, with which we will divide the disk into partitions. We remove the welcome window of the cfdisk program by pressing Enter and observe the interface of the cfdisk program.

For the purity of the experiment, I delete all existing sections by selecting the Delete item at the bottom (bottom menu, move with the cursor key to the right).

As a result, I have a bunch of free space, which I will now re-allocate before your eyes, dear reader.

Let's create three sections:

  • The boot partition, which will contain the system kernel (we just need to allocate 50 MB for it).
  • Swap or swap partition. It is used to store data from RAM when it no longer fits there (512 MB).
  • Partition for everything else, root partition /. We'll use everything that's left for him.

So, I select New and create a boot partition. At the next fork I select Primary. Next, I select the partition size; in my case, 50 Megabytes is enough. I confirm my choice with the Beginning item.

After creating the partition, I specify its type (Type item) as 83 (Linux).

The first partition has been created. Now I move to the point symbolizing the remaining free place on the disk and click New again.

Now I will create a swap partition.

We use the algorithm described above. The size of this partition will be 512 Megabytes.

The type of this section (Type) must be 82.

We mark everything else as sda3, where we will mount the root /.

The partitioned hard drive sda ​​looks like this:

The time has come to indicate one of the disks as bootable. To do this, we move to sda1 and mark it with the Bootable item.

That's it, dear reader, the disk partitioning is over. Select the write item in the cfdisk interface (in the lower menu) and save the changes made.

After saving, you can exit (Quit item).

We again find ourselves in the familiar Arch installation menu, where we select the DONE item.

After selecting DONE, we will find ourselves in the submenu for working with the disk, where the item will be carefully selected 3. Manually Configure block devices, filesystems and mountpoints

Press Enter and proceed to mounting the hard drive partitions.

By going to the appropriate section of the menu, we can specify file systems and mount points (what exactly should be located on the selected hard drive partition).

So, let's start with sda1. This partition is bootable. The ext3 file system, which supports recovery after a failure, will be optimal for it.

As agreed, we mount the boot partition /boot on sda1.

We will not specify any additional options; press Enter.

Similarly to the above, we create a file system and mount point for sda2. File system– swap. This is actually all that needed to be specified for sda2.

Sda3 will have an ext3 file system; we will mount there, as agreed, everything else, i.e. /.

Here's the result:

All that remains is to select done and everything we have done will be applied.

Now that’s really all there is to setting up the hard drive. Arch carefully selects the fifth item in the installation menu, 5 Return to Main Menu.

We continue to install our wonderful Linux.

In the main installation menu, the item is selected 4. Select Packages. In it we need to select nothing more than base.

After selecting base, a list of packages included in the installation will appear. Without worrying about your brain, click OK.

We get to the 5th menu item Install Packages, which starts the installation of packages. If you see this

and the CD rustles diligently, which means everything is fine, wait for the installation to complete.

That's it, dear reader, the Arch Linux installation process is complete, let's start configuring. Everything that we configure now can be corrected at any convenient time.

6. Configure System

On the next screen we will be asked to select an editor to modify the configuration text files. We choose nano and don’t steam our brains.

After selecting the text file editor, we see a list of all configuration files. But don’t be alarmed, only some of them need to be edited.

The main configuration file is /etc/rc.conf

Select the appropriate item and press Enter.

nano editor loading content text file rc.conf, located in the configuration files folder etc.

First, we'll set up the network. Let's go to the NETWORKING section in the file and carefully look at the lines

#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" eth0="dhcp" INTERFACES=(eth0) gateway="default gw 192.168.0.1" ROUTES=(!gateway)

This means that if we are setting up a server, then there can be no talk of dynamic distribution of IP addresses. Therefore, we remove the comment grid before the first line and put it on the second line. It turns out this:

Eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" #eth0="dhcp"

Now let's have fun with the first line. Instead of 192.168.0.2 we enter the server IP address. My server is located in local network and has the address 192.168.0.200 (this is exactly what I indicate).

netmask 255.255.255.0 This suits us. This mask format indicates that there can be 254 computers on the subnet (the first three components of their IP address are fixed, and the last one varies from 1 to 254). Well, okay.

broadcast 192.168.0.255 is the IP address for broadcast packets. If a packet is sent to this IP, all computers on the subnet will receive it. Well, good, that suits us.

As a result, we have the following instead of the first line:

Eth0="eth0 192.168.0.200 netmask 255.255.255.0 broadcast 192.168.0.255"

Scroll down to the line

Gateway="default gw 192.168.0.1" ROUTES=(!gateway)

The first line specifies the gateway. My local network is organized in such a way that in front of the server there is a router with the address 192.168.0.1, and I specify it as the gateway. If in your case there is no router, then the network administrator must tell you the IP address of the gateway, and you will indicate it here.

In the second line, we just need to remove the exclamation point:

ROUTES=(gateway)

That's all with these files. Press ctrl+o to write and ctrl+x to exit.

The next configuration file we'll take an interest in is /etc/resolv.conf

Everything is very simple here. In the nameserver ip format, you must specify DNS.

Right below the #nameserver line add the following

nameserver 192.168.0.1

nameserver 8.8.8.8

Who is 192.168.0.1, you, dear reader, already know.

8.8.8.8 is Google's DNS. I indicate it as an alternative.

The next interesting file is /etc/hosts.deny

By default, this file denies all connections. This can be corrected by commenting out the line ALL: ALL: DENY, i.e. put a hash # in front of the phrase, like this:

# ALL: ALL: DENY

Save the file and exit.

The next step is to adjust the update mirrors contained in the /etc/pacman.d/mirrirlist file

Scroll the file to the Russia section and uncomment the lines with the address yandex.ru

Save and close.

The last step is to set a password for the super-powerful root user. Set it and don't forget it.

When entering a password, be aware that in Linux, password characters are not covered with asterisks, they are simply not shown at all (so that you cannot even spy on the number of characters in the password and then somehow guess them).

Click Done at the very end.

Changes apply.

The last thing we will need to do is select the bootloader. Paragraph 7 Install Bootloader.

Everything is simple here, don’t worry about your brain, choose Grub. After selecting it, we will see the contents of the bootloader configuration file. We are not interested in him, we immediately leave there.

Now we need to choose where to install the bootloader. Select /dev/sda

That's it, dear reader, 8 Exit Install.

Congratulations, Arch Linux is running, enter the reboot command and do not forget to remove boot disk from SDROMA. By the way, SDROM will not open until the reboot begins, because the disk is mounted, these are the features of Linux.

That's it, Linux has loaded and invites you to start working by entering your login and password. What did you expect?

We log in as root (you yourself forgot the root password, so enter it if you haven’t forgotten).

Congratulations, you are logged in as root (at least I was logged in).

Now let's check the functionality of the network connection. I hope you connected your computer to the local network using a regular network cable.

Then everything should work, write the command pinggoogle.com and observe a cheerful picture of successful pings.

When you get bored with the ping picture, press ctrl+c.

If ping does not work for you, then make sure that you received enough vitamins in childhood.

Finally, we can now install a program for remote SSH access via Putty. Do I remember this?

Now we will find out how all this is configured on the server side.

By installing SSH access, I can remotely manage the server and record video lessons, take regular screenshots and not sit in front of the monitor with a camera.

Arch has this wonderful thing called a package manager. It's called pacman. The purpose of pacman is to install the necessary programs, update them, update all existing programs, install the necessary components for newly installed programs. All in all, a wonderful thing. You can read more about pacman.

For now let's enter the command pacman -Syu, which synchronizes data about packages on Yandex servers.

After synchronization is complete, we will install the program for SSH access. It's called openssh. Installation occurs with the command pacman -Sv openssh

Pacman will download and install the program and all missing components. For some reason, the first time I only updated pacman, but openssh was not installed. So I repeat the command pacman -Sv openssh

This time the attempt was successful in installing the program.

This is where the startup file /etc/rc.d/sshd is located

In order to start openssh, you need to enter the following command:

/ etc/rc.d/sshdstart

After which SSH access to the server will be possible.

To access the server we will use the Putty program. You can download it either from the official website or from Deposit Files (*.zip, 243 KB).

Enter the server's IP address (in my case 192.168.0.200) and connect via SSH.

After connecting, in the Putty window we see everything the same as on the server monitor. The keyboard and server monitor can be moved further away; we won’t need them in the near future.

Finally, we will update our system with a wonderful team pacmanSyu

In my case, I needed to download 100 MB of updates, so take heart, this is not a quick task.

That's all for now. Until the next meeting, I suggest you, dear reader, poke in google questions like “basic linux commands” you will find a lot of fun things.

Creating your own local server based on a regular personal computer is a rather complex and painstaking task. Here you need to understand the following points:

  1. 1. , and whether you even need your own server. This is one of the key questions that requires a clear and unambiguous answer from the future administrator.
  2. 2. What technical resources are at your disposal, and what will be necessary for the operation of a full-fledged server. Minimum technical requirements to create a “high-quality” server are quite high: the equipment alone will cost 70 - 80 thousand rubles.

Also keep in mind that for normal operation of the resource (for which you are planning to make your own server), you need the server computer to be constantly on and working without interruptions. Therefore, it is necessary to ensure an appropriate power supply.

3. What cash you are willing to spend on creating and maintaining the server. In addition to the above-mentioned hardware costs, creating a full-fledged server on a computer requires a dedicated (statistical) IP address and high speed of data reception and transmission (the minimum indicator is 10 Mbit/sec). Accordingly, for this you will have to pay extra to the provider and enter into an additional contract for the provision of such services.

And before you try to make a server out of a computer, you need to clearly define all these nuances.

How to make a server from a home computer?

To create your own server, you first need to install a multi-user network operating system.

The choice is huge: Debian, FreeBSD, CentOS, OpenSUSE, Ubuntu, Windows and many others.

On the Internet you can find many examples of testing in the operation of the above-mentioned operating systems and their ratings in accordance with the test results. For example, the “SOS” rating for 2016:

1st place: “Debian” and “Ubuntu Server”;

3rd place: “FreeBSD” and “ Windows Server»;

4th place: “Red Hat Enterprise”;

5th place: “Fedora”.

Of course, the lion's share of the network software market is made up of operating systems that occupy first place in the ranking. Therefore, in order to create a server on a computer for the first time, we recommend choosing one of them.

As an example, we will focus on installing the Ubuntu Server operating system.

How to set up a local server from scratch on ubuntu?

1. Download and copy the operating system image onto a bootable USB flash drive. Boot your computer from the flash drive: at the first stage you will be asked to select a language.

3. In the next steps, select "Region" and "Keyboard Layout Settings";

4. Specify your username, computer account and password,

then click “Continue”;

configure “Disk Layout”

and select which disk the system is installed on;

6. Wait for the installation and system update to complete.

7. Select software, which you need for work.

8. Confirm that the installation is complete by clicking on the “Continue” button;

9. After restarting the computer to log in account You will need to enter the username and password created in step “4”;

10. This completes the installation of the server operating system and the initial creation of the server.

How to make yourself an admin on your server?

  1. 1. To obtain administrator rights, enter the command “sudo su”;
  2. 2. By default, the server’s network settings are obtained using DHCP, but for the server to work, you will need to change the “iface eth0 inet static” value in the “/etc/network/interfaces” file to a “static IP address”. The text should look something like this:

iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

After saving, restart the network with the command “/etc/init.d/networking restart”.

Part One: Cold Iron

It can be stewed and chopped into broth,
And it's good to serve with vegetables.

Lewis Carroll, The Hunting of the Snark

Anyone who can collect Personal Computer and install Windows, if desired, it can also cope with the creation of a fairly advanced NAS from x86-compatible hardware and free software assemblies based on *nix. At the same time, roughly speaking, the number of installed disks affects the cost and complexity of the project only by the cost of the disks. This allows you to seriously save money compared to buying a ready-made NAS with 4 or more disks, but it is hardly profitable if a NAS with 1-2 disks satisfies your needs. It is impossible to say which option is better. Everyone has their own preferences. Some people cook well at home, while others prefer to dine in a restaurant. Do you enjoy tinkering with computer software and hardware? Then this text may be useful. Do you need a storage service on its own? Choose between cloud storage and a ready-made NAS out of the box.

N. B. This article is not about the hardware model or the version of the software product. She talks about the concept of creating a NAS with your own hands and suggests considering other options for solving the problem, besides buying a ready-made device. The topic is long, with nearly a thousand pages of discussion. The people there are polite and responsive. This is a hint that the article does not pretend to be complete, academic or the ultimate truth.

What kind of NAS is this?

According to Wikipedia, NAS (Network Attached Storage) - network storage system, network storage. It is a computer connected to a network and designed to provide data storage services to other devices. The operating system and NAS module programs provide operation of the data storage and file system, access to files, and control over system functions. The device is not designed to perform normal computing tasks, although running other programs on it may be technically possible. Typically, NAS devices do not have a screen or keyboard, but are managed and configured over the network, often using a browser.

The definition is not ideal, but quite working. NAS is also used in business, but they have their own requirements and features. We will be interested home use NAS

People usually come to the idea of ​​assembling a NAS with their own hands in two ways, and often in both ways at once. When you have one computer at home, you don't need a NAS. Gradually other network devices appear. Laptops, smartphones, tablets. And especially - network HD media players, all sorts of Dune, Popcorn, WD TV and the like. Precisely with the acquisition network media player a person often begins to accumulate terabytes of information. It is first stored on removable hard drives that are connected to the media player and/or added to the main computer. Soon there will be too many disks for convenient use, and a quietly buzzing computer around the clock, at the same time downloading something from the Internet, will begin to irritate, if not you, then your better half. An idea arises to collect this bunch of disks in a separate box, put it somewhere in a corner and instruct it to distribute content to all network devices and download torrents. Congratulations, you've taken the first route to NAS. On the way, we definitely took a look at the finished NAS, out of the box. But the price!..

The second way is through hardware upgrades. As a result, less than a cubic meter of components accumulate, which are difficult to sell and there is no one to give as a gift. The Plyushkin within us finds a useful use for them in the idea of ​​​​building a NAS. And at the same time satisfy your craving to rummage through the guts of the computer. It’s not for nothing that one cheerful American wrote that working with a computer is the only thing today legal way push around someone who is smarter than you.

Of course, there are other ways. For example, you are a keen photographer and need secure storage long-term archives. Or a loving parent filming every step of their baby. Etc. But rarely do such scenarios lead to assembling a NAS with your own hands. Much more often - to buy ready-made out of the box. The needs of such users are confidently met by 1-2 disk models of ready-made NAS. It is difficult, if not impossible, for a neophyte amateur to assemble something similar in size, noise and price to 1-2 disk models.

In defense of ready-made NAS, it is worth noting that they provide many features and functions out of the box, requiring minimal installation/configuration/tuning. So, in fact, their cost must also include the work of programmers, technical support etc.

The situation changes dramatically if 1-2 disks are not enough, but there is a need for 4 or more. Manufacturers' marketers set a price level for them, which plunges a person familiar with the computer price tag into a state of frustration (although they pronounce much more popular words). And the person begins to choose a hardware configuration, to which we move on. Although he should have started with software, he can’t go against nature.

The hardware depends on the software used. Software - depending on the assigned tasks. And the correct formulation of the problem has never been a strong point of the home handyman. So he starts with hardware. If we came to building a NAS with a bag of parts left over from upgrades, then the good news is that they will fit, even if not optimally. Without even looking.

Broomed around the barn

In order to comfortably watch FullHD video over the network, including BD disk images, we will need at least:

  • 1-2 gigabytes of RAM if ZFS is not used and 4-8, more is possible if ZFS is used. (About ZFS - later, Google will help the impatient.) But even on a rarity with 256 MB you can collect something useful;
  • x86-compatible processor, ideally (and for ZFS) - 64-bit, but 32-bit is suitable for most options. That is, any x86 processor except those that are completely museum-quality. It would be preferable to have less heat, but that’s what it is;
  • wired Ethernet port, preferably gigabit - although 100 megabits is enough for viewing BD images over the network. Connecting a NAS over Wi-Fi is a controversial idea (but if you build it yourself, you have much more freedom in choosing wireless controllers);
  • drives and SATA ports. For NAS there is no difference between SATA-2 (3 Gbit/s) and SATA-3 (6 Gbit/s). Not every drive is faster than the ancient SATA-1, so such ports can be used. But IDE drives, by modern standards, are slow, low-capacity, hot and noisy. If there are not enough SATA ports, you can use controllers. But if (when) you soon decide to move to new hardware, then the SATA controllers purchased as crutches for an outdated motherboard will lie idle. I know from myself, I have two lying around. And be careful with disks larger than 2 TB. Many older controllers are not compatible with them. And among the SATA-1 controllers, there are also those that do not work with disks larger than a terabyte - however, this is already ancient and rare;
  • Of course, the case where it will all fit and the power supply that will pull it. There are subtleties with the power supply, it makes sense to look at a new one, see below.

Most likely, the hardware left over from the upgrades will satisfy these requirements. And if it doesn’t make much noise (or there is somewhere to clean it), then you’re generally lucky. You can start experimenting.

Custom tailoring

If you are assembling a NAS from specially purchased components, then you should first decide on your wishes. In most cases (but it is impossible to grasp the immensity) requests are divided into three groups, conventionally “quiet-compact”, “effective-extensible” and “server-so-server”. Let me clarify that there is no clearly correct option. After all, the user himself weighs wishes, costs and his capabilities. But the wrong one is possible. When the result does not satisfy the requirements explicitly or implicitly specified during the design. For example, the spouse will say that the box is, of course, big. But it howls like an airplane, and she doesn’t agree to live in the same apartment. Or the system assembled under passive conditions does not withstand the test in the summer. Or the video simply shuts down when viewed online. Therefore, it is better to consider your wishes on the shore. Especially the implicit ones.

Important note. We are talking about NAS, and not about HTPC (Home Theater PC), that is, not about a computer showing movies with sound on big screen connected to its video output. In principle, no one forbids you to make HTPC, including with many hard drives, although the requirements for HTPC and NAS, as well as the software and hardware used for them, are very different. HTPC is a different topic.

Quietly compact

This set of requirements is influenced by off-the-shelf NAS. I want something compact and quiet, but one that can fit 4 disks (often 6, sometimes more). Such requirements usually lead to the choice of a Mini-ITX motherboard with a soldered Atom-like processor housed in a compact case. Examples are below.

There is a very good preconfigured solution - HP Proliant Microserver (). Compact, reasonable in price (from 12,000 at the moment), 4 hard drives, the fifth can be inserted instead of ODD, which is unnecessary in the NAS. And with the help of a small tambourine, make the port intended for ODD SATA work normally. Disadvantages - the processor is far from powerful, but for many scenarios it is sufficient. If you are satisfied with the microserver, let's go to the chapter about software.

HP Proliant Microserver is a high-quality and inexpensive candidate for the role of home NAS

If not, first select a case for the desired number of disks (whether or not a disk is needed for the system depends on the OS. We will discuss it in the chapter about software). Here, in the battle of show-off aesthetic feelings with greed and the desire for effective costs, the first test of the strength of the “quiet-compact” concept takes place. Beautiful compact cases are not cheap. If victory lies with the toad's desire for efficiency, let's go to the chapter on efficiency and extensibility. We go there if the selected case allows the installation of a microATX motherboard. If aesthetics win, we select a Mini-ITX (Mini-DTX) motherboard. The first requirement is a maximum of SATA ports (including eSATA). In principle, desktop versions with 6 SATA ports were produced. But whether it will be possible to find it here and now is the question. If there are not enough ports, PCIe SATA controllers with 2 and even 4 ports are quite affordable. Naturally, they require a PCIe slot. Considering that it is the only one in Mini-ITX, expandability ends there.

All examples are from real life, often with modifications and additional photos - see FAQ in the profile thread, section 3.1

by axel77from half_moon_bayby padavan
FrameChenbro ES34069Lian Li PC-Q25Lian-Li PC-Q08
power unit180 W includedCorsair, PSU-500CXV2EU, 500 WEnermax 380 W (82+)
MotherboardZotac NM10-DTX WiFiAsus E35M-I*Asus P8H67-I**
CPUintegrated Intel Atom D510integrated AMD E-350Intel Pentium G840
RAMKingston 2x2 GBCorsair XMS3 2x8 GB2x4 GB DDR3-1333
Hard drives for data4×Samsung HD204UI7×3.5″6×3.5″ + hotswap for 3.5″ HDD in 5.25″ bay
System storage2.5″ Toshiba 500 GBUSB flash drive2.5″ HDD
operating systemFreeBSDFreeNAS 8.xOMV
Additionallynetwork Intel WG82574L***ST-Lab 370 4xSATAPCIe 2xSATA-II
Price estimate****RUB 14,950RUB 15,600RUB 14,000

* Nowadays motherboards with E-350 have become rare, they have been replaced by versions with E-450. SATA ports - fewer;
** Not on sale, but see, for example, ASUS P8H77-I;
*** the author added a network through a homemade raiser, but this is rather personal perfectionism;
**** Prices are estimates at the request of the editors using modern Yandex Market, if not available - Price.ru, if not available - analogues. This is a rough estimate, since some models are no longer on sale and the prices found are not necessarily current. The price does not take into account data disks; a used system HDD, if available, was counted as 1000 rubles.

There are subtleties about “quietly”. The first impulse is “complete passive”. However, in most cases the argument is accepted that 4-6 drives will produce more noise than a good 120mm fan at low speed. In any case, you need to understand that you have to pay for everything and a compact case, all other things being equal, will be noisier than a more spacious standard case with large fans.

The obvious feature of a soldered processor is performance. If this is not enough, the vast majority abandon the Mini-ITX format. But, for the sake of completeness, it must be said that this is not necessary, cf. configuration from maestro padavan.


The assembly from Padavan is, as you can see, extremely compact

In December last year, the Intel Atom S1200 (Centerton) for server purposes was announced. When they go on sale, they may be an interesting option for a home NAS. Support for ECC memory, Intel Virtualization (VT-x), 8 PCI-E lanes, 8 GB of memory - this is enough for most options.

Efficiently extensible

A significant part of NAS builders - some right away, some faced with the limitations of options on Atom-like processors - decide to assemble a configuration that allows for serious expansion. In terms of processor, memory, but above all - in terms of the number of disks. As already mentioned, ready-made NAS even with 4 disks are not cheap, but with 8-10 they are already prohibitively expensive for the home. At the same time, it is not difficult to choose a sufficiently spacious housing. For example, in my case, left over from the upgrade of the Craftway computer (they didn’t save on case hardware back then), there are now 7 units living in it. 3.5″ drives and without special problems you can install 3 more. When choosing a case for a really large number of drives, you should look towards models with many 5.25″ slots, in which you can then place baskets with airflow, using 5.25″ slots for four 3.5″ drives. See the example in the Costs chapter.

Since the NAS operates 24/7, I would like an energy-efficient processor (in Moscow, a watt per year costs 35 rubles). Intel Sandy Bridge and Ivy Bridge seriously reduce power consumption when idle, but the NAS is extremely lightly loaded the lion's share of the time. Therefore, the daily power consumption of such a NAS may be significantly lower than that of the Atom version, which does not know how to reduce consumption when idle. Which processor model to choose depends on whether you need to transcode video in real time.

Many modern televisions have DLNA functionality that allows you to receive video over a local network. The problem is that they only understand some encoding options. And often they are not at all the ones used by the rips and remixes found on the Internet. The problem can be solved in several ways. (1) Look for movies in a format that matches your TV. It's the tail that wags the dog. (2) Recode the movie on the computer to suit the TV's requests. This is a waste of time and is only possible for a self-made video. (3) Load the NAS with real-time transcoding and (4) Buy a media player, that is, a small box that receives video as files, including via the network with the NAS, and supplies the TV with the receiver with an audio-video signal, usually via HDMI. If you chose option (3), then you need to study the specifications of the TV and look in the Core i7 area. Plus, due to limitations in DLNA in general, and in implementing this marketing idea on your TV in particular, it will not be possible to achieve complete omnivorousness. Option (4) at the current price level turns out to be not only simpler and more functional, but also cheaper. While the NAS processor is suitable for virtually any junior Pentium or Celeron 2nd or 3rd generation Core. You can take the i3, fortunately, compared to the price of the disks, the difference will be negligible. Choose according to your taste. For quick reference or detailed final comparison of candidate models, you can use the processor testing section on iXBT. I took an Intel Pentium G2120 as the youngest Ivy Bridge at that time. Junior Sandy Bridges are cheap and more than sufficient.

Available at the time of writing AMD processors compared to Intel, they are not impressive - although AMD supplies its processors with support for ECC memory much more generously, and perhaps the company will soon have something competitive, for example, the Opteron 3250 with a stated price of $99.


Maternal ASUS board P8H77-M Pro: 7 SATA, up to 32 GB RAM

Motherboard. I took the ASUS P8H77-M Pro for the following reasons:

  • LGA1155, we get built-in video automatically due to the processor, it will only be needed at the installation stage;
  • maximum number of SATA ports, no matter 3 or 6 Gbit/s (7 SATA + eSATA);
  • 4 memory slots are better, but 2 are enough (4, up to 32 GB);
  • integrated 1000BaseTX, considered better from Intel. But taking into account the presence of a processor with a reserve of computing power, Realtek will do just fine (Realtek 8111F);
  • PCIe slots for future installation of SATA controllers and network cards(x16, x4 in x16 slot, 2 x1);
  • Form factor - microATX.
This is quite enough to provide all the required functionality. And all kinds of additions will only waste electricity. But if you suddenly like an ATX board, you have the right.

The cooler is selected according to taste, memory - according to the requirements of the selected OS. Here the possible range is from gigabytes to 32.

The power supply is included in a separate chapter.

Examples of the described option:



by ZanZagby shale
FrameLian Li PC-V354RInWin BP659
power unitChieftec BPS-550C 550 W200 W included
MotherboardASUS P8H67-M EVO(B3)ECS H61H2-I2
CPUIntel Pentium G860Intel Celeron G530
RAM4x4 GB DDR3 PC3-1066Kingston 2x2 GB
Hard drives for data6×Hitachi HDS5C3030ALA6303×Seagate ST3000DM001
System storageCF 4 GB via CF-IDE adapter40 GB SSD
operating systemnas4free 9.xOMV
Additionally cooler Cooler Master DP6-8E5SB-PL-GP, add. fans 2×Zalman FDB-1 and Arctic Cooling F9 PWM
Price estimateRUB 18,2007300 rub.

Server-so-server

There is a “premium” category of NAS builders who, for objective or subjective reasons, build NAS from serious and expensive server components. Enthusiasts are experimenting with 10-gigabit network solutions. Remember that server configurations are often not quite compatible with residential premises in terms of size and noise. The ability to use ECC memory is the most obvious advantage of the approach. The ZFS file system used in this segment of home NAS construction is memory intensive. In this case, a memory failure can lead to data corruption that goes unnoticed. ECC memory solves the problem, but its use in the Intel version requires server processors (there are interesting exceptions, for example the Pentium G2120) and motherboards.

Virtualization is often used and several guest OS solve problems, each with their own. A common option is when the SATA controller is forwarded to virtual machine, which performs the storage function (Solaris or FreeBSD with zfs). From this VM, disk capacity is exported via NFS or iSCSI to the hypervisor and other VMs. I will refrain from further explanation of what I myself am not very well versed in and will give real examples.





Assembly from TPAKTOP, outside and inside views

by fatfreeby axel77from TPAKTOP
FrameFractal Design Define MiniSupermicro CSE-SC846E26-R1200B
power unitSeasonic X560
MotherboardSupermicro X9SCL-FSupermicro X9SCM-FSupermicro X9SCM-F
CPUIntel Xeon E3-1230Intel Xeon E3-1230Intel Xeon E3-1220
RAM4×Kingston KVR1333D3E9S/8G4×Kingston KVR1333D3E9S/4G4×Kingston KVR1333D3E9S/4G
Hard drives for data5×WD20EFRXin the process of accumulation12xST31000524AS in two 6xRaidZ2 (main pool), 2xST32000542AS in a mirror (backup pool), 4xST3250318AS in a stripe (torrent pool)
System storageIntel SSD 520 180 GB2.5″ by 320 GBTS64GSSD25S-M
operating systemESXi 5.1.0 + Nexenta CE + Ubuntu Server 12.04 + Windows 8FreeBSDFreeBSD
AdditionallyHBA IBM ServeRAID M1015, Noctua NH-L12 cooler2×HBA IBM ServerRAID M10152×HBA IBM ServeRAID M1015, Intel Gigabit ET Dual Port Server Adapter

SATA/SAS controllers

So if you can’t wait, you can start. And in the second part we will discuss the software in more detail.

I would like to express my gratitude to all participants in the profile thread on the forum.site, including comrades axel77, half_moon_bay, padavan, ZanZag, shale, whose configurations were used in the article; comrades Sergei V. Sh, TPAKTOP, iZEN and RU_Taurus for many useful comments.
Special thanks to the developers of free software: Olivier Cochard-Labbé, Daisuke Aoyama, Michael Zoon, Volker Theile and many others. They made the very existence of the DIY NAS theme possible.

Hi all! The idea of ​​building my own home server came to me quite a long time ago, but for various reasons it was constantly put off. Finally, I decided it was time to act.

There will be quite a lot of material and description of the entire process, so I will make several articles, in each of which I will try to describe in detail all the steps so that even a beginner can cope with this in the future. Do not miss!

In general, I am also a newbie in this matter, so I will figure everything out as I go. There are many issues to be resolved, from the choice of components and operating system to solving minor technical problems.

What is a home server?

At its core, it is a regular computer that performs tasks for which using your main computer is impractical. It must work and be accessible over the network 24 hours a day, 7 days a week, while being cool, quiet and quite economical in terms of energy consumption.

Home server tasks

  • Storage and backup important files;
  • Organizing access to files over a local network and via the Internet;
  • Organizing a media server for watching movies;
  • Organization of video surveillance.

As you can see, the tasks are very diverse, and there are even more opportunities for their implementation. And this is not a complete list of tasks that can be entrusted to the server. Everything is limited only by your imagination and knowledge, and your knowledge is limited only by your desire. ?

I plan to spend about 6,000 rubles on my idea. We'll see what comes of it, but you have to admit, this is quite an affordable amount for such an extensive list of possibilities. The most important thing is that we get an excellent opportunity to study network technologies and programs in detail. Whatever one may say, a computer scientist must always keep up with the times... Let's study together!

At the moment I have: wi-fi router for Internet distribution, computer (Internet connected via wifi adapter) and a laptop. Now a home server will be added to this network.

The network diagram should look something like this:

Choosing a home server

Having searched the Internet for a suitable ready-made option, I realized that with such a limited budget you can only count on self-assembly. All ready-made platforms are either more expensive or too limited in performance and functionality.

For example, you can use ready-made platforms for assembling PCs. They are a board with a built-in processor that only requires the installation of RAM and a hard drive. This is a very good option if you want to have a super compact PC in a beautiful package. In my opinion, the performance of such systems at their price leaves much to be desired.

Yes, by the way, one of the good options for organizing home server Purchasing a ready-made NAS (network-attached storage) may serve the purpose. NAS (Network Attached Storage) is ready-made devices(essentially a computer) to connect to a network containing one or more hard drives. Contains a built-in web interface and great amount settings. They have built-in applications for organizing photo galleries, mail servers, media servers, torrent clients, etc. All this is already ready, as they say, “out of the box.” You just need to connect the power, log into the device via the network and make the necessary settings. Another advantage is silence and low power consumption.

NAS is a great option for those for whom the built-in capabilities are enough.

I decided not to use ready-made solutions, but to build a mini-itx computer. This way we will get greater productivity, system flexibility, and +10 to the “computer” skill. Naturally, the downside is that you will need to configure everything yourself. Although... this is not such a minus.

Selection of components

The motherboard was chosen as the platform for the future server GIGABYTE GA-J1800N-D2H mini-ITX format. This board already has a built-in dual-core Intel Celeron J1800 processor. This is not the most powerful processor, but it will be quite enough for a home server.

The undeniable advantage of the processor is low power consumption and low heat generation, which means it heats up little, and a passive cooling system is sufficient to cool it. The absence of fans makes this PC virtually silent.

The board has built-in connectors for a mouse and keyboard, VGA and HDMI video connectors for connecting a monitor or TV, 4 USB connectors +1 USB 3.0, gigabit network interface and audio inputs/outputs. In addition, the board has a PCI-E x1 connector for connecting expansion cards.

One of the key points of choice was its cost - approximately 2300 rubles. For this money we get a quiet and versatile board with an integrated processor.

The motherboard has slots for SO-DIMM RAM with low power consumption, so I chose CRUCIAL CT25664BF1339 DDR3L - 2 GB as the RAM modules.

The deciding factor was its price of 850 rubles.

The case for the new PC is also in Mini-ITX format. I chose from the simplest options up to 2000 rubles. I settled on the FORMULA FW-107D body.

The case already has a 60 W power supply installed, which is quite enough for the selected motherboard.

As a hard drive, I will initially use the 2.5″ 320 GB HDD I already have from external HDD. Everything to save your budget. If in the future for some reason I am not satisfied with it, I will replace it with another one, but for settings and first experiments it is quite enough.

Actually, these are all the components needed for assembly. You can go shopping and start implementing the idea, but I will talk about this in the next part. Building a home server. Part 2.

Write in the comments if you would be interested in following this experiment? Write additions or ask questions, and I will try to answer them. Bye!

Publications on the topic