0

My question is built on top of this post:

why df vs lsblk command have different results?

The command, df and lsblk, yielded different result since I increased the storage. From the above post, it says I should resize the filesystem. What happens if I don't? Would I just not be able to use that extra storage space?

1
  • if I'm understanding your question correctly, yes the additional space would go unused. Commented Feb 16, 2023 at 19:31

2 Answers 2

1

If you grow the device (disk or partition) but not the filesystem, nothing special happens – the filesystem continues using only as much space as it previously did. For example, a 20 GB filesystem on a 100 GB device will only let you use the original 20 GB of capacity. (Not just any 20 GB total, but specifically the same 20 GB area that it originally occupied, i.e. nothing is written to the newly added 80 GB of space.)

This is what allows reducing the size – after shrinking a filesystem to a specific size you can be sure it'll only occupy the region starting with the beginning of the device, allowing the end to be chopped off.

0

If lsblk reports a larger size than df, then you have unused space in the partition. If instead df reports a larger size then lsblk, then your filesystem is configured to use more space than is present in the partition. In the latter case you will get some very interesting kernel errors when your filesystem attempts to seek to blocks beyond the end of your partition.

You must log in to answer this question.

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