[Users] Moving Disks to anoter Domain -> Illegal
Maor Lipchuk
mlipchuk at redhat.com
Wed Nov 7 11:17:17 UTC 2012
Hi Jörn,
If disk was failed to move to a destination storage domain, because VDSM
failed to complete the task successfully , it can be fixed from the DB,
although it might be a bit complicated and risky.
In case no one of the disks are shareable, you need to update the disks
status back to OK, and change the storage domain of its images to the
source storage domain.
For each disk do the following:
1) # Get the disk_id that you want to recover (please make sure there is
only one disk id fetched, since disk_alias is not a unique field)
SELECT disk_id from images_storage_domain_view where disk_alias =
'Your_Disk_Name' and vm_names = 'Your_Vm_Name'
2) # Get the source storage domain that you moved the disk from
select id,storage_name from storage_domains where storage_name =
'Your_Source_Storage_Domain';
3) # Update the disk images (which are the image id and it's snapshots)
to the source storage domain:
UPDATE image_storage_domain_map set storage_domain_id = (see 2) where
image_id = (see 1);
or in one update sentence:
UPDATE image_storage_domain_map set storage_domain_id = (select id from
storage_domains where storage_name = 'Your_Source_Storage_Domain') WHERE
image_id in (SELECT image_guid from images_storage_domain_view where
disk_alias = 'Your_Disk_Name' and vm_names = 'Your_Vm_Name'));
4) # update the disk status from ILLEGAL to OK
SELECT imagestatus from images where image_guid = (SELECT image_guid
from images_storage_domain_view where disk_alias = 'Your_Disk_Name' and
vm_names = 'Your_Vm_Name');
# The result should be 4 (ILLEGAL)
UPDATE images set imagestatus = 1 where image_guid = (SELECT image_guid
from images_storage_domain_view where disk_alias = 'Your_Disk_Name' and
vm_names = 'Your_Vm_Name');
I would suggest to be very careful with those sql commands (Please use
select before each update, to prevent mistakes), you can also consider
recreate the servers from scratch as an alternative as you suggested.
Regards,
Maor
On 11/07/2012 11:29 AM, Joern Ott wrote:
> Hi all,
>
>
>
> yesterday I moved a couple of disks from one storage to another using
> the web interface. As both had the same size and there were around 300G
> free on the source, I did not expect to run into capacity problems.
> However, this morning, the partition on the destination server is
> completely full and all disks show up as “Illegal” on the new server.
> This may be due to the fact that I use thin provisioning.
>
>
>
> Apparently, oVirt continued to move disks even though the destination
> was already full and so I ended up with a lot of “Illegal disks”. Moving
> back isn’t possible, as the “Move” context menu is greyed out.
>
>
>
> Is there any way I can recover/repair this situation manually or should
> I consider those servers lost ad recreate them from scratch?
>
>
>
> KR
>
> Jörn
>
>
>
> *Jörn Ott*
>
> Senior Consultant IT
>
> Phone +49 89 203 007 497
>
> Fax +49 89 35043366
>
> Shopping Guide GmbH
>
> Leopoldstrasse 236, 80807 Munich
>
> HRB 195968, Geschäftsführer: Olivier Sichel
>
> joern.ott at ciao.leguide.com <mailto:joern.ott at ciao.leguide.com>
>
>
>
> http://img.leguide.com/signature/v4/signature_corpo_ciao_de_reseau.jpg
>
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
More information about the Users
mailing list