Setting up a new hard drive for my RPi 3 B+ Plex server

Here comes what I hope to be a simple question and my appreciation for any help that I may get.

Shortly after the B+ came out, I went ahead and set up a raspbian Plex server. I had been running a server from my laptop for a while and I was looking forward to making that change. Doing my research, I went ahead and paid for a PDF put together by a Daniel Abdilla “Home media server using Raspberry Pi & Plex” (Yes, I understand that there were plenty of instructions out there but I liked how it was set up). It was an easy success for me and I quickly had it running my home media network for all devices. The only problem I’ve ever had was a time when I suddenly wasn’t able to update Plex with the instructions I was given but I’ve been able to piece together another method which works for me just fine.

Well, all of that, pointlessly, to get to here and my question: In the initial setup I used a 1tb, USB powered hard drive attached directly to the Pi. It’s worked great all this time but I now want to upgrade it to a externally powered 8tb drive.

Here I am hoping that this can be an easy process.

Any suggestion as to the most painless method of upgrading to a new hard drive? I’m hopeful that it’s nothing more than a hot swap and setting up the new drive with the same file structure although at the same time I’m pretty confident that this is not the case.

Any help would be greatly appreciated and I thank you for your time in reading this.

How about making it a clone?

  1. stop plex.

  2. Setup the new hard drive as a whole new OS disk, partitioned as you want. I recommend either creating a /home partition for your metadata or making sure to leave enough in root (/) for the metadata

  3. Now, having booted to the new hard drive, manually mount the old 1TB on /mnt

  4. Install Plex package and let it start once (no need to set it up). We want the installer to do the base work. Don’t forget to stop it before proceeding

  5. Create the needed directories for your media mount points (if from a NAS/etc) and place those mount entries in /etc/fstab . (you can reference /mnt/etc/fstab as you do this for easy copy/paste). Verify you have also transferred all the directory permissions and everything is the same.

  6. Now, with all the directories and software in place on the new drive, we’re ready to bring Plex over.

  7. Clone the old metadata, as one operation, to the new HD.

sudo sh

# clear out in the new plex metadata directory .. get rid of the temp startup 
cd /var/lib/plexmediaserver
mv Library Library.unsed     # we will delete this later

# Go to the old metadata directory and copy it (preserving everything) using tar
cd /mnt/var/lib/plexmediaserver
tar cf - ./Library | (cd /var/lib/plexmediaserver ; tar xf - )

# Since the UID/GID is likely to have changed,   Fix that now
chown -R plex:plex ./Library

# Start Plex and take it for a test drive
systemctl start plexmediaserver

How’s that?

Thank you for your reply, Chuck. A good deal of it passed over my head but I’m going to give it a crack and trying to figure it out. My experience with a RPi Plex server revolves around me following step by step instructions. Things such as “Setup the new hard drive as a whole new OS disk”, “Install Plex package”, “Don’t forget to stop it before processing” and other things seem to be coming naturally to you but I’m sure I’m just missing pieces. (I would consider myself very computer savvy, but I don’t dabble much in the RPi stuff.

Again, thank you, and I’m going to give it all a shot. You gave me a nice chunk of info and I really appreciate the effort. I’ll do my best.

The sequence I wrote will teach you some Linux command line skills.
It comes with turf when running Linux because at some point we all need do it.

I suggest reading the embedded electronic manual for the commands I’ve given.

man tar - tells you all about tar and its options.
man chown - tells you about chown
etc
etc

Become familiar with what you’re about to do so you understand the basics and are comfortable with the concept.

Don’t take my instructions blindly. You’ll be way ahead of the next event to come along if you can pick up some confidence at this one.

It’s not THAT hard — I learned it :rofl:

Hints:

  1. Stop Plex - sudo systemctl stop plexmediaserver (invoke admin priv & stop in one command)
  2. Setup the OS disk (insert USB ISO stick and run the installer. it will do most of the work. it’s also a graphical UI.)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.