Unraid: Working with External Drives

Unraid: Working with Unassigned Devices

In this post, I’m going to show you the steps needed to add an external hard drive to your Unraid server and make your media accessible to a docker container. I’ll show you how to set it up in Plex, but this guide should work equally well for Emby or Jellyfin etc.

I’m going to assume that you have Docker up and running already, and have Community Apps installed. Let’s get started.

Unassigned Devices

The first thing we need to do is install two plugins. Go to the Apps tab and search for the following:

  • Unassigned Devices
  • Unassigned Devices Plus (Addon)
Unassigned Devices in the Community Apps
Unassigned Devices in the Community Apps

Install both of them. You’ll see them under the Plugins tab. Clicking on either of them there won’t do much, so let’s move on.

Your External Drive

Plug in your USB drive. My drive happened to be an 18TB WD elements drive that I grabbed off Amazon in a sale.

You can find the current pricing for WD elements here. (referral link, doesn’t cost you any extra, but helps support the blog).

WD Elements on Amazon
WD Elements on Amazon

It’s formatted as NTFS and I’d been using it with my laptop and main workstation to backup documents and consolidate my media collection. Once plugged in, wait a couple of seconds and if all goes well, you should now see your drive listed under Unassigned Devices under the Main Tab.

Viewing your External Drive
Viewing your External Drive

If it’s a modern drive, it should show you various stats like temp, read, write etc… There are two settings links here. You can click on the settings icon directly to the right of “writes” and that will give you some advanced options. Do you wish to rename it, Pass through, automount, share etc… I’ll leave that for you to change as needed.

Specific Disk Settings
Specific Disk Settings

I want to pick the settings option to the far right of the Unassigned Devices title. Here’s where you can specify some more general options. As this disk is primarily a media share for me and not accessible from the internet, I am less concerned with share security, so I was happy to leave SMB security off. I wanted to Enable NFS support though, again, I left a password off here, YMMV.

I did switch on Automount however. You can see my settings below.

Unassigned Devices Settings
Unassigned Devices Settings

 

Your External Drive share should now be fully browsable under the following path:

/mnt/disks/…..

In my case, the name of the drive was Elements, so using Filezilla, I connected to my server and could freely interact with /mnt/disks/Elements/… Let’s set up the media.

Container Setup

See below for my Plex setup. I have media already living on the server itself, but wanted to be able to bring in the content on the USB drive too. You need to “Add another Path” at the bottom and fill in the relevant details for your new disk share.

Adding the Additional Share to the Container
Adding the Additional Share to the Container
Plex Container Set Up
Plex Container Set Up

Click Apply and Done, and restart the container.

Now once Plex has started up, it’s just a case of adding the additional media folder to the library. Once done, refresh the library, and your additional titles should begin to show. Job Done!

Adding the External Share to the Plex Library
Adding the External Share to the Plex Library

At this point, you should now have the drive fully browsable through the server. You can add it into a container and you can stream files from it via your media app of choice. Aside from media distribution, you could use the same set up, to back files up to it. There are a variety of containers that you could use to store files on there, or you could use rsync to copy files directly from the server to the drive.

Rsync commands

I’ll show you a single command to back up a share on the server to the external drive. Rsync in itself needs a complete tutorial, but for those who just want to see how to copy and sync any changes to the external drive, here’s the command I use in the Unraid shell. This backs up my “Pictures” share on the server, to a folder on the External drive:

rsync -avh “/mnt/user/Pictures/” “/mnt/disks/Elements/Pictures”
You can set this to run at various intervals or create scripts, but that’s beyond this tutorial.
Hopefully you have full control over those additional backup drives you’ve got laying around your main server. If you have any other cool ideas, feel free to share them in the comments or better still, come and join our facebook group and enlighten us all 🙂

 

For more information on how to set up and trigger an automation (i.e. control lighting) directly from Plex, see here for a solution.

Looking to create a plex server, but unsure of what hardware to go for? Here is a guide I wrote previously.

If you’re considering a renovation and looking at the structured wiring side of things, or maybe you just want to support the blog, have a look below at my smarthome book, it’s available in all the usual places (including paperback).

The Smarthome Book
The Smarthome Book

 

Leave a Reply