How to delete images from FOG
-
I started this to have some references for future use. I was not aware of the process on how to delete images and I intuitively used the FOG delete options on the image list view. This did not delete the image data file so I reached out and posted on the forum for a dashboard issue but included the storage issue along with it and by asking for one I got help for both (Thanks to FOG community and to @Sebastian-Roth)
So @Sebastian-Roth provided the steps below:
Steps for Option 1:
How to quickly delete definitions but NOT data:
Web Interface -> Image Management -> List All Images -> Click the checkboxes to the left of the image definitions -> Click “Delete All Selected Images?” at bottom of page -> Click “Are you sure you wish to delete these items?” -> Authenticate to confirmSteps for Option 2:
How to delete a single image definition AND it’s data too:
Web Interface -> Image Management -> List All Images -> Click the name of the image you want to delete -> Click “Delete” tab at the top -> Check the box labeled “Delete file data” -> Click “Remove” -> Authenticate to confirmSteps if Option 1 was done but wanted Option 2:
If you want to delete image data after you deleted the image definition (but not the data) through the web interface you can manually delete the folder /images/IMAGENAME/ on your FOG server. Make sure you delete the correct folder as there is no backup of the image data if you purge the wrong one.Here is the question for this topic:
If I have replication on my images does Option 2 deletes them from the rest of the storage servers?
If I have replication on my images and I did Option 1 do I then have to manually delete the image folder from all the other storage servers?
Thanks for your help in advance.
-
@vemoya Good thinking to have this as a topic in the forums. I will also add a hint in the FOG web UI soon. This has been discussed in the forums but somehow never made it into the code.
As well we should add this to the documentation at some point - @JJ-Fullmer any ideas on where to put this?
-
@sebastian-roth So if I have an image that is replicated on the storage servers deleting the image from the fog master server by using “Option 2” (Clicking on the Image and then delete) should delete the image definition and data file on the rest of the storage servers?
If I have an image that is replicated and I used the delete option under the image list view (Option 1) will I then have to manually delete the image data file from each storage server it is on?
Thanks for your help.
-
@sebastian-roth I will probably put this in https://docs.fogproject.org/en/latest/management/image-management.html# in a new subsection for deleting images.
-
@JJ-Fullmer Just stumbled upon this again. Added a hint in the web UI (ref).
You might also add this to the documentation. Although when I looked into adding the hint to working-1.6 as well I saw that with the new web UI you actually have a checkbox for file deletion on deletemulti as well as single delete. So it’s only for FOG 1.5.x.