[pve-devel] [PATCH storage 1/1] fix #3580: plugins: make preallocation mode selectable for qcow2 and raw images

Lorenz Stechauner l.stechauner at proxmox.com
Thu Sep 9 14:26:17 CEST 2021


On 09.09.21 14:04, Fabian Ebner wrote:
> Am 09.09.21 um 13:11 schrieb Lorenz Stechauner:
>>
>> On 09.09.21 12:25, Fabian Ebner wrote:
>>> Am 08.09.21 um 10:11 schrieb alexandre derumier:
>>>> Hi,
>>>> it can be done too with ceph rbd with "rbd create ... 
>>>> –thick-provision"
>>>>
>>>
>>> Hi,
>>> there also is the 'sparse' storage config option (currently only 
>>> used for ZFS plugins). If there is only thick or thin, re-using that 
>>> one is probably nicer, because the newly proposed preallocation 
>>> option seems to be closely tied to qemu-img.
>>
>> Sounds like a good idea. I doubt, that anyone would use full 
>> prellocation anyway, so simply using 'sparse' for prealloc=off and 
>> default remains prealloc=metadata sounds good.
>>
>
> I actually only meant re-using 'sparse' for the RBD use case. But yes, 
> it seems like re-using it for the qemu-img use case would be enough to 
> fix the bug too. It might be a bit confusing though, because when 
> sparse is not set, the images would still be mostly sparse (except for 
> metadata).

makes sense, I got a bit confused by the rbd stuff. Then I won't update 
the patch to use 'sparse' :)

>
>>>
>>>> Le lundi 06 septembre 2021 à 15:15 +0200, Lorenz Stechauner a écrit :
>>>>> the plugins for file based storages
>>>>>   * BTRFS
>>>>>   * CIFS
>>>>>   * Dir
>>>>>   * Glusterfs
>>>>>   * NFS
>>>>> now allow the option 'preallocation'.
>>>>>
>>>>> 'preallocation' can have four values:
>>>>>   * default
>>>>>   * off
>>>>>   * metadata
>>>>>   * falloc
>>>>>   * full
>>>>> see man pages for `qemu-img` for what these mean exactly. [0]
>>>>>
>>>>> the defualt value was chosen to be
>>>>>   * qcow2: metadata (as previously)
>>>>>   * raw: off (I was unable to find any documentation on this, so
>>>>>      could only test this and found, that 'off' was the most
>>>>>      fitting.)
>>>>>
>>>>> when using 'metadata' as preallocation mode, for raw images 'off'
>>>>> is used.
>>>>>
>>>>> [0]
>>>>> https://qemu.readthedocs.io/en/latest/system/images.html#disk-image-file-formats 
>>>>>
>>>>>
>>>>> Signed-off-by: Lorenz Stechauner <l.stechauner at proxmox.com>





More information about the pve-devel mailing list