disk preallocation setting, what is posix_fallocate?

Red Squirrel

Renowned Member
May 31, 2014
50
9
73
i want to setup my stores to preallocate disks, that way they will not grow out of range like with thin provision. I have 40GB disks in vmware that are well over 2TB as they have just grown over time. So I want to avoid that.

There is an option for "Full" and also an option for "Full (posix_fallocate)". What is the 2nd one and which one should I be using? I don't want to use sparse files as those are weird and confusing to deal with I just want normal files that take up the space immediately and stay that size unless I grow it manually.
 
I'm using all HDDs for mass storage, mostly raid 10. Raid 5 for stuff that's less performance critical.

Although is there a way to cap the thin allocation so it never grows beyond the set size? I'd be fine with that too.
 
Oh ok that's good to know, with vmware I found a vmdk that is over 3TB even though the drive is only 40GB in reality. But maybe Proxmox is better to avoid that from happening. So I will just leave the setting alone then.
 
Oh ok that's good to know, with vmware I found a vmdk that is over 3TB even though the drive is only 40GB in reality. But maybe Proxmox is better to avoid that from happening. So I will just leave the setting alone then.
Just an aside, your example of the "3TB" vmdk for a 40GB drive is exactly what @_gabriel was describing about over allocating space.
Whomever created the VMWare image set the drive size to 3TB, thin provisioned. The actual data being used is much less - and since it's on a 40GB drive/partition/whatever it won't be able to exceed 40GB. However the OS will believe it has 3TB to use as desired, and if/when it requires data storage exceeding the actually available 40GB it will create errors.