NAS Raspberry Pi

3,997

54

2

Introduction: NAS Raspberry Pi

About: Electronic is my passion. I like to work with programming devices like Arduino, ESP8266, Raspberry Pi. I enjoy design electronic projects. IG: lab_torord.

If you have a hard drive that is collecting dust. You can use it and create a NAS with a Raspberry Pi. Check this project and enjoy it.

Last December I replaced my laptop hard drive. It had an HDD and I replaced for an SDD. Since then I have not used the HDD.

I got an idea to use the HDD and create a NAS with a Raspberry Pi.

I will use that NAS to storage some recordings from an IP camera. It has the possibility to store video in a NAS. I can also use it to store some files.

If you have any other ideas to use my NAS. Write me a comment.

Let's get started.

Supplies

Step 1: Download Raspberry Pi OS

The NAS works with a software called Open Media Vault, but first, we need to download Raspberry Pi OS (previously Raspbian) in the micro-SD card. We should download the Lite version of the Raspbian OS. That version does not have a graphic environment.

Step 2: Flash OS in Micro-SD

After download Raspberry Pi OS, you should unzip and write it in the micro-SD card. For that purpose, you can use balena etcher program. First, insert the micro-SD in the PC, then pick the image from the Raspberry Pi OS folder, select the target (micro-SD card), and the flash.

Step 3: Enable SSH

Before inserting the micro-SD card in the Raspberry Pi, we need to create a file inside the card. That file will enable SSH connection to the Raspberry Pi. It will allow us to connect to the Raspberry without using a monitor and keyboard.

Insert the SD card to the PC. Open the file explorer and select the SD Card drive. Inside the memory create a file and call it ssh. This file should be empty and without any extension. Finally, remove the SD card from the PC.

Step 4: Install OS

We will go to install the Raspberry Pi OS. Insert the micro-SD card in the Raspberry Pi. Connect the Raspberry to a network using a network cable and finally, plug the Raspberry to the electricity.

After that, you should wait for 3 to 5 minutes.

Then you need to look for the Raspberry Pi IP address. You can use IP Advanced Scanner, make a scan and find the IP address.

Now, you need to use a way to connect via ssh to the Raspberry. You can use Putty if you use Windows or open a Linux terminal and use the command ssh pi@ipaddress.

The Raspberry default credentials are user: pi and password: raspberry.

You should change that password using the passwd command and write a new password. You do not forget that password.

Step 5: Upgrade the OS

Os are continually upgraded. That is to solve some bugs and vulnerabilities. After installing the Raspberry Pi OS you should upgrade it. For that purpose you should use the following commands:

sudo apt-get update

sudo apt-get upgrade -y

sudo rm - f /etc/systemd/network/99/default.link

After those commands you should reboot the Raspberry. Use the following command:

sudo reboot

You should wait for 3 to 5 minutes before trying to connect again.

Step 6: Installing Open Media Vault

Now, you are ready to install Open Media Vault. To do that you need to run the following command:

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

After hit enter you should wait for up to 30 minutes. You must not close Putty or Linux terminal.

When the installation concludes, the Raspberry Pi will reboot automatically.

Step 7: Access Open Media Vault

We are ready for configuring our NAS. To access to the configuration page you need to open a browser and enter the Raspberry Pi ip address.

The default credentials are user: admin, pass: openmediavault.

Step 8: Change the Default Password

I recommend changing the default password. For that, you should go to general settings and then go to the web administrator password. Write the new password, save and apply the changes.

Another important step is to make the ip address static. For that, you should go to network, interfaces, click in the interface that appears, select the static method, and fill the address, netmask, and gateway. You can use the current ip address.
After those changes, you should save and apply the changes.

Step 9: Configure the Date and Time

If you want you can configure the date and time for the system. I recommend configuring these options because the system should have the right time and date. In the system blade click date and time, pick up your time zone, then save and apply the changes.

Step 10: Storage

In the storage section select disk. You can see all the disks or media that are connected to the Raspberry Pi.

You can see the micro-SD car and the hard drive.

Step 11: File System

If you go to the file system, you can see the partitions in the hard drive.

In that section, you should select the partition that you want to use and mount it. Then save and apply the changes.

Step 12: Shared Folder

In the Access Right Management, go to a shared folder, then click on add. In this part, you fill the name of the folder, select the device, fill the path for the folder, and select everyone: read/write as permissions. Finally, save and apply the changes.

We should not give permissions to everyone. But this is a pilot project. You should increase the security for your project if this NAS will be permanent.

Step 13: SMB/CIFS Protocol

You should go to Services and click on SMB/CIFS. In this section, you enable SMB/CIFS protocol to allow share the folder with Windows and Linux devices.

You should enable and change the workgroup name, by default all windows machines are in the workgroup WORKGROUP. Finally, save and apply the changes.

Then, click on the tab shares and click on add. In this box, you should select the shared folder that we configured previously, and in the public drop-down select Guest Allowed. Save and apply the changes.

We have configured our Raspberry Pi NAS. Now it is time to test it and enjoy it.

Step 14: Test

If you are using Windows, open a file explorer, go to Network and you will see the name of your NAS. Double click on it, it will ask for a user and password, write any user and password. You did not set that, remember you allow guests. I recommend a change that configuration if your NAS will be permanent. If everything is ok you should see your folder.

I hope you enjoy this project.

Be the First to Share

    Recommendations

    • Pets Challenge

      Pets Challenge
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge
    • Backyard Contest

      Backyard Contest

    2 Comments

    0
    porchet.59510
    porchet.59510

    8 months ago

    Hello, I'm using OMV for 3 yeas now and I am very satisfy, but I need to admit that it's not an easy system for begging, but you learn a lot trying to do config of plugins.
    For an instal of OMV on a usb stick or a SD card, there is the Flash Memory plugin, which will save the OS drive from a lot of writing, this plugin may save your SD card si I think you should add a step for that :). For other ideas, if you have films or/and series on the drive, you could use Plex (there was a plugin on OMV 4 but it's only with docker on OMV 5) it's Wonderfull. By the way, thanks for the instractable

    0
    RishinderR
    RishinderR

    Question 8 months ago on Step 14

    I have tried something similar but without using the GUI, just using samba CLI. I was able to access my external NTFS partitioned HDD. However, I wasn't able to copy or write to it. Basically it gave me just a read access to folders only. I couldn't change the permissions either by SSH into my PI in the mounted hard drive folder, it keep saying operation not supported. However, while using a USB pen drive that was partitioned using FAT, I was able to access it without doing anything. I read it somewhere that NTFS isn't good for NAS but not sure what is the real explanation of this behaviour.