Moved application support directory to nas

Attempting to move the configuration files from by Ubunutu 22.04 install of Plex to a network share on my Qnap. I have the files moved. Plex is showing the media library but all the settings for the server show as “server settings are unavailable”. Hoping some kind soul can help me find the missing piece of the puzzle.

I followed the first post from this guide.

I’ve mounted a cifs share on my fstab as the following:

//192.168.86.2/Media /mnt/qnap cifs vers=3.0,credentials=/root/.examplecredentials,dir_mode=0777,file_mode=0777

192.168.86.2 is my qnap server. My credentials are stored in the .examplecredentials file. The stored credentials are my administrator credentials to the Qnap share. I saw the guide mentioned needed an exec on fstab but I didn’t see a means to add this argument. I assume giving all users on the Ubuntu system full access to that directory would work. I also use this path to mount the libraries. I can see the folder and files when selecting the library media.

I moved and updated the override.conf file as the following:

### Editing /etc/systemd/system/plexmediaserver.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file

#
# Customize Plex's config
[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/mnt/qnap/AppStorage/Plex/Application Support"
#
#  These values are only needed if you wish to change user & group
User=monkey
Group=monkey
#
# This is needed to change the default umask
UMask=0000    # this must be 4 digits of octal

The user\group monkey is my credentials on the Ubuntu box. I only changed it to this when the default didn’t see to work.

Appreciate any help suggestions or advise. I considered using docker to set all this up but it seemed like it was just adding another layer. Planning to add sonarr, radarr, and jacket once I solve this mystery.

Server Version#: 1.27.0.5897-3940636f2
Player Version#:4.76.1

Plex Media Server.log (286.7 KB)

Plex Media Server will run on the Ubuntu system and have the Plex Data Folder on the QNAP?

Not recommended:

That was the warning I should have seen.

Ok, I’ll go another route. Thank you for the quick responce!

@Alez_G

What are you ultimately trying to accomplish?

My goal was to have the configuration files live on the qnap. My Ubuntu server ran out of space before Plex finished indexing my libraries. I suppose a 500gb SSD wasn’t enough space.

I have another 3 bays on the Ubuntu box. I’ll install a trio of 1tb disk, I believe ubuntu supports a software raid 5. That should give me 2tb of space for plex and the other apps.

I could then set up rsync to backup that raid5 to my Qnap.

Unless you all have a better suggestion. :slight_smile:

@Alez_G

A 500GB usually is enough

How Ubuntu partitions the SSD is usually the problem. (/var is part of / which is very small by default)

How much space do you have in /home ? (That’s where I put mine)

I do the following:

sudo bash
mkdir /home/plexdata
chown plex:plex /home/plexdata
systemctl stop plexmediaserver
cd /var/lib/plexmediaserver
tar cf - . | (cd /home/plexdata ; tar xf -)

Now I create the override.conf file in /etc/systemd/system/plexmediaserver.service.d/override.conf

In it, I place:

[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/plexdata/Library/Application Support"
systemctl daemon-reload
systemctl start plexmediaserver

yes, it does. you’ll install mdadm.

If you want RAID 5, on 3 devices (all 3 drives are the same size)

Change drive letters as appropriate

mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd

A general guide is here. There are others. (YES, this is dated lol)

@ChuckPa I followed your advise and moved my config files to the /home as recommended.

I’ll note that I ran into some issues running the commands as one lump copy\paste. I decided to start with a fresh install of plex as the config files weren’t important, but it probably would have been fine to move the files from the NAS location back to /home .

A straight copy\past probably wasn’t what you intended but I wanted to point that out to anyone else who might try. I ran the following:

sudo mkdir /home/plexdata
sudo chown plex:plex /home/plexdata
sudo systemctl stop plexmediaserver
cd /var/lib/plexmediaserver
tar cf - . | (cd /home/plexdata ; tar xf -)
systemctl daemon-reload
systemctl start plexmediaserver

Thanks for the heads up on the RAID setup! Have a great day.

OOOPS.

I see what happened.

This is what I wrote… you got the interim version some how.

sudo bash
mkdir /home/plexdata
chown plex:plex /home/plexdata
systemctl stop plexmediaserver
cd /var/lib/plexmediaserver
tar cf - . | (cd /home/plexdata ; tar xf -)

you need root for both the tar create and tar extract sides of that pipe.

you could also have done it :

sudo tar cf - . | (cd /home/plexdata ; sudo tar xf -)

Thanks @ChuckPa

Not really an on topic question but I wanted to make sure I expanded my partition correctly.

I ran lsblk and got this:

	NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
	loop0                       7:0    0  61.9M  1 loop /snap/core20/1405
	loop1                       7:1    0  61.9M  1 loop /snap/core20/1518
	loop2                       7:2    0  79.9M  1 loop /snap/lxd/22923
	loop3                       7:3    0  44.7M  1 loop /snap/snapd/15534
	loop4                       7:4    0    47M  1 loop /snap/snapd/16010
	sda                         8:0    0 476.9G  0 disk
	├─sda1                      8:1    0     1G  0 part /boot/efi
	├─sda2                      8:2    0     2G  0 part /boot
	└─sda3                      8:3    0 473.9G  0 part
	  └─ubuntu--vg-ubuntu--lv 253:0    0   100G  0 lvm  /
	sdb                         8:16   1     0B  0 disk
	sdc                         8:32   1     0B  0 disk
	sdd                         8:48   1     0B  0 disk
sde                         8:64   1     0B  0 disk

I then ran sudo lvextend -rl +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

Which gave me the result of:

	NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
	loop0                       7:0    0  61.9M  1 loop /snap/core20/1405
	loop1                       7:1    0  61.9M  1 loop /snap/core20/1518
	loop2                       7:2    0  79.9M  1 loop /snap/lxd/22923
	loop3                       7:3    0  44.7M  1 loop /snap/snapd/15534
	loop4                       7:4    0    47M  1 loop /snap/snapd/16010
	sda                         8:0    0 476.9G  0 disk
	├─sda1                      8:1    0     1G  0 part /boot/efi
	├─sda2                      8:2    0     2G  0 part /boot
	└─sda3                      8:3    0 473.9G  0 part
	  └─ubuntu--vg-ubuntu--lv 253:0    0 473.9G  0 lvm  /
	sdb                         8:16   1     0B  0 disk
	sdc                         8:32   1     0B  0 disk
	sdd                         8:48   1     0B  0 disk
sde                         8:64   1     0B  0 disk

Did you remember to resize2fs (see man resize2fs for details)
to have the filesystem grow to take advantage of new newly expanded LVM it sits on?

I’m not seeing where the three new disks are part of the LV

try this:

lsblk -Mo NAME,STATE,TRAN,HCTL,MODEL,REV,SERIAL,TYPE,SIZE,FSTYPE,MOUNTPOINT,FSSIZE,FSAVAIL,FSUSED,FSUSE% | grep -v loop

I use this for my RAID volumes. The above gives me results like this (clearly shows the memberships)

[chuck@lizum Cache.2032]$ gog bin/get-devices
    NAME    STATE   TRAN   HCTL       MODEL                    REV SERIAL           TYPE     SIZE FSTYPE            MOUNTPOINT          FSSIZE FSAVAIL FSUSED FSUSE%
    sda     running sata   1:0:0:0    Samsung_SSD_870         1B6Q S61VNG0NC15881E  disk   232.9G                                                                   
    ├─sda1                                                                          part     512M vfat              /boot/efi             511M  505.8M   5.2M     1%
┌┈▶ └─sda2                                                                          part   232.4G linux_raid_member                                                 
┆   sdb     running sata   2:0:0:0    Samsung_SSD_870         1B6Q S61VNG0NC15919M  disk   232.9G                                                                   
┆   ├─sdb1                                                                          part     512M vfat                                                              
├┈▶ └─sdb2                                                                          part   232.4G linux_raid_member                                                 
┆   sdc     running sata   3:0:0:0    Samsung_SSD_870         1B6Q S61VNJ0NC30134E  disk   232.9G                                                                   
┆   ├─sdc1                                                                          part     512M vfat                                                              
├┈▶ └─sdc2                                                                          part   232.4G linux_raid_member                                                 
┆   sdd     running sata   4:0:0:0    Samsung_SSD_870         1B6Q S61VNJ0NC30142B  disk   232.9G                                                                   
┆   ├─sdd1                                                                          part     512M vfat                                                              
└┬▶ └─sdd2                                                                          part   232.4G linux_raid_member                                                 
 └┈┈md0                                                                             raid1  232.3G xfs               /                   232.1G  207.3G  24.8G    11%
┌┈▶ sde     running sas    0:0:0:0    Samsung_SSD_850         2B6Q 5002538d41dffd97 disk   465.8G linux_raid_member                                                 
├┈▶ sdf     running sas    0:0:1:0    Samsung_SSD_870         1B6Q 5002538f30c2930f disk   465.8G linux_raid_member                                                 
├┈▶ sdg     running sas    0:0:2:0    Samsung_SSD_870         1B6Q 5002538f30c29911 disk   465.8G linux_raid_member                                                 
└┬▶ sdh     running sas    0:0:3:0    Samsung_SSD_850         3B6Q 5002538d4229c9be disk   465.8G linux_raid_member                                                 
 └┈┈md1                                                                             raid10 931.3G xfs               /home               930.8G  908.2G  22.6G     2%

I haven’t added the new drives yet. Still have to order them. I’m guessing resize2fs would be a better way to expand the lvm. hoping lvextend will not break anything.

This is my output in that format:

  TYPE   SIZE FSTYPE      MOUNTPOINT        FSSIZE FSAVAIL FSUSED FSUSE%
sda                       running sas  4:0:0:0    Crucial_CT512MX1 MU01 14440DA11DC3 disk 476.9G
├─sda1                                                                               part     1G vfat        /boot/efi             1G      1G   5.2M     0%
├─sda2                                                                               part     2G ext4        /boot               1.9G    1.5G 244.2M    13%
└─sda3                                                                               part 473.9G LVM2_member
  └─ubuntu--vg-ubuntu--lv running                                                    lvm  473.9G ext4        /                 465.9G  433.4G  12.6G     3%
sdb                       running usb  0:0:0:0    USB SD Reader    1.00 9205291      disk     0B
sdc                       running usb  0:0:0:1    USB CF Reader    1.01 9205291      disk     0B
sdd                       running usb  0:0:0:2    USB SM Reader    1.02 9205291      disk     0B
sde                       running usb  0:0:0:3    USB MS Reader    1.03 9205291      disk     0B

The order is:

  1. Add the drives to the LV (logical volume)
  2. Expand the filesystem / which inhabits the LV with resize2fs.
1 Like

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