Hacker News new | past | comments | ask | show | jobs | submit login

Unless you want the space to be pre-allocated



Yeah I've seen hosting companies in the past use sparse files for virtual machine storage - all is good unless, or until, they overcommit.

At which point you have filesystem-soup..


Yes, the better way is by using the fallocate program which uses the posix_fallocate syscall, which makes a new file with a given size containing whatever happened to be on disk at the time. Basically malloc for filesystems.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: