Raspberry Pi + Open Media Vault : Create a tiny Pi Powered NAS that gives you a an alternative to the WD My Cloud and Apple Time capsule.
There are many ways to use your Raspberry Pi and create a NAS (Network attached Storage Device) and a Time Machine that works with your macs.
The simplest way to do this is to run the Pi on Open Media Vault. Open Media Vault is a very powerful open source NAS. For this setup, We will be formatting the hard disk in EXT4 (the native linux ) format. This means that data on the hard drive will be erased. There are ways to use an old windows hard disk but file and folder permissions donot work well and transfer speeds are quite slow.
- Download the latest Open Media Vault ISO image.
- Prepare a SD / Micro SD card to receive the downloaded Image.
- Un compress and Transfer the downloaded Image to the SD / Micro SD card.
- Connect all components to the Pi, insert the SD card and Boot up the Pi.
- Get the IP address of the running Open Media Vault Pi.
- Log into the OMV Pi using another machine on your network and the OMV web interface.Configure shares , protocols and access controls.
Time and Difficulty :
- Time : About 15 mins once you have the Image file and the rest of the software.
- Newbie Difficulty level : Moderately Easy (No Command line Stuff)
What you will need :
- Raspberry Pi Model B or B+ or Raspberry Pi 2 Model B or one of its clones like Banana Pi M1 or M2 or Banana Pro
- Ethernet connection to the Pi
- SD or Micro SD Card that fits into your Pi (4GB or above is recommended)
- A Empty Hard disk (HDD) that will serve as the data drive for your NAS. (Linux is very picky about file permissions and in order to make sure file ownership and folder shares are correctly configured, we recommend formatting the HDD during the setup. There are ways to avoid this but will not be discussed in this guide)
- A powered USB hub to power the HDD. (You may not need a powered USB hub depending on the type of Pi, the model of Hard disk and the power source for your Pi)
You may want to consider :
- Connecting the Pi to a tv or monitor during the first boot.
- An USB keyboard and Mouse plugged into the Pi.
- Learning about SSH and how to remotely access the Pi from another machine on your network
You will need to download :
- The latest image of Open Media Vault. Navigate to their download section, click on the link leading to the latest ISO images > Raspberry Pi images and select the latest image file. It will have a name similar to the omv_x.xx_rpi2.img.gz.
- 7-Zip utility to uncompress the downloaded Img.gz image.
- SD Formatter utility to wipe the SD / Micro SD card clean and get it ready
- Win32 Disk Imager to transfer the expanded ISO image to the SD / Micro SD card.
Create the NAS!
- Use 7-zip and expand the downloaded omv_x.xx_rpi2.img.gz file into a omv_x.xx_rpi2.img file.
- Clean the SD / Micro SD card off all data using the SD Formatter Utility.
- Open the Win32 Disk imager utility, under the device section,very carefully select the SD card drive, Load the omv_x.xx_rpi2.img in Image file section and Click Write.
- Prepare the Pi by connecting the HDD, Ethernet and optional HDMI/VGA and Keyboard + Mouse.
- Insert the SD / Micro SD card into the Pi and Power it on.
Access the NAS
- If you have a Monitor / TV connected to the Pi, you will see the IP address.
- Alternatively, log on to your router and note the IP address of the Pi from the list of connected devices.
Configure the NAS
- Open a web browser on your main PC and enter the ip address of the NAS in your address bar.
- Once the log in screen appears, use the default “admin” as the username and the default “openmediavault” as the password.
- Click on storage > Physical Devices and choose the hard disk (typically /dev/sda or sdx)
- Select the HDD and click Wipe (choose the quick option )
- Navigate to Storage > File Systems
- Choose Create. Under the pull down Device label, choose the Hard Disk, Enter a label and choose EXT4 as the file system.
- You will now need to “Mount” the newly created drive by highlighting the new ext4 row that has appeared at the bottom and clicking on Mount. The drive is now mounted and ready to hold data.
- For the drive to be accessible, shared folders need to be created.
- Navigate to Access Rights Management > Users and click on Add> Create Users and Passwords.
- Navigate to Access Rights Management > Shared folders and click on Add.
- Give the folder a name, Choose HDD as the Volume , leave the path as it appears and in Permissions, choose Everyone : read /write ( Note : we are creating a public folder called test on the NAS that will be accessible to all who are logged onto your network. You can at a later stage go back , delete this share , create users and create folders with explicit access permissions for users or groups)
- Create Another folder and call it TimeMachine
Windows Network : Enabling access to the Public share
- Navigate to the Services section > SMB/CIFS
- Click on Enable and Enter your windows Workgroup (the default is WORKGROUP)
- Go to the Share tab.
- Click on Add.
- In the Add Share Dialog box, select ‘test’ from the pull down shared folder. Add a name, comment and select ‘Only guests’. Then click Save.
- Open Windows explorer and in the address bar enter ‘\\raspberrypi”
- You should see a shared drive that is now accessible.
Apple Share and Time Machine : Enabling access to the Public share and configuring a Time machine backup
To do this, you will first need to download the Apple Filing plug in.
- Goto System > Plugins > Sharing
- click on the tick box next to openmediavault-netatalk 1.5. and click Install.
Once installed, you will see a section called Apple Filing under the Services section.
Creating a Public access folder :
- Click on Apple filing under Services.
- Click on Enable and Save.
- Select the shares Tab and click on Add.
- Select ‘test’ under the pull down menu, choose guest access options for public logins.
Creating a Time machine backup :
- Goto the shares tab under Services > Apple Filing
- Select the share you want to use for Time Machine back ups.
- Click on Add > Select ‘TimeMachine’ and enable