Many people buy a Raspberry Pi because it can be used as an easy DIY retro video game console, or a machine to run Kodi media center on, but these are not the only things that this remarkable $25 ARM board can do. You can also turn a Raspberry Pi into a Linux NAS.
With the help of Open Media Vault, we’ll go over exactly how to take a Raspberry Pi and turn it into a Rasbian powered Network Attached Storage device, complete with USB storage, Windows-compatible network file sharing, and even cover how to run Plex on it!
Turning a Raspberry Pi 2 or 3 into a Debian powered NAS device is easier than you think, and it starts by downloading the latest version of Open Media Vault to your PC. Additionally, download the latest version of the Etcher USB/SD Card burning tool. Once everything is downloaded, insert the Micro SD card into the PC you intend to flash the image with, and open the Etcher tool.
Click the “select image” button, and navigate to the downloaded Open Media Vault image. Then, go to “select drive” and click on the Micro SD card. When the image and SD card has been selected click “flash!” to begin the process.
When flashing completes, take the SD card out of your PC, plug it into the Pi and turn it on. Additionally, plug in an Ethernet cable so that Open Media Vault can gain access to the network.
Note: need WiFi for OMV? You’ll need to first connect with Ethernet and then set it up later under Network in settings.
RECOMMENDED FOR YOU
Out of the box, Open Media Vault for the Pi should support SSH connections. As it turns on if connected to a network, the Pi will display the IP address that you can connect on. Go to your Linux PC, open a web browser and enter the following in the URL bar.
You’ll see a login interface. In the interface, enter “admin” for the username, and “openmediavault” for the password.
Out of the box, the little things are taken care of in Open Media Vault. Still, to use it fully, some configuration is required. In the interface, select “user”. This will take you to the user manager. In the user manager, click the “+ Add” button to create a new user.
Under the name section, fill out a lowercase username. Add an email next to the user if you wish, and set the password. In the same “Add user” window, click on the “Groups” tab. To save time, assign the user to every group you think you’ll need.
For example: want the user to access Samba? Add it to the Samba group, and etc. Don’t know for sure what groups to add? Consider selecting as many groups that make sense, or just adding all of the groups that exist to your user (except root).
Lastly, under “Shell”, change /bin/dash to /bin/bash.
Note: SSH should be enabled by default. If it isn’t, click “SSH” on the sidebar. From there, click “Enable”.
Setting Up USB Storage
The Raspberry Pi works from SD storage, and as a result of this, there really isn’t a lot of room for files. To solve this problem, get out a USB hard drive (a large flash drive is also OK) and plug it into the Pi’s USB port.
After plugging it in, move over to “File Systems”, highlight it in the interface and click “Mount”.
By default, OMV (and Debian) support NTFS and various Linux file systems, so there should be no reason to reformat your USB drive.
When the USB drive is mounted, it’ll be possible to use it as the primary storage system in Open Media Vault. Just be sure to create shared folders (in NFS, FTP, SMB) on the USB drive via the interface, rather than on the SD card.
Setting Up Network Shares
The last part of setting up a Linux NAS is to enable the network storage. For compatibility sake, we’ll be covering how to set up a SAMBA share in this article. However, if you have other needs, Open Media Vault supports many different types of network sharing protocols.
To set up a network share, look for “Services” in the side-bar. Under services, select “SMB/CIFS”.
On the SMB/CIFS page, click “Enable” to start the Samba service, and then click on the “Shares” tab to start working with network folders.
Under shares, click the “+ Add” button. This brings up the new shares interface. From here, click the + sign to go to the “Add shared folder” interface.
Select the “device” drop-down, and select the USB storage device you added earlier.
If you’ve got an existing folder you wish to use as the shared directory, navigate to it under the path section. Otherwise, type in the name of the folder, and OMV will automatically create one for you.
Next, change the permissions of the shared folder by going to “Permissions”. Scroll down and select “Everyone: read/write”.
Click “save” to apply the new share.
Connecting Raspberry Pi
To connect to your newly created, Raspberry Pi powered Linux NAS, do the following:
Click on the explorer bar and enter something like \ip.address.of.pi to gain access to the shares on the network.
Using the file manager, enter smb://ip.address.of.pi to connect over SMB to the shares on the network.