0

So I am trying to shrink a image file to a more reasonable size and I followed this tutorial:

https://softwarebakery.com/shrinking-images-on-linux

Basically it shows you to shrink the partition and filesystem on a .image data with gparted.

Let's call the sdb1 is the boot partition on this .image data and the sdb2 is the file partition of the .image data. I checked the size of all the data under the sdb2, it was 120 MB, and the minimum size of the filesystem on sdb2 I can reach with gparted was 200 MB.

I know the filesystem can only be occupied with the unit of cluster. So there should be some difference between the data file and the actual occupied size by the data. But is this huge difference(almost as big as the data size) normal?

1 Answer 1

1

The file system itself uses some space for its structures, and if you have a journaled FS the journal takes up room as well. On such a tiny file system, these few MB can be a sizeable proportion of the total size.

A few things to try:

  • remove the journal if one exists (understanding the implications)
  • convert to a different file system, that is optimized for tiny partitions
  • understand, that an overhead of 80MB is miniscule on today's storage media.
2
  • yea I know this 80MB is sort of no-big deal. But I was just wondering what made it actually happen. so you mean the FS journal was the main reason for this 80MB?
    – J.R.
    Oct 11, 2017 at 11:19
  • If it is a journaled FS, then the journal would be a big contributor. The FS strcutures themselves also need quite a bit (including where to store the Metadata) Oct 12, 2017 at 7:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .