Print unused bytes of logical volume

by guettli   Last Updated August 13, 2019 20:00 PM

Imagine the physical volume was resize with:

pvresize /dev/sda2 

And the logical volumne was resized with:

lvresize -l +100%FREE system/home

But this command was not done:

resize2fs /dev/mapper/system-home

Since the last command was forgotten, there is unused space.

How to calculate the unused bytes?

Background: I want to write a check-script which checks if on a server the resize of the filesystem was forgotten.



Related Questions


Updated June 18, 2015 22:00 PM

Updated June 19, 2015 02:00 AM

Updated February 17, 2018 23:00 PM

Updated April 12, 2015 20:00 PM