PMS Migration Install Fail

so. i downloaded and installed plex on centos. logged in, opened it, signed out and stopped the service.

ive then made /home/plexdata/Library/Application Support/Plex Media Server

unzip my media, metadata, plug-ins and plug-in support there.

then i tried to follow your you asked me to previously do, but i dont fully understand it hence how im suppose to adapt it.

so i will call it a night after 11 days in a row at work i think i need some sleep before i do something stupid :slight_smile:

It’s totally ok. If you put everything in /home/plexdata, I can take it from here. :slight_smile:

  1. We first make sure all the permissions in /home/plexdata are correct for user plex
sudo chown -R plex:plex /home/plexdata
  1. Now we tell systemd where the data has been moved to by using this file (copy/paste this)
    a. sudo mkdir /etc/systemd/system/plexmediaserver.service.d
    b. Using the editor of your choice, as root, create file /etc/systemd/system/plexmediaserver.service.d/override.conf
    c. Put the text from the block below into it and save
# Move data directory to /home/plexdata
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/plexdata/Library/Application Support"

d. With the text above saved and in that file, tell the system it’s there

sudo systemctl daemon-reload

e. Rename the old Library directory so we can easily verify it’s no longer being used.

cd /var/lib/plexmediaserver
sudo mv Library Library-old

f. Start plex

sudo systemctl start plexmediaserver

If everything is correct, PMS will now come up and run normally with all the existing data.
We verify this by typing ls -la /var/lib/plexmediaserver and making certain no new Library directory has been created.

When verification is complete, remove the old copy of the metadata
sudo rm -rf /var/lib/plexmediaserver/Library-old

That’s it, All done.

1 Like

Great :slight_smile: But before I do that once I get home

i think it’s important to mention, I did not make a plex:plex user or group before or after my installation yesterday.

I did not follow any other guide besides what you told me in your installation message 18

WHen you install Plex, if user plex doesn’t exist, I create it for you :slight_smile:

The guide I gave you above is the same I wrote here, abbreviated for you, knowing the data is already in place.

well im pretty sure all that worked! i just didn’t delete Library-old, in case i dunno that the world ends :joy:
i just got 2 more questions.

in web browser http://127.0.0.1:8888/web or localhost:8888/web gave me an unable to connect error, but with :32400 it took me to the log in page server setup and asks me to give a name to the server and point to my media folder.

  1. i’m confused, shouldn’t i see my old windows server unavailable and my ‘old windows’ libraries instead of making a new server?

i think i have one last thing to do before i can update my libraries (once i get to see them again) Plex doesnt see my media folders. i found this guide you wrote Linux Tips - #2 by ChuckPa
and i believe thats what i need to do for plex to be able to see my HDDs.
basically, (i think) i took my 3 internal HDD and made one. all my media is on /dev/md0

Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   50G  6.2G   44G  13% /
devtmpfs                  16G     0   16G   0% /dev
tmpfs                     16G   10M   16G   1% /dev/shm
tmpfs                     16G   18M   16G   1% /run
tmpfs                     16G     0   16G   0% /sys/fs/cgroup
/dev/sda1               1014M  320M  695M  32% /boot
/dev/mapper/centos-home  1.8T   79G  1.7T   5% /home
tmpfs                    3.2G   64K  3.2G   1% /run/user/1000
/dev/md0                 5.5T  2.3T  3.2T  42% /run/media/aurelie/c959b441-08ff-4a80-adcf-6ee256c01ce9
  1. so am i right to think your ‘using other hard drives with PMS’ guide will make plex see my drives?

EDIT: i just realized my array of my 3 2TB drives are formatted as XFS. Can i still follow your guide with it or should I reformat it?

sh-4.2# blkid /dev/md0
/dev/md0: UUID="c959b441-08ff-4a80-adcf-6ee256c01ce9" TYPE="xfs" 

i’m starting to see the light at the end of the tunnel thanks to your big help. i’m very grateful you are holding the lantern

I apologize if I’ve confused along the way.

  1. Port 8888 is used when dealing with a SSH-tunnel to a remote host. Port 32400 is used when on your LAN or on the machine itself.

  2. For /dev/md0 you can use the name directly in /etc/fstab because it won’t change. Specify xfs and done. :slight_smile:

/dev/md0      /mount/point/here     xfs    defaults,auto,bg,nofail   0 2

The 0 says not to back it up. The 2 says to run fsck if needed (second device to check)

  1. It’s okay, my brain actually knew that, but it was off at 3am lol

A. So it’s normal logging into 32400 it asked me to setup a new server And not see my old one?

  1. I’ll try that tonight to give permissions to my disks

Coming from Windows, it will not have the old server ID info (those are in the registry somewhere and I don’t know windows)

Let it think you’re creating a new server HOWEVER Skip the part of creating new library sections. They still exist. Set other preferences as you wish.

When you get to the dashboard, Fix the paths to your media.

1.what does bg mean? i imagine rw means read write and ro means read only

  1. i think my disks are already mounted and full of media, so i should not mount and unmount it like in your guide?

  2. so if i understand correctly i should:

nano /etc/fstab
/dev/md0      /run/media/aurelie/c959b441-08ff-4a80-adcf-6ee256c01ce9     xfs    defaults,auto,bg,nofail   0 2

save, restart computer and then give the correct permissions

su
find /dev/md0 -type d -exec chmod 755 {} \;
find /dev/md0 -type f -exec chmod 644 {} \;

Is this right? did i understand correctly?

ALMOST THERE! :slight_smile:

  1. Create a more humanly readable AND easier to type directory name somewhere. How about what I recommend in the guide? I will use name md0 only because it’s the first raid volume. You can make it name name you want. Only /dev/md0 is required to be named that way.
sudo sh
mkdir /raid
mkdir /raid/md0
chmod -R 755  /raid
  1. Now, tweak your suggested liine to be:
/dev/md0      /raid/md0     xfs    defaults,auto,bg,nofail   0 2

We do this because /run is reserved to the desktop’s file manager. Plex can’t get there (default linux security will block plex from seeing your files). We create an easily accessible & common place that makes sense. Since this is a raid volume, why not use /raid ? :slight_smile:

As for the options:

  • defaults = all normal default options for xfs
  • auto = mount automatically at system start
  • bg = push the mount to the background (don’t make the whole system hang if there is a major problem (used in conjunction with nofail)
  • nofail = Tells Linux not to fail startup if the volume doesn’t start. If startup did fail, you would find yourself at a console-only “Rescue” prompt. It’s very ugly and cumbersome. This option tells it to skip mounting the raid volume if there’s a problem. You’ll spot something is wrong and can then address it.

Once mounted, you refer to /raid/md0 for all subsequent command and usage in PMS.

We are so close i can feel it! :slight_smile:

now this is what happened when i tried to mount it as /raid/md0 :

mkdir /raid
sh-4.2# mkdir /raid/md0
sh-4.2# chmod -R 755  /raid
sh-4.2# nano /etc/fstab
sh-4.2# nano -w /etc/fstab
sh-4.2# df
Filesystem               1K-blocks       Used  Available Use% Mounted on
/dev/mapper/centos-root   52403200    6427656   45975544  13% /
devtmpfs                  16340896          0   16340896   0% /dev
tmpfs                     16357660       6700   16350960   1% /dev/shm
tmpfs                     16357660      18320   16339340   1% /run
tmpfs                     16357660          0   16357660   0% /sys/fs/cgroup
/dev/sda1                  1038336     327448     710888  32% /boot
/dev/mapper/centos-home 1882658652   82580900 1800077752   5% /home
tmpfs                      3271532         48    3271484   1% /run/user/1000
/dev/md0                5858060288 2451017812 3407042476  42% /run/media/aurelie/c959b441-08ff-4a80-adcf-6ee256c01ce9
sh-4.2# umount /run/media/aurelie/c959b441-08ff-4a80-adcf-6ee256c01ce9
sh-4.2# mount /raid/md0
mount: wrong fs type, bad option, bad superblock on /dev/md0,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

now what?

ok… Very simple

sudo blkid /dev/md0

It will tell you what it’s formatted as.

Make sure /etc/fstab matches whatever it’s formatted as

sudo blkid /dev/md0
/dev/md0: UUID="c959b441-08ff-4a80-adcf-6ee256c01ce9" TYPE="xfs"

now i’m guessing you need to see my /etc/fsab file?

Yes please’

If you also have XFS there,

Let’s make sure XFS utility are installed (your’re missing something like a mount.xfs file)

yum install xfsprogs xfsdump

i didnt know how to copy the /etc/fstab so i just took a pic

i’ll do this
seems like it wasnt that

sh-4.2# yum install xfsprogs xfsdump
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                     |  12 kB  00:00:00     
 * base: mirror.calgah.com
 * epel: mirror.csclub.uwaterloo.ca
 * extras: mirror.calgah.com
 * updates: mirror.calgah.com
Webmin                                                                                   | 2.9 kB  00:00:00     
base                                                                                     | 3.6 kB  00:00:00     
download.mono-project.com_repo_centos_                                                   | 2.9 kB  00:00:00     
epel                                                                                     | 4.7 kB  00:00:00     
extras                                                                                   | 3.4 kB  00:00:00     
teamviewer                                                                               | 2.5 kB  00:00:00     
updates                                                                                  | 3.4 kB  00:00:00     
(1/2): epel/x86_64/updateinfo                                                            | 992 kB  00:00:00     
(2/2): epel/x86_64/primary_db                                                            | 6.7 MB  00:00:00     
Package xfsprogs-4.5.0-19.el7_6.x86_64 already installed and latest version
Package xfsdump-3.1.7-1.el7.x86_64 already installed and latest version
Nothing to do

if your root is xfs, you have the mount.xfs.

Someting not making sense herer.

Pair down the mount command:

defaults,auto and see what it does (manual mount of /raid/md0

ok i’ll take off the bg, nofail in the /etc/fstab file then?

yes

experiment on the command line directly

#   mount -o defaults  -t xfs /dev/md0 /raid/md0

Now you can add options separated by comma and find what is not right