Home DIY NAS on Raspberry Pi 4 - installation

What do we need?

Hardware

Raspberry Pi 4B 2GB or more

16GB microSD card (high speed, i.e. SanDisk Extreme PRO/PLUS)

USB 3.1 hub with external power (5, 8, 10 ports depends on number of discs in NAS)

2,5" discs (HDD or SSD) - 2, 4, 8 or more

Accessories - USB - USB-C adapter, LAN cable, screws

Case

Hint: If we want the home NAS to look compact, the best solution is to get the smallest computer case as possible. There are no limits to the choice of design or colour. Components can be folded/mounted in such a case and the NAS will look compactly.

Software

We use the open source Open Media Vault solution for this application referred to as OMV. Download the original image of the Raspbian Buster Lite operating system from the official Raspberry Pi website. Insert the SD card for Rasberry Pi 4 B into your computer and download the Etcher software. For Linux on Debian there is .deb. For Windows, we recommend a Portable version (no installation). Simply run Etcher, select the image (.iso or .zip), select the SD card and press Flash!

After finish, eject and reinsert the SD card back to your computer. You should see two partitions. The boot and rootfs. Open the boot partition and  create a new empty file named ssh without any extension.

Zapnutí SSH na Raspberry 4 Pi

Zapnutí SSH na Raspberry 4 Pi

Eject and insert the SD card into the RPi, plug in the LAN cable from your home/company router or network, and start the RPi. The green icon should flash. If we have an ethernet cable plugged in, our RPi probably got the address from the DHCP router. Login to your router to see the list of connected device. Check IP address with hostname raspberrypi . In our case, for example, it's 192.168.1.56. So we're going to use the SSH protocol to connect to our RPi. This is the right time to familiarize yourself with the terminal (the command line in Linux), for example try this guide. It looks scary, but it's the most beautiful thing on Linux. It just works always and everywhere with same results.


SSH support already exists for Windows 10 users built into the shell. For other Windows users, I recommend Putty. I don't have to write any more for Linux users. So, we connect via SSH in terminal. Replace the IP address with your address of raspberrypi rom router.

ssh pi@192.168.1.56

Default password is raspberry. After login run configuration tool and change your default password for user pi.

sudo raspi-config

Změna výchozího hesla na Raspberry Pi

Choose Change User Password and you will be prompted to change your password for pi user. End this utility by pressing the Finish option, you don't have to restart. Perform the OS update with two consecutive commands:

sudo apt-get update

sudo apt-get upgrade

It'll take a few minutes, then finally install the OMV with command bellow:

wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

After a while, your own non-commercial DIY NAS is ready to use. For original instructions in English, see here. Once installed, open a web browser and type your RPi address. You're done.

In the next article, we look at the basic configuration.

Add comment

Nejlepší články z blogu

Centrální tablet pro chytrý dům
Wall tablet to controll your smart homeRating: 
100%

Wall tablet or older smartphone is perfectly suited as a central indicator of the state of the home, as well as controlling it. It usually replaces the video doorbell and as example, you can play your favorite music or read recipes on it during cooking in your kitchen. In the article, we describe a functional example of such a "wall" tablet and its settings in so-called kiosk mode so, display doesn't run at night and only reacts when someone is nearby. Centrální tablet nebo starší smartphone se perfektně hodí jako centrální ukazatel informací o stavu v domě a také k jeho ovládání. Zpravidla nahrazuje videovrátného a můžete si na něm pustit například oblíbenou hudbu při vaření nebo číst recepty. V článku popíšeme funkční příklad takového "wall" tabletu a jeho nastavení v tzv. kiosk módu, aby nesvítíl po nocích a reagoval jenom když je někdo poblíž.

Jablotron and smarthome synchronization
Connecting Jablotron with OpenHABRating: 
0%

In this article we will show you how to install Jablotron binding in OpenHAB. This binding helps us to synchronize states from Jablotron alarm to OpenHAB. Typically, you can force to switch off lights, close water pipe and circulation, switch off sockets or whatever you want to do when you leave home and set alarm.

Advanced disk cloningRating: 
0%

The classic disk cloning tool in linux is the dd command. This command creates a image of disk or extracts the contents from the image to disk. The dd tool needs to be handled carefully and you need to understand its use. We'll show a more advanced technique of creating a disc image that contains unallocated space. A classic example is when I have a Raspbian operating system installed on a 250 GB disc, but there's only a tiny boot partition (e.g. sda1) and my own operating system partition (sda2) which together have 15 GB. Instead of saving a 250 GB image, I would like to save only two partitions with 15 GB, so that the image is smaller and can be expanded to 16 or 32 GB flash.

iOS OpenVPN Connection SettingsRating: 
0%

In this article you will find detailed instructions on how to connect to OpenVPN from iOS devices.

Android OpenVPN Connection SettingsRating: 
40%

In this article you will find detailed instructions on how to connect to OpenVPN on Android.

OpenVPN on MikroTik routersRating: 
100%

If you have a smart-home, NAS, etc., it's a good idea to think about safe access to your network when you are not at home. Currently I recommend commercial router like Turris or a cheaper option of MikroTik routers. In the other hand, Raspberry Pi can be used as OpenVPN server too. In this article, we will show how to set up secure access to your home network from the internet using OpenVPN on MikroTik routers.

Video intercom Doorbird in OpenHABRating: 
0%

Native support for OpenHAB is provided by video intercom by Doorbird company. The solution is powered and connected by a UTP cable and has its own IP address to make it easier for you to install at the gate. OpenHAB is then able to import images from the intercom, visit history, manage gate opening on the button and by the phone, do not disturb feature during night, alarm feature etc. In the instructions we guide you how to use OpenHAB with Doorbird D101.

Advanced PIR sensors features in OpenHABRating: 
0%

The HC-SR501 PIR sensor contains mechanical adjustement for detect range and time. But in an intelligent house, we want to be able change time how long the light will be active and change whether the light will be controlled by PIR or not. Below it's shown how to program the PIR sensor to enable this features.

Measure tank level water OpenHAB
Measuring the water volume in reservoirRating: 
100%

In this article, you can find how to solve the measuring the water level in the reservoir (e.g. rainwater reservoir). The values are converted into the volume in liters. This enables you to fill the volume tank when needed or predict any other situations.