cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1215
Views
5
Helpful
10
Replies

automatic removal of shadow directory files

mgottfried
Level 1
Level 1

I am currently running LMS 2.5.1 with plans to migrate to 2.6 soon. I have been having problems related to the fact the deleting a device in the database doesn't remove the corresponding configuration file in the shadow directory. I'm hoping that happens automatically in 2.6. Does that happen? If not, is there some way I can make it happen?

10 Replies 10

Joe Clarke
Cisco Employee
Cisco Employee

Yes and no. Shadow entries are not immediately purged when a device is deleted. However, every time ConfigMgmtServer is restarted, stale entries will be cleaned up. This should be happening even in LMS 2.5.1.

Does that mean that the shadow directory files for any device that has been removed from the database will be removed as part of the clean up?

Yes. If you pdterm then pdexec ConfigMgmtServer, any device that is no longer managed by RME will have its shadow directory entries deleted from the file system.

Thanks that is good news. I have one more question though. That sounds like commands run in a command window. Correct? Can those be scheduled to happen periodically so you regularly get a clean shadow directory?

The commands can be scheduled, but this is not something you really want to run that often. Restarting the ConfigMgmtServer will interrupt any config polling or collection operations (basically anything having to do with config archive). If you're sure the server is otherwise idle, you can periodically restart ConfigMgmtServer using cron or at.

We did a test before trying to run anything in cron or as an at job. Unfortunately, it didn't work. The devices that were removed still have config files in the shadow directory. Do you have any suggestions on what might be wrong or what we can do to make this work?

What version of RME do you have? It definitely works in RME 4.0.5, but I have not tested the previous versions. The code is there, but there may be bugs.

The RME version is 4.0.5. What do you think could be going wrong?

I just learned that the servers in question are running RME 4.0.4. Mine is different. So, is there something else we might need to do on servers running 4.0.4?

I've reviewed the code, and there was a bug prior to LMS 2.6 (i.e. RME 4.0.5) that prevented this from working. You will need to upgrade to get working shadow directory cleaning.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: