Help for installing Plex Server on Ubuntu

Hi ! I tought that by using ext4, that wasnt necessary, sorry about that ! Is it normal that i cant access the files on my computer SSD by default also ?

Right now, i’m stuck at the section “C”. I’m trying it on a single external hard drive for now to try it, and after writing “chown -R myuser:myuser /disks”, i tried “ls -la /disks” and my disk dont have the same acces that yours (drwxr-xr-x). Did i miss something ?

Also, how can i do this : " Having created the directories as root, verify empty (unmounted) directory permissions are 0755 before mounting" ?

For the “D” section, i will admit i’m a bit intimidated, particulary because english is not my first language. What should i write exactly ?

Thanks a lot for the help !

For section “C”, this is the “mount point directory”.
You can name it anything you like.

you have multiple to mount so, how about

sudo mkdir /hdds
sudo mkdir /hdds/First_drive_name (you pick the name )
sudo mkdir /hdds/Second_drive_name (pick this name too)
sudo chmod -R 755 /hdds

the 755 means everything can be read.

Don’t let step D intimidate you. On Linux, USB drives will change their ID (/dev/sdX) name every time you unplug then plug it back in.

Plex doesn’t like that. We get around the problem by telling Linux to look for it by the ID number encoded in the formatting.

Here, here are my two ssds.

/dev/nvme1n1p4   1048191 564991    483200  54% /home
/dev/nvme2n1p1    953208 172731    780478  19% /sata

Now, if these were USB drives AND I always wanted to guarantee they get mounted on the correct directory, I use the “block ID” of each

Linux is smart enough to read and use the UUID= value. (it’s actually preferred)
The blkid command is how we get that information.

[chuck@lizum led.2058]$ sudo bash
root@lizum:/home/chuck/led# sudo blkid /dev/nvme1n1p4
/dev/nvme1n1p4: LABEL="home" UUID="6617e293-eb35-467c-9cbb-50810b615e7b" BLOCK_SIZE="512" TYPE="xfs" PARTLABEL="home" PARTUUID="a6686972-744f-4cc6-87ce-30f97cda9292"
root@lizum:/home/chuck/led# sudo blkid /dev/nvme2n1p1
/dev/nvme2n1p1: LABEL="sata" UUID="a44499a2-abc5-4dd4-a1fa-7b7a4cd1ae3d" BLOCK_SIZE="512" TYPE="xfs" PARTLABEL="sata" PARTUUID="426c6ec4-c900-4e07-9fd2-3b9d80349362"
root@lizum:/home/chuck/led# 

Try this on your HDDs.

  1. type df -h to see which /dev/sdXY name they are at
  2. sudo bash (elevate yourself to ‘root’ privilege)
  3. Run blkid /dev/sdXY (change “XY” to be your drive and partition number)

Give it a try, show me.

1 Like

Hello and thanks for your time !

Here is what i get for my two external drives :

# blkid /dev/sdb1
/dev/sdb1: LABEL="external1" UUID="f7e37122-786a-41e7-a017-a82336fd5d14" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="78570b88-3217-4d5a-a8f5-949ae1340032"
# blkid /dev/sdc2
/dev/sdc2: LABEL="Mov" UUID="0A75-0231" BLOCK_SIZE="512" TYPE="exfat" PARTUUID="7dbbfc62-4f82-47cf-a6d3-f511a5db24fa"

I also did try theses commands, but i’m not sure what they have done :

sudo mkdir /hdds
sudo mkdir /hdds/First_drive_name (you pick the name )
sudo mkdir /hdds/Second_drive_name (pick this name too)
sudo chmod -R 755 /hdds

Thanks a lot !

For these two command examples, you did change the name? :sunglasses:

Since the blkid command showed us the names you gave them in Windows, let’s use those names for now.

sudo mkdir /hdds/Mov /hdds/external1
sudo chmod 755 /hdds
ls -la /hdds

Now for the fun part. :joy:

  1. make certain all the software is installed
sudo apt -y install exfat-fuse exfatprogs
  1. Let’s do a test mount of your ‘external1’ and ‘mov’ disks
  2. Mount ‘external1’
sudo mount -u f7e37122-786a-41e7-a017-a82336fd5d14 /hdds/external1
  1. Mount ‘Mov’
sudo mount -u 0A75-0231 /hdds/Mov

If there were no errors then the drives are mounted and accessible to PMS.

You should be able to browse for them in the file manager as well as from within Plex.

Be advised, this is stuff you need to learn. we’re here to help with Plex on Linux but not equipped to teach Linux.

1 Like

It’s woooorkiiiiing !! THANK YOU ! Seriously, i thank you very very much !!! You are a lifesaver !

It worked on the first time with one of my drive (mov) but not with the other one. I think that was because of the name, so i decided to format it again, which changed it’s UUID, but by following your instruction, now it work !

I did try after that to reboot my computer, and the two drives did mount automatically, but not to hdds, but the media/username/diskname. Is there a way to make that automatic ?

Also, i did modify today the repo (delete the # in the
/etc/apt/sources.list.d/plexmediaserver.list file) and when i do sudo apt-get update , i do see it checking for plex, but when i go in the graphic interface for the updates, i don’t see in “Others software” plex, is that normal ? I just want to make sure i did it right.

Thanks again for your help and your time, i really really really appreciate it !

There will be another step ! :rofl:
(there always is with Linux) hahahahaha

Going on what you have created, we now need to ADD the information so Linux automatically mounts the HDDs the next time you reboot it.

Homework: :smiling_imp:

  1. google /etc/fstab to see how linux identifies disks / partitions to mount
    (This is how we make things mount where we want them every time)
  2. Looking at the information you already used to mount the disks,
  3. See if you an craft an entry for /etc/fstab

DO NOT modify /etc/fstab yet. Let’s check your work.
(If /etc/fstab has errors, booting Linux stops and requires manual fixing before it will boot)

1 Like

The fun fact is that i choose Ubuntu at the beginning because i tough that it was easy to have a Plex server on that :smiling_face_with_tear:

Here is what i got for my homework :wink:

#For /dev/sdb1
UUID=f70543af-58fa-4e1a-a622-b079a1df9715 /hdds/external1 auto auto 0 2
#For /dev/sdc2
UUID=0A75-0231 /hdds/external2 auto auto 0 2

Is that ok ? For the options, i hesitated between auto and defaults. There seems to be a lot of other options too.

Thanks again ! :slight_smile:

put ONE of them , your choice, in /etc/fstab.

Save /etc/fstab

now comes the testing part.

Unmount both

sudo bash
umount /hdds/external1 /hdds/external2

For whichever one you added to /etc/fstab, attempt to mount it by its directory name.

e.g sudo mount /hdds/external1 (or external2)

If it mounts OK, then it’s working … Add the other and TEST that one too.

Fix any typos BEFORE you reboot

1 Like

It did work for my first external drive, but i got that message when using the command sudo mount /hdds/external1 :

mount: (hint) your fstab has been modified, but systemd still uses
       the old version; use 'systemctl daemon-reload' to reload.

I was unable to unmount the external 2 drive, i receive a message saying “the target is active”, but i don’t see how… I’m gonna reboot my computer and try it again.

Do what it says! :slight_smile:

sudo systemctl daemon-reload

(Linux is smart at keeping track of changes)

but a reboot fixes it too LOL

1 Like

It woooorks ! :partying_face: :partying_face:

If i could, i would buy you a beer man ! Seriously, i’m incredibly grateful for your help, i would have abandon this without you !

Thanks again for everything !! :smiley:

@Peter_Griffin

How’s it working out for you?

Is it making sense yet?

Hi @ChuckPa !

Sorry for the delay, i had quite a few things to do to make it kinda work… Long story short, i was unable to transfer my tv shows (900gb) from Ubuntu to my external hard drive in ext4… After a few hours, the speed was 2mb/s and was still going down… So i decided to format (again) the drive, this time in exfat and try to make the transfer on Windows… That still took at least 36 hours, close to 48…

After that, i try to do the step before to gave back to my user the admin access to both external hard drive aaaand that didnt work… I try everything i could think of, but the two mounted drives still indicated that ‘root’ have access, even if other folders in the hdss folder do now give access to my username… I did try ‘sudo chmod -R 755 /hdss’ but no success. At first that worked, but after one reboot, nop…

So right now, it’s the root that have access to the two mounted drives. That still work with Plex weirdly, i try it on my TV and that was awesome, but to add anything to the drives, i have to shutdown my computer to plug them on another one…

Do you have an idea of what i did wrong ? If in the future i have to add or replace a drive, what should i do ?

Thanks again for your help, that would have never worked otherwise ! :stuck_out_tongue:

If it worked until you rebooted – Did you get the entry in /etc/fstab right?

I think so, here is what i wrote in ftsab :

UUID=F6BB-7853 /hdds/external1 auto auto 0 2
UUID=0A75-0231 /hdds/external2 auto auto 0 2

I can see my two external drives mounted and accessible to Plex, but i just can’t delete or add anything in them. When i check with ls -l /hdds, i can see external 1 and 2 with ‘root - root’ in the access and not my username.

Thanks !

Who owns (owner/group) your media directories and what are the permissions?

@Peter_Griffin

I think you’ll need to add a few options to the mount commands in /etc/fstab

UUID=F6BB-7853 /hdds/external1 auto auto 0 2
UUID=0A75-0231 /hdds/external2 auto auto 0 2

The first ‘auto’ tells it automatic filesystem
The second ‘auto’ tells it to mount at boot time.

I think the problem is that it should be:

UUID=F6BB-7853 /hdds/external1 auto defaults,rw,auto,nofail 0 2
UUID=0A75-0231 /hdds/external2 auto defaults,rw,auto,nofail 0 2

This uses ‘autofs’ determination (I think you have exfat so we can address that next)

The second clause sets up default mount options adding RW, auto mount at root, but won’t fail if something goes wrong. (the drive will simply fail to mount)

You can edit the file and reboot
-or-
edit the file, save it, then

sudo umount /hdds/external1
sudo mount /hdds/external1

and check it for RW

If all is good, repeat for /hdds/external2

If there are no errors, you’re good to go.

Hello all !

I just try the modifications on the ftsab files and that didn’t change anything unfortunately. I still don’t have any permissions other than read in the folders. When i go check the folders, they have a red lock on them. I can open them and watch videos, but can’t do anything else.

Here is what i get when i do a ls -la for the directory of the two mounted drives :

drwxr-xr-x  5 root    root    (...) external1
drwxr-xr-x  5 root    root    (...) external2

Thanks a lot ! :slight_smile:

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