Cannot remove unwanted music library path

I recently added storage to the Ubuntu server running PMS so that I could move my music library to it from an old NAS. Previously the music library path in PMS pointed to the NAS.

The intent is to retain the NAS directory containing the music library as the backup, i.e. the server hosting PMS host the music library, backing up to the NAS.

I added the new path on the server to the music library folder list, and waited for the scan to complete.

I then attempted to remove the folder path string pointing to the NAS. This is proving impossible - there is a delay of a minute or so when I attempt the deletion followed by the message

The changes could not be saved

Any ideas how to remove invalid or unwanted library paths successfully?

Thanks

have you looked at the server logs to see if there is any error or malformed Db after attempting to delete the path. have you tried optimizing the database?

The database has been optimized.
I’ve gone through each of the logs- There’s nothing that seems of concern.

What happens if I remove the NAS mount point and have an empty directory? Will Plex clean house?

Update - PMS now seems to have started a major rescan of the music library. Looking at the indicator it will be awhile. I’ll let it go and will pick up this thread when the scanning is done.

There are a couple of “Error” messages in the PMS log stating that the database is locked. I assume that’s the issue.
ATM PMS continues to generate “Loudness Data”, so I suppose that’s what’s locking the database.

I shall wait… :face_with_raised_eyebrow:

Scanning activity has ceased & tried to delete the path again. same error “Your changes could not be saved”

  • I optimised the database

  • Restarted PMS

  • Tried the path deletion again >> “Your changes could not be saved”

Checked the log; no errors, no database is locked message either.

UPDATE: I carried out an integrity check using the advice on this page. No problems were reported.

Is there anything else I can try short of a clean PMS re-install?

The integrity check doesn’t always detect certain types of corruption.

Did you try a repair?

Do any of the database backups you have predate this problem?

ChuckPa does have a semi-automated tool to repair corruption on Linux systems that seems to do a better job that repairing things manually

Personally, I would tag Chuck and have him take a look at your logs before you nuke your server and start over

I worked it out, I think;

I noticed there were deletions of records in the database going on. It seemed to be records relating to audio files in in mount point directory that I was trying to remove from PMS. This would mean that my attempt to delete the path from the library was accepted, a purge of records commenced, but the save was reported as an error.

Kept an eye on the log. It finished about an hour ago. The library path was gone.

Solved, I suppose.