joshpughSG
Contributor
Contributor

Housecleaning Appvolumes DB

Jump to solution

Hi All,

We have 2 appvolume managers in service managing 178 appstacks. I'm often finding query times from the manager front end to take some time. Is there any specific DB clean up queries or suggestions on how we can optimize this?

In addition we have 5284 writables I would like to remove all writables that haven't been mounted for a significant period of time rather than sorting and going through pages in the web front end is there a script able to complete this task?

Thanks in advance

Josh

1 Solution

Accepted Solutions
da2125
Enthusiast
Enthusiast

I created a re-occuring DB job based on VMware Knowledge Base but we cut the days down to 45

View solution in original post

0 Kudos
5 Replies
Ray_handels
Virtuoso
Virtuoso

I would not suggest doing stuff on the database yourself. There are maintenance jobs that run from time to time on the Appvolumes environment itself.

In regards to the writable you cannot simply remove it from the db because it won't remove the file itself.

There is an API that you can use to remove those in larger volumes. But why not select Mount View in the writables tab in the manager and remove all writables that have mounted 0?

0 Kudos
da2125
Enthusiast
Enthusiast

I created a re-occuring DB job based on VMware Knowledge Base but we cut the days down to 45

0 Kudos
joshpughSG
Contributor
Contributor

Hi Ray yes I am aware you cannot remove the VMDK via a SQL DB but rather i'm trying to automate by appvolumes API communicating with VC API to clear writables if say the particular volume hasn't been mounted in 45 days.

As for the SQL maintenance I will try the suggestion below. Thanks for the help though Smiley Happy

0 Kudos
joshpughSG
Contributor
Contributor

This sounds like something that could be useful to us! Thank you for bringing to my attention I will look into this! Smiley Happy

0 Kudos
danielkrause
Enthusiast
Enthusiast

#Delete Stuck Jobs for example

DELETE FROM delayed_jobs WHERE created_at < '2020-01-01'