This year, I got a Raspberry Pi Model B+ as a gift and thought about purposing it to act as 1) a network drive, 2) a media server, and 3) an OpenVPN server. The day I got it, the Raspberry Pi 2 came out, so I was a little disappointed, but I continued to search for a software solution to make all my requests work. What I settled on was OpenMediaVault, a pretty difficult-to-use piece of software that has numerous plugins for Calibre, DLNA, AirPlay, and other useful tools.
There are a number of steps to set up OMV correctly, but first the installation. For the Raspberry Pi, you need a microSD card flashed with the latest OMV distribution. Follow the steps here:
- Download the distribution here.
- Format a new SD card with the SD Card Association’s SD Formatter.
- Flash the drive with UNetBootin or similar drive flashing software.
Next, set up OMV by plugging in the SD card and booting up your Raspberry Pi. Depending on the distribution, the standard accounts and passwords will be admin/openmediavault (web portal) or root/openmediavault (SSH/Command Line). Note that OMV has no GUI, but a connected display and keyboard will allow you local access to the command line.
- Log into the web portal and then change your admin passwords (General Settings> Web Administrator Password). For each setting change, you need to click on “Apply” and “Save”.
- Create Users and Groups that can access your media server with the Groups and Users pages.
- Enable FTP, SMB/CIFS, and SSH as needed. I recommend at least SMB (Samba-the network drive) and SSH.
- Create a storage volume through “Storage> File Systems> Create”.
- Make sure users can access shares by editing the “Access Rights Management> Shared Folders> Add” settings.
- To use the share as a network drive, create a folder path, such as “Documents/” on the share.
- Grant users permissions through the Privileges dialog box and the Read/Write settings.
- Grant services permission to use the share through the service pages, such as Services> SMB/CIFS> Shares> Add.
If using a Raspberry Pi Model B+, do not enable autoupdates. At least, do not download the PHP-FPM update, which will break the web server. You will need to revert to a previous version using the command line if you do. Here is how to do that (source):
dpkg -i php5-pam_1.0.3-2_armhf.deb
If there are errors with file permissions, such as being able to access the network drive but not being able to edit any data, then check the drive’s file permissions, especially looking at the Replace & Recursive or Permission Inheritance options. File issues can be fixed by adding the user to the root group, although this is a particularly insecure fix (sources 1, 2).