Hi and welcome to LinuxQuestions!
You may want to create a sparse file
of fixed (apparent) size, for example using the seek operand of the dd command:
dd if=/dev/zero of=this_is_a_sparse_file bs=1K count=0 seek=5120
In this way you can allocate a fixed amount of disk space, without actually store any data on it. See this
page on Arch wiki for an introduction to sparse files (plenty of them out there). The problem could be how to write data into the sparse file: you need a software that is able to write data at specific positions. For example a C program or Python can do that.