Re: [Qemu-devel] Re: [ANNOUNCE] Sheepdog: Distributed Storage System for KVM

Tomasz Chmielewski
2009-10-25T10:55:32Z

Dietmar Maurer wrote:
>> Also, on _loaded_ systems, I noticed creating/removing logical volumes
>> can take really long (several minutes); where allocating a file of a
>> given size would just take a fraction of that.
>
> Allocating a file takes much longer, unless you use a 'sparse' file.

If you mean "allocating" like with:

dd if=/dev/zero of=image bs=1G count=50

Then of course, that's a lot of IO.

As you mentioned, you can create a sparse file (but then, you'll end up
with a lot of fragmentation).

But a better way would be to use persistent preallocation (fallocate),
instead of "traditional" dd or a sparse file.

--
Tomasz Chmielewski