"Orphan VDIs" and "VDIs attached to Control Domain" Safe to delete all?
-
You should be fine deleting orphan VDIs. This isn't the case with VDIs attached to Control Domain, which likely belong to an active VM.
-
@danp Why do them show up there?
/John
-
@danp Everyone have this snapshot "camera" to the right of there name.
-
@jweez So you have 115 snapshots attached to the control domain?! That isn't normal behavior. If this were my host, I would be investigating why this is occurring.
What version of CH / XCP-ng are you running? Is it fully patched?
-
Just to give context, VDI attach to the domain are backup related. During backup process the VDI need to be downloaded by XOA so it is attached to dom0 and downloaded from there. Normally this VDI should be detached after the backup is finished but if you have backup error the VDI could stay stuck attached to dom0.
So in your case if you have backup Running be careful with this VDI but if they are old VDI you can safely remove them.
-
I know this is an old topic but i have a quick followup question... in regards to "You should be fine deleting orphan VDIs."
don't VID's show up as "orphan"'ed during a cross pool migration? if that's the case a person should make sure no migration or backup tasks are running before deleting. correct?
-
During a backup or storage migration, you should be careful yes.
-
@jweez Something similar to this might be useful. I would think it would work on XCP-ng, as well. https://raw.githubusercontent.com/deepix/shell-fu/master/orphan_vdi.bash
-
so here is where i'm going with this and why this "Orphan VDIs" section scares the pee out of me.
so as far as i am aware there are three situations where a VDI should show up on this "Orphan VDIs" list when its not actually Orphaned.
- during a cross pool migration (maybe normal disk migrations?)
- during some types of backups
- fast cloning a VM
- maybe more?
so lets just say someone thinks they are being "helpful" and wants to clean up what they think is a mess in this "Orphan VDIs" section.. and just deletes everything in it.... and now people are going to have a bad day if any of the above situations were listed...
please feel free to correct me if I am wrong here.
and if i'm not wrong, can there be some checks put in XOA to NOT allow deletion of "Orphan VDIs" that are not actually orphaned?
-
Nothing like that could happen. If your orphaned VDI is in use, it will error out with "VDI in use".