[minipost] Create a loopback hard-drive partition inside a file in linux
For best article visual quality, open [minipost] Create a loopback hard-drive partition inside a file in linux directly at NetworkGeekStuff.
This article is really just a quick documentation for something that I do almost each year, and each year I must google-search how I did the last time. So from now on I will have it in my own notes …. here!
Mu current problem was that I have VPS system from a small provider hpcloud.com , but the base image is divided to 10 GB of system partition and another 20 GB of data partition. And as luck would have it, I needed 25 GB for data. One of the options was to buy more storage, but I have seen that my minimalistic debian hardly used more than 1,7 GB from the 10 GB system space and I wanted to make use of the remaining space.
Additionally, resizing the partition was not an option as this was the provider mandatory separation, so I decided to use a loopback file emulating a hard-drive.
What this means is that I will create a 5 GB file in the system partition, and mount it as a directory in the data partition, Continue reading