Introduction: How to Build a NAS With BananaPi and LEGO Part 2

In part 1 you can have a look on what parts you need and how to build the case.

Now I want to give an overview on how to install the software.


The Software

I take the free Linux distribution OpenMediaVault (OMV). It is specially designed for network attached storages.

It supports everything, what i need from my NAS:

  • Different Protocols like Samba, NFS, FTP, SSH
  • User and Group management
  • Monitoring
  • Statistic reports via E-Mail
  • supports Plug-Ins
  • configurable via web interface

Installation

Got to http://www.lemaker.org/ and get the OMV version for BananaPi.
If the link is down you can try the download section of http://simplenas.com.

Make sure to download the version for BananaPi and NOT for BananaPro!

Step 1: Flashing the SD Card

Picture of Flashing the SD Card

To flash the downloaded Image to the SD Card, a disk imager ist necessary.

For Windows I recommend the „Win32 Disk Imager“. You get you copy on https://sourceforge.net/projects/win32diskimager/.

The flashing is very easy, just select your OMV version as the image file and „Write“ it to the SD Card.

This will delete all data on the device so make sure to use the correct device to write on!

For Ubuntu the tool „imagewriter“ should do the work too.

After a few minutes of writing the image to the SD Card, you can put the Card into your BananaPi.

Step 2: First Login

Picture of First Login

After switching on the BananaPi, it would run the boot routine and start OMV.
It would try to get an IP Address from the DHCP server in your network.

If the Pi is connected with HDMI to a monitor or TV, the IP Address is displayed on the LogIn screen (in my case its „eth0: 192.168.42.41“).

The other way to get the IP Address is to have a look into your routers overview of devices.
Search for „openmediavault“.

Now open a browser on your PC and type in the IP Addres of the BananaPi.

In my case its 192.168.42.41.

You should see the OpenMediaVault Login screen:

Type in the default Username and Password:

Username: admin
Password: openmediavault

Step 3: Changing Default Passwords

Picture of Changing Default Passwords

The first thing to do after Login is to change the passwords.

There are two default passwords in the system:

Password for Web Interface:
It has to be changed with „System -> General Settings -> Web Administrator Password“

Password for root:
To change the Linux root password you have to connect via SSH to your sytem.
I use the free terminal software PuTTY (http://www.putty.org/).

To connect, select „SSH“ as connection type, type in your OMV’s IP with port 22 and OPEN.

Confirm the security alert with YES and login as

Username: root
Password: openmediavault

To change the password, use the instruction

passwd

Close the connection with the command

exit

Step 4: Adjust Date and Time

The BananaPi do not have an integrated real time clock, so is is necessary to retrieve the actual time via NTP (Network Time Protocol).

Navigate to „System -> Date & Time“, select your Time Zone, check the Box „Use NTP Server“ and press SAVE.

Step 5: Update the System

Now its time to update the whole system.

Go to „System -> Update Manager“, click on „Check“ and then update the packages.

In my case it was not possible to update via „Update Manager“ (it shows 0 packages to update).

I have done it with SSH connection and

omv-update

Step 6: Mount the Storage

Picture of Mount the Storage

To check, if the HDD connection is OK, go to „Storage -> Physical Disks“.
Device „/dev/sda“ should be your HDD.

To mount it, go to „Storage -> File Systems“ and press „CREATE“.
The HDD will be formatted and the file system will be created.

Now select the created „/dev/sda1“ and „MOUNT“ it.


Step 7: Create a User

Picture of Create a User

For a share a user with its rights is needed.

Go to „Access Rights Management -> User“ and „Add“ a user.

Step 8: Share the Storage

Picture of Share the Storage

The Store is mounted, what you need to use it in your network is to share it.

There are some differences by sharing data in a network; a Windows system is different to a Unix system.

If you want to get the data by a Windows PC you should enable the SAMBA service of your NAS; for a Unix PC NFS would be much more better.

Create a Shared Folder

Sharing operates on folders, so a shared folder has to be created.

Move to „Access Rights Management -> Shared Folders“ and „Add“ one.

In my example I used the root path („/“) as the „Path“ to share the (nearly) whole drive.

Create Samba Share

To use the NAS with a Windows PC you have to configure SAMBA on your NAS.
Navigate to „Services -> SMB/CIFS“. Enable it.

On the Tab „Shares“ add a new one with the shared folder you created before.

Step 9: Test the Share With Windows

On Windows you open an explorer and type in the address line the IP address of your OMV with two leading backslashes:

In my case: „\\192.168.42.41“

If Windows finds your NAS, it will prompt for user informations. After putting in your username and password created before, you can access to your shared folder on your NAS.


Thats it. Now you got a basic NAS!

The next steps can be to create

  • different users with different user folders
  • guest users
  • NFS shares
  • enable power saving mode
  • install a SQL server

Comments

About This Instructable

471views

12favorites

License:

Bio: Making with Hotz.and.Plotz
More by hotz_and_plotz:How to build a NAS with BananaPi and LEGO Part 2How to build a NAS with BananaPi and LEGO Part 1
Add instructable to: