The most recent versions of the Plex Media Server has the option to auto index, depending on your library size, this can take up a lot of space, and in some instances you may need to have this saved in a different location. You may also have a very large media collection, and the metadata could be very large in size too. Well, I recently had this issue and between metadata and index data I had almost 55GB of a 64GB Solid State Drive used just for Plex metadata and index data! Here’s how I moved all of that data to a new location and did it without making any changes to the configuration…

Update 3/3/2014: Check the comments below for additional methods to change the directory, but the easiest will be modifying the /etc/default/plexmediaserver file and specifying the location.

Just to note, my current setup is using OMV (Open Media Vault) that runs Debian, but this should be the same for almost any version of linux, including Ubuntu, etc. The very simple approach I took to make this change was by using a symlink, and a few other small changes.

Stop Plex

First thing you will need to do is to stop Plex Media Server

sudo service plexmediaserver stop

Make sure all Plex services are killed

Next run this command to make sure all Plex services are killed and no longer running

killall -u plex

Copy Metadata and Index Data to new location

Now copy all of the current meta and index data to the new location, this may take a while depending on the size. This is assuming that Plex data is stored at “/var/lib/plexmediaserver/Library/Application Support” which is the default for Debian based Plex Media Server installs. This command below should copy the Application Support directory to the /new/dir/to/plex, ultimately making it “/new/dir/to/plex/Application Support”

cp -rf '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server' '/data/DataCenter/Plex Media Server'

Move old directory to .OLD in case of issues

Now we will move the old directory to .OLD in case we need to restore it if there are any issues

sudo mv '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server' '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server.OLD'

Create symbolic link to new directory

Next we will create a symbolic link to the new location for our meta and index data

sudo ln -s '/data/DataCenter/Plex Media Server' '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server'

Change owner of new location to Plex

We now have to update the permissions and change the owner to Plex otherwise there will be issues

sudo chown -R plex.plex '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server'
sudo chown -R plex.plex '/data/DataCenter/Plex Media Server' 

Start Plex Media Server

Next we will start Plex Media Server to make sure everything worked correctly. After issuing the command below, login to Plex via http://ipofserver:32400/manage and make sure everything is still the same and working correctly.

sudo service plexmediaserver start

Remove old Meta and Index Data files

As long as everything works correctly, you can now remove the old directory we renamed in case of any issues.

sudo rm -rf '/var/lib/plexmediaserver/Library/Application Support.OLD'

Voila, you have now moved your Meta and Index data to a new location