← Back to team overview

openstack team mailing list archive

Re: [OpenStack] preallocation

 

Vish:

For documentation purposes, if the user wants to be able to do snapshots, what combinations of the following three variables are allowed?

1. original image format (qcow2 | raw)
2. use_cow_image flag (true | false)
3. force_raw_images flag (true | false)


Take care,

Lorin
--
Lorin Hochstein
Lead Architect - Cloud Services
Nimbis Services, Inc.
www.nimbisservices.com





On Apr 10, 2012, at 1:32 AM, Vishvananda Ishaya wrote:

> You can disable using backing files with the following config:
> use_cow_images=false
> 
> You should be aware that you likely won't be able to snapshot images unless you make sure to upload them all in qcow format and also set:
> force_raw_images=false
> 
> On Apr 9, 2012, at 9:37 PM, William Herry wrote:
> 
>> Hi
>> 
>> I read from an article that said use preallocation can improve disk I/O performance in kvm, when I add it to openstack, suck error come to me
>> 
>> (nova.rpc.amqp): TRACE: Stderr: 'Backing file and preallocation cannot be used at the same time\nqemu-img: /usr/local/lib/python2.7/dist-packages/nova-2012.1-py2.7.egg/instances/instance-0000000e/disk: error while creating qcow2: Invalid argument\n'
>> 
>> I was added it to utils.py in virt/libvirt directory (line 77)
>> 
>> def create_cow_image(backing_file, path):
>>     """Create COW image
>> 
>>     Creates a COW image with the given backing file
>> 
>>     :param backing_file: Existing image on which to base the COW image
>>     :param path: Desired location of the COW image
>>     """
>>     execute(FLAGS.qemu_img, 'create', '-f', 'qcow2', '-o',
>>              'preallocation=metadata,cluster_size=2M,backing_file=%s' %
>>               backing_file, path)
>> 
>> here is the article: http://itscblog.tamu.edu/improve-disk-io-performance-in-kvm/
>> 
>> so what is Backing file for, can I disable it for use preallocation cause I can't got both
>> 
>> Thanks
>> 
>> -- 
>> 
>> ===========================
>> William Herry
>> 
>> WilliamHerryChina@xxxxxxxxx
>> 
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References