Will "Stopping of Array" give enough time to run a script before shutdown?


Wavey

Recommended Posts

Question:

So want to write a script that runs at the stopping of Array that copies a file I keep in the /tmp folder over to cache then move it back at start of the array. I am just moving a folder with 3-4gb database+blob from tmp to cache then back at the stopping and starting of the array for a docker and want to know if it would give me enough time to do that.

 

 

Why:

I'm doing this because I'm testing putting my plex database in /tmp to run it on ram. The problem is I don't want to lose it at shutdown so I figured I'd run a copy script that moved it at array shutdown and then moved it back at start up and put a delay on my plex docker starting.

 

This is a testing situation because I am getting busy db errors. Before we dive into this and people tell me how to fix that, trust me I've tried, trust me. Its currently running on an NVME, still busy, ran multiple optimize, dumps etc...nothing works and apparently its the fact that the DB is so big (2.2GB) and sqlite3 isn't the best for it. It's been years of me trying to stop it and I ran across a few people who dropped it into ram and it solved their problem so I'm trying to do the same.

 

I'm also aware that if its a dirty shutdown I'll lose it but its backed up every 3 days so I wouldn't lose much.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.