Introduction: NAS-pi:Ultimate Box for Your PLEX, DLNA and NAS Pleasures

Picture of NAS-pi:Ultimate Box for Your PLEX, DLNA and NAS Pleasures

Hi, Folks!

Today, we are going to build a true looker! A Raspberry Pi network attached storage with media streaming functionality! Raspberry Pi 3 & Raspberry Pi 2 compatible! The featured build comes with 160GB RAID1 and 1.4 TB PLEX server.

Superb features:

  • NAS drive (in RAID1 configuration) mirror your files and access it from EVERYWHERE!
  • Samba (SMB) server for easy local network storage solution
  • PLEX server - a favourite media centre of the masses!
  • DLNA server - just in case you don't like PLEX
  • 3 easily accessible HHD 2.5" bays - swappable hard drives
  • USB interface for data transfer and keyboard access
  • A handsome looking box!

All this goodness is available for less than $50*!!!

Are you excited yet? Don't have the $50 to spare? Don't worry, if you skip few bells and whistles you could build it for as little as $21

What it can do:

  • File transfer at steady 10Mb/s
  • Streaming Video files in FHD
  • Play music
  • Store files
  • Impress your family and friends - comes with all the bragging rights!

Ready? Let's start the awesome instructable! Additional information about this build is available via this page:

http://www.notenoughtech.com/raspberry-pi/raspberry-pi-nas/

Also, hint hint Raspberry Pi competition time... votes are thanked for!

*cost of the drives is not included

Step 1: The Design and Ingredients

Picture of The Design and Ingredients

The NASpi has been created with 3 hard drives in mind. This puts certain requirements on the parts we have to secure.

Here is a handy shopping list for you:

  • 4 port 3.0 USB powered hub (micro USB preferred) (it has to be a similar design to accommodate for the cables inside) x1
  • USB angled cables x4
  • 2.5A -3A micro USB charger x1
  • Raspberry Pi 2/3 x1
  • HDD bay x3
  • 2.5" HDD (salvaged from old laptops)
  • Perspex glass (your choice of the colour) 3 x A4 (featured frosted glass)
  • Perspex glass for logo x2 10x10cm green and red

Instructable is not great for a nicely written table, so if you want to see each component with some prices from AmazonUK/US Aliexpress and Banggood please see this post . (at the very bottom)

Step 2: Modding Raspberry Pi

Picture of Modding Raspberry Pi

To hide all the cables, my favourite board has to be modified a little. There are two cables that will stick out like a sore thumb. I have to do something about it.

  • custom USB connector
  • custom power delivery

Power

One of the angled cables has to be salvaged. Cut off the mini-USB part leaving enough slack to bend the cable inside the box.

USB consists of 4 cables inside - usually coloured with Red and Black for power delivery and Green and White for data rails. Ignore the data and strip the power cables.

I soldered mine to the Raspberry Pi directly, near the power socket to deliver the power this way.(see picture)

Custom USB

I have to desolder the USB header from the board. I'm going to replace it with a plastic connector, but you can solder the wires directly to the board. Pay attention to the picture and labels.

R=red
G=green
W=white
B=black

The second USB header can be used for data transfers.

Step 3: The NAS-pi Box

Picture of The NAS-pi Box

The box initially was made out of cardboard. This means you can make the box out of anything! Later on my CAD skills improved a little bit and I have used Sketchup to create a proper case design that was used later to cut out the shapes from perspex glass. See Zip file for the sketchup file.

I went to local hackspace to get the perspex cut with a laser cutter.

I drilled additional holes in the front plate to create a better ventilation. These are later covered up by the logo which is glued to the front face using little studs. This way the air can flow and the holes are not visible.

The Raspberry Pi is mounted using 4 screws - I pre-drilled small holes inside - and dropped self-tightening nuts.

I also made a small hole (not going through tho) in the top section to accommodate the 3.5mm jack, but If I was doing it again - I would remove the jack altogether. I kept the Raspberry Pi as close to the top as possible, so if you want you can create the holes for HDMI and audio.

Step 4: Time to Build the Box

Picture of Time to Build the Box

It's time to build this magnificent IKEA style enclosure.

You will need:

  • acrylic glue (about $3/£2) (don't use superglue!! it will damage the glass)
  • 3M tape
  • agile fingers as space is at a premium.

Start with the Rasberry Pi, and manage cables. Once done, assembly the inside skeleton and glue it all together. Then it's time to plug the cables into the powered hub and stick the hub with 3M tape.

Use acrylic glue to stick the (previously opened) HDD bays to the sides. Make sure bays are facing the correct way.

Once bays are in place use glue to secure the bottom. You can also add some glue on the bays at the edges - but be mindful of the moving parts. I left the top without glue so I could access the guts easily.

Before you take care of the front and back, connect all cables including the power cable to the hub. Leave the logo as the last element.

The case will be rock solid within 24h

Step 5: OpenMediaVault - Software

Picture of OpenMediaVault - Software

You will need a tweezers unless you have loaded the software already on your Raspberry Pi.

The Raspberry Pi NAS is running an Open Media Vault software. It’s a free NAS operating system. Download the latest repository and install it on your board. Find the Raspberry’s IP and log in:

  • User: admin, root (for terminal)
  • Password: openmediavaut

I formatted the drives on my desktop PC to speed things up. Set it all as Ext4. Once ready plug everything in and log in to the web interface.

I strongly suggest to quick-wipe the drives before you do anything else. This way you are 100% sure drives can be accessed by the Raspberry Pi NAS. Also scan for drives even if the drives are present. The fstab file will get populated this way and will save you some issues later.

Create a user account, set a username and password. You will need these credentials later to access the network storage. Once this is done, you have to create the file systems. If you want to create a RAID partition, don’t create any file systems on the drives used for that. We will do this once the RAID partition has been created.


SMB – file sharing
Enable SMB in services, click through to shares option and create shares. It’s important that you select permission inheritance for any folders that contain media files for Plex or DLNA, otherwise, Plex server won’t see new file structures.

Once you have the shares available, modify the user permissions using the ACL option in users/share. This way you can allow users, groups etc to write/read content from the shares.

RAID1 – Mirror files
The speed of the USB on the Raspberry Pi NAS is not great, there will be no gain from stripping data across drives, but I can take advantage of RAID1 configuration. Mirroring is set so one disk is automatically mirrored on the other drive, and creates a safe backup environment. Leave this step for the end. This will take a couple of hours depending on your drives.

When the RAID set up is complete, you can create the file system, and add the shares.

PLEX

First, go to OMV- extras and enable Plex. Once this is done, download Plex plugin from the menu and installation will start. It will take few moments, after which you will get the Plex option in running services. This is where you can configure your Plex server and access the Plex interface.

Make sure you have some files on your drive (transfer it using SMB protocol) as it will be easier for you to verify that you have your Plex server running successfully on Raspberry Pi NAS.

Log in to your Plex account, and the libraries selecting the correct paths and after few moments you should see the Plex and your media available for streaming.

To make sure the drives load correctly on boot we have to delay the root. I spent countless amount of hours trying to figure out why my RAID1 partition disappears after the boot. Turned out that disks weren’t spinning quickly enough at the boot to register. To fix this, pop the SD card out and add this to the cmdline.txt file

rootdelay=10

Comments

glennlake (author)2017-11-23

Nice build. Not to criticize but if you mounted the Pi about and inch closer to the front you would have room for the cable ends and wouldn't need to mod the USB ports on the Pi.

quintaar (author)glennlake2017-11-23

Yes, but I would lose the access to the entire IO panel as well. This way I can plug USB sticks, unplug Ethernet at will without opening the box each time.

glennlake (author)quintaar2017-11-25

Your already using a USB hub right? Just mount a hub at the back of the box giving you access to the USB ports and a short Ethernet extension would allow access to that.

schmitta (author)2017-11-21

For those who don't know explain in a video or instructable what a NAS PLEX and RAID is and why you need them and how they work.

harkejuice (author)schmitta2017-11-22

NAS is "Network Attached Storage" simply a file level network-accessible storage. Think of it as a Network Drive in Windows.

"PLEX Media Server" is an application a client and server (however I believe the app is both) which lets you access media from a home network device running the server.

MatthewR12 (author)2017-11-21

I would guess that you already know about this but for others you can also create some Plex players with a Pi to use similar to a chromecast or firestick with RasPlex
http://www.rasplex.com/

quintaar (author)MatthewR122017-11-22

I actually didn't know about it. seems like a perfect companion for the NASpi server. especially for these who don't have Plex on tv

ckellingc (author)2017-11-19

Just a side note here, if you are going to use a pi as your plex box, you may want to turn off transcoding. The pi is not really set up to transcode streams.

darksb3r (author)ckellingc2017-11-21

True. Also worth noting that if you have HD movies (1080p/24) with good audio, they tend to require a gigabit network connection to stream without hiccups. The Pi only comes with a 10/100 Ethernet port standard. A gigabit Ethernet port can be added via USB that should do the trick.

quintaar (author)darksb3r2017-11-22

I have tested files up to 10GB with various bitrates and run into no issues so far. maybe I have been lucky with file formats

About This Instructable

8,871views

169favorites

License:

Bio: I am passionate about technology, cycling and art. This would explain why my bike has more computing power than your average office. I'm an ... More »
More by quintaar:NAS-pi:Ultimate Box for Your PLEX, DLNA and NAS PleasuresMake Your Keyboard Shine Again in RGBAmazon Dash Security Sensor
Add instructable to: