OpenSource For You

File storage: Solving the storage problem

-

If you are a STaaS provider, you will one day definitely come across the problem of a lot of your storage being wasted. This is because, if a user purchases 10GB of storage space from you, then you are forced to allocate him his 10GB, regardless of whether he will use all this space at once. Another challenge you will face frequently is that of maintainin­g the right amount of storage to provide the best service to your customers. As an example, if your data storage has 100GB of space left, someone may unexpected­ly demand 200GB of storage from you, and you may have to refuse. But a good provider should fulfil all user requests and provide 24/7 service. So a good solution is to use file storage, with which you can scale your storage according to the data inside it and allocate space that you don’t even have.

File storage relies on the fact that everything in your operating system is a file. In file storage, we create a file and use it as our virtual partition, then format it in the desired file system and mount it. All these operations are done in our real disk partition (/ dev/sda*) with some small tricks or manipulati­on. For this procedure, we use sparse images as our disk.

Sparse files: A sparse file is a specific type of file that aims to use the file system space more efficientl­y by using metadata to represent empty blocks. In sparse files, blocks are allocated and written dynamicall­y as the actual data is written, rather than at the time the file is created. So, if you create a 10GB sparse file, it will

Newspapers in English

Newspapers from India