Question RE: Consequences of HD Failure/Replacement

OK… I’ve tried to research this, but either I’ve missed the info completely, or if available, it’s scattered and hard to pull all of it together.

Here’s a situation that I’d like to lay out and would like to know the consequences, if any, and if so, how to best prepare.

For starters, let’s use a simple 2-3 multi-disc setup, and our shared content has been heavily personalized (both from a personal aesthetic perspective and to work around server limitations [I’m talking to you LACK OF CROSSOVER setup]).

Let’s assume that one of those HD crashes completely and has to be replaced. A new replacement HD is found, named the same as the original, and the contents replaced exactly as before… in other words a clone of the original.

My question is this… what are the consequences of inserting this replacement drive into the working setup? What I mean by that is will I loose any personalization of the content because of the server doing an update on the libraries (and removing the lost content while the drive is down)? If so, are there settings, or combination thereof, that will allow me to not lose the personalization of the content on the replacement drive?

You might want to create a backup copy of your databases folder before doing anything.
Do this while Plex server is stopped/ended/closed, or the copy will contain a damaged database file!

Theoretically none whatsoever.
Ensure that even the replaced volume’s name is the same as before.

To be extra certain, do this in preparation:

  • disable automatic library scans
  • disable periodic library scans
  • disable “Update all libraries during maintenance” in the Scheduled Tasks
  • Most important: disable “Empty trash automatically after every scan”

Now open the plex media info of an item that was located on the lost hard drive. Note down the exact folder path that appears there as its storage location.
After replacing the hard drive, open the preplay page of the same item again, and call up the plex media info again.
See if the file name has been marked as missing, or whether the file path now appears twice. If the answer is No, try playing the item.
If it works normally, try the same with a few others, just to be sure.
If that is all working, you should be safe to set all the above option back to how they were before.

What you have described is what to do when you move servers, which I have very successfully done before.

Losing and replacing a HD in this working ecosystem isn’t the same. From my understanding, as soon as the drive goes down, Plex will remove the content on its next update/scan.

You stated IF IT and IF THAT a few times. I don’t mean to sound unappreciative, but as an engineer and programmer, I can’t go by “IF”'s or “MAYBE”'s. I’m looking for a definitive solution for preparation on when the time comes when these drives fail, as they won’t last forever.

Only if you have “Empty trash automatically after every scan” activated.
If you had this indeed activated, then you must first restore a database backup from before the HDD went down. https://support.plex.tv/articles/202485658-restore-a-database-backed-up-via-scheduled-tasks/

Then proceed with the above steps.

First off, let me say that I appreciate your help and responses to this…

Let me see if I get this correct (this is the engineer in me speaking)…

I have my 3 disc ecosystem working, and the option “EMPTY TRASH AUTOMATICALLY AFTER EVERY SCAN” is deactivated. It’s humming along just fine when I go to bed.

When I wake up, one of the HD fails. After a bit, I’m able to reinsert a replacement clone.

Upon doing so, Plex will pick back up where it left off and all personalization will be maintained, and I can continue as if nothing happened.

Am I understanding this correctly?

I’ll have a couple of followup questions….

Yes. Unless you or some 3rd-party tool is triggering an “Empty Trash” in Plex, that is.

OK…. now here are some followup questions:

What about the options to OPTIMIZE DATABASE EVERY WEEK, or REMOVE BUNDLES EVERY WEEK?

Won’t they (maybe in combo) remove my personalization on their own if I’m unable to get a replacement clone before they kick off?

No. They are irrelevant, unless you empty the library trash.

OK… now let’s keep going with the EMPTY TRASH as deactivated. Won’t that bloat the database over time? (Content may be moved… content may be removed…)

If so, how is that taken care of? (Wouldn’t OPTIMIZE DATABASE EVERY WEEK not handle that?)

Why would it bloat the DB? Nothing is changing.

Why would it bloat the DB? Nothing is changing.

If you remove content, by definition, the db will become bloated as it will contain info not necessary. If you move content, it will need new pointers to where the content is located, and if it does not remove the old pointers, the db will become bloated with non-needed info.

You are not moving content, you are not removing content during this operation.

You are not moving content, you are not removing content during this operation.

I can REMOVE content from drives, and I can MOVE content between drives. I’ve accomplished both.

Then don’t for the duration of this procedure.

You’re missing the point… over time, moving and removing content will in fact bloat said database. Otherwise, you wouldn’t need an “EMPTY TRASH” feature.

You have not grasped what Empty trash in Plex is doing. It is not relevant for the procedure that you are planning.

Shut down Plex server as a whole.
Copy the content from the old to the new drive.
Remove the old drive.
Rename the volume of the new drive so that it looks just like the old volume.
Done.

You’re NOT listening to my question…

I’m specifically asked the following:

Won’t that (not using EMPTY TRASH) bloat the database over time? (Content may be moved… content may be removed…)

If so, how is that taken care of? (Wouldn’t OPTIMIZE DATABASE EVERY WEEK not handle that?)

It won’t.
We are only deactivating it for the time of the hard drive change. After you ghave verified that the move was successful, you can again work as you were before, including emptying trash as often as you like.

You are confusing and merging two different concepts and actions. I’d appreciate if you wouldn’t overreach on your answers and focus SOLELY on what I asked.

And as a DBA myself, YES IT WILL bloat the database over time if it does not get rid of unused data.

Disable “Empty trash…” and continue to use your server as you would normally.

Whenever you intentionally perform a bunch of moves/adds/deletions/changes in general, after you’re satisfied then manually empty the trash for the library in question (a database optimization and bundle cleansing are generally a good idea at this time, too).

In the event of a drive failure, you can perform your replacement, ensuring that everything ends up in the same paths, and Plex will not skip a beat. It should be as if the failure never occurred.

Bonus tip: Create a smart collection for each of your libraries which shows only “Trashed” items. Check them periodically to ensure nothing untoward has occurred.