The resize code as written originally did the simplest possible thing. It
converts and copies the whole file so that it doesn’t have to figure out how
to sync backing files etc. This could definitely be improved, especially now 
that
there is code in _create_images_and_backing that can ensure that backing files 
are
downloaded/created if they are not there.

Additionally the resize code should be using something other than ssh/rsync. I’m
a fan of using glance to store the file during transfer, but others have 
suggested
using the live migrate code or libvirt to transfer the disks.

Vish

On Jul 24, 2014, at 2:26 AM, fdsafdsafd <jaze...@163.com> wrote:

> 
> No.
> before L5156, we convert it from qcow2 to qcow2, in which it strips backing 
> file.
> I think here, we should wirte like this:
> 
> if info['type'] == 'qcow2' and info['backing_file']:
>        if shared_storage:
>              utils.execute('cp', from_path, img_path)
>        else:
>             tmp_path = from_path + "_rbase"
>              # merge backing file
>              utils.execute('qemu-img', 'convert', '-f', 'qcow2',
>                               '-O', 'qcow2', from_path, tmp_path)
>             libvirt_utils.copy_image(tmp_path, img_path, host=dest)
>             utils.execute('rm', '-f', tmp_path)
> else:  # raw or qcow2 with no backing file
>         libvirt_utils.copy_image(from_path, img_path, host=dest)
> 
> 
> 
> At 2014-07-24 05:02:39, "Tian, Shuangtai" <shuangtai.t...@intel.com> wrote:
> 
> 
> 
> 
> 
> <!--
> 
> _font-face
>       {font-family:SimSun;
>       panose-1:2 1 6 0 3 1 1 1 1 1;}
> _font-face
>       {font-family:SimSun;
>       panose-1:2 1 6 0 3 1 1 1 1 1;}
> _font-face
>       {font-family:Calibri;
>       panose-1:2 15 5 2 2 2 4 3 2 4;}
> _font-face
>       {font-family:Tahoma;
>       panose-1:2 11 6 4 3 5 4 4 2 4;}
> _font-face
>       {font-family:SimSun;
>       panose-1:2 1 6 0 3 1 1 1 1 1;}
> 
> p.MsoNormal, li.MsoNormal, div.MsoNormal
>       {margin:0cm;
>       margin-bottom:.0001pt;
>       font-size:12.0pt;
>       font-family:SimSun;}
> a:link, span.MsoHyperlink
>       {mso-style-priority:99;
>       color:blue;
>       text-decoration:underline;}
> a:visited, span.MsoHyperlinkFollowed
>       {mso-style-priority:99;
>       color:purple;
>       text-decoration:underline;}
> span.EmailStyle17
>       {mso-style-type:personal-reply;
>       font-family:"Calibri","sans-serif";
>       color:#1F497D;}
> .MsoChpDefault
>       {mso-style-type:export-only;
>       font-family:"Calibri","sans-serif";}
> _page WordSection1
>       {size:612.0pt 792.0pt;
>       margin:72.0pt 90.0pt 72.0pt 90.0pt;}
> div.WordSection1
>       {page:WordSection1;}
> -->
> 
> 
> 
> 
> 
> whether we already use like that ?
> 
> https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L5156
> 
>  
> 
> From: fdsafdsafd [mailto:jaze...@163.com]
> 
> 
> Sent: Thursday, July 24, 2014 4:30 PM
> 
> To: openstack-dev@lists.openstack.org
> 
> Subject: [openstack-dev] [nova]resize
> 
>  
> 
> 
> 
> 
> 
> In resize, we convert the disk and drop peel backing file, should we judge 
> whether we are in shared_storage? If we are in shared storage, for example, 
> 
> 
> 
> 
> nfs, then we can use the image in _base to be the backing file. And the time 
> cost to resize will be faster.
> 
> 
> 
> 
>  
> 
> 
> 
> 
> The processing in line 5132
> 
> 
> 
> 
> https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py
> 
> 
> 
> 
>  
> 
> 
> 
> 
>  
> 
> 
> 
> 
> Thanks
> 
> 
> 
>  
> 
> 
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to