Need help moving /var/lib/plexmediaserver on KVM guest to host Samba share

Server Version#:1.18.5.2309
Player Version#:

I’m in the process of setting up a new server. Running Ubuntu server 18.04 on a SSD and using KVM for a VM that Plex is running inside of. The guest VM is also Ubuntu server 18.04. All media files are on the host machine in data pools that are located on spinning hard drives. These are being shared with Samba and mounted on the VM in fstab. And it all seem to work great. The problem is /var/lib/plexmediaserver likes to get big, and I need to move it off of the VM. What would be the best way to do this? I have tried moving it to a Samba share, but things stop working correctly then. I used these instructions https://forums.plex.tv/t/moving-pms-library/197342 I know it is recommended not to move to a network drive, but I’m not sure what other options there are.

Create a new virtual disk image on the host large enough to hold your metadata (and room for growth) and attach it to your VM. Mount that new disk in your guest, and then use the directions in the forum post you linked to move your PMS data directory there.

This assumes you have enough disk space on the host to accommodate the growth, of course.

1 Like

To be clear, network mounts of the metadata directory ARE NOT SUPPORTED.

Neither NFS nor CIFS support file locking over the network.

As suggested above, create another VHD, perhaps on the host’s /home and then use a systemd override to move it to this new /home partition.

Remember, all must be within the confines of the host.

There is only one exception to this rule. iSCSI block devices across the LAN do support file locking because of how they connect to the kernel.

1 Like

Thank you. That worked perfectly. I don’t know why I didn’t think of that.

1 Like

No problem, glad it worked.

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