> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pmo/solution/image-getting-deleted-when-copied-into-the-glance-repository-dir.md).

# Image getting deleted when copied into the glance repository directory

## Problem

When a user deletes any image from the GUI or uses the "OpenStack image delete" command and then copies the same image into the repository directory. It automatically gets deleted and not allowed to copy it again.

## Environment

* Platform9 Managed OpenStack - v4.0 and Higher

Happens mostly with images with higher size.

## Cause

When image delete call is made either from GUI or OpenStack command line, the image is first removed from glance and then from the actual hosts. This process takes time to get deleted it from the filesystem. At the same time if copy attempt is made to the repository directory (/var/opt/pf9/imagelibrary/data) , process will think it needs to be deleted and automatically delete it.

## Resolution

Before attempting to copy image again, you should wait for at least the time interval mentioned in the "/etc/pf9/imagelibrary/imagelibrary.conf" on the node which configured to store images. On safer side please wait for thrice of interval time.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://platform9.com/kb/pmo/solution/image-getting-deleted-when-copied-into-the-glance-repository-dir.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
