# Moving PMS ‘Library’ Issue

**URL:** <https://forums.plex.tv/t/moving-pms-library-issue/437488>\
**Category:** Metadata & Adding Files\
**Tags:** server-linux, library-management\
**Created:** [July 25, 2019, 10:38am UTC](https://forums.plex.tv/t/moving-pms-library-issue/437488 "2019-07-25T10:38:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![maull01](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@maull01](https://forums.plex.tv/u/maull01)\
**Post date:** [July 25, 2019, 10:38am UTC](https://forums.plex.tv/t/moving-pms-library-issue/437488/1 "2019-07-25T10:38:47Z")

</div>

Server Version#: 1.16.0.1226  
Player Version#: NA

Hello All,

First off, thanks for taking a look at this.  
**Setup** - OS SSD 250GB - 4x Internal media drives, Ubuntu 16.04

**Root Issue** - /var/lib/plexmediaserver is taking a large amount of space, filling up my SSD (Currently 128 GB)

Want to move it off to one of my 10TB Discs.  
**Attempted Solution 1**  
Followed this guide - [Moving PMS 'Library'](https://forums.plex.tv/t/moving-pms-library/197342)

Prior to removal of old Library, I started up, looks fine, shutdown, in /var/lib `sudo mv Library/ Library.OLD/`, startup, no server found.

My `sudo systemctl edit plexmediaserver` below

```auto
# Customize Plex's config
#[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/HDD/4/PLEX_MEDIA_FILES"
#
# These values are only needed if you wish to change user & group
#User=plex
#Group=plex
#
# This is needed to change the default umask
Umask=0002 # this must be 4 digits of octal

```

Tried Umask and UMask

Will only work if old Library is in place.

Permissions for /HDD/4/PLEX\_MEDIA\_FILES/Library/Application Support/  
drwxrwxrwx 6 root root 4.0K Jun 10 19:48 HDD/  
drwxrwxrwx 7 root root 4.0K Jul 25 11:20 4/  
drwxrwxrwx 3 plex plex 4.0K Jul 25 08:28 PLEX\_MEDIA\_FILES/  
drwxr-xr-x 3 plex plex 4.0K Jul 25 11:09 Library/  
drwxr-xr-x 3 plex plex 4.0K Jan 1 2018 Application Support/

**Attempted Solution 2**

/etc/default/plexmediaserver

```auto

# uncomment to set it to something else
# export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${HOME}/Library/Application Support"
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/HDD/4/PLEX_MEDIA_FILES/Library/Application Support"

```

Plex stop start, Works fine.  
In /var/lib `sudo mv Library/ Library.OLD/`, startup, no server found.

**Notes**  
On startup of both attempted solutions, where Library/ has been renamed Library.OLD/ it created a new Library/ folder in /var/lib.  
To fix and keep running I am just do the below, Stop start, and I am back up and running, but its still on the SSD

```auto
sudo rm -rf Library/
mv Library.OLD/ Library/

```

For some reason Plex will not accept a new location for the Library files. I have pasted my Permissions above and they all seem fine.

Can anyone offer any suggestions?

---

<div class="post-metadata">

**Author:** ![maull01](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@maull01](https://forums.plex.tv/u/maull01)\
**Post date:** [July 25, 2019, 1:31pm UTC](https://forums.plex.tv/t/moving-pms-library-issue/437488/2 "2019-07-25T13:31:46Z")

</div>

Well, Im not sure it was the right thing to do, but I took a backup of and then edited `/lib/systemd/system/plexmediaserver.service`

```auto

#Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support"
# MANUAL OVERRIDE
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/HDD/4/PLEX_MEDIA_FILES/Library/Application Support"

```

Stop Plex  
mv Library/ Library.OLD/  
Start Plex

Works. New data getting written to new location for the first time.  
I understand that I may lose this @ server update so if anyone knows what the issue is with overwriting I would appreciate it.

The Override file  
/etc/systemd/system/plexmediaserver.service.d/override.conf

```auto
#
# Customize Plex's config
#[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/HDD/4/PLEX_MEDIA_FILES"
#
# These values are only needed if you wish to change user & group
#User=plex
#Group=plex
#
# This is needed to change the default umask
Umask=0002 # this must be 4 digits of octal

```

---

<div class="post-metadata">

**Author:** ![maull01](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@maull01](https://forums.plex.tv/u/maull01)\
**Post date:** [July 25, 2019, 1:44pm UTC](https://forums.plex.tv/t/moving-pms-library-issue/437488/3 "2019-07-25T13:44:50Z")

</div>

Again, Sorry for the reply to myself, but I found my issue.

The Environment override file was  
`Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/HDD/4/PLEX_MEDIA_FILES"`  
where it should have been  
`Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/HDD/4/PLEX_MEDIA_FILES/Library/Application Support"`

This can be closed or deleted by an admin as I cant imagine it helping anyone in the future, just me overlooking something in the guide.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [October 23, 2019, 1:44pm UTC](https://forums.plex.tv/t/moving-pms-library-issue/437488/4 "2019-10-23T13:44:51Z")

</div>

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