I have a partition /dev/mapper/datavg-lv_data.

df -h results shows

enter image description here

while lvdisplay shows

enter image description here

why is there a huge difference between lv size, filesystem size and available size while there is no data on mount point? where does the space go?


A logical volume isn't the same thing than a file system. A file system might be just a small part of a logical volume.

Most likely the file system doesn't span the whole volume and you will have to resize the partition, LVM information and then resize the file system (with resize2fs).

or if you're using EXT3 or EXT4, it might be simply that the space is reserved for root and system services, in which case you can use tune2fs to reclaim the space.

You can check how much is reserved with:

 sudo tune2fs -l /dev/sda1 | grep 'Reserved block count'

(Replace sda1 with the actual disk).

|improve this answer|||||

lvdisplay reports the actual size on the disk, but df shows the usable disk space by the system which is the actual disk size minus the filesystem space used.

Also consider that filesystems use inodes. When a filesystem is created, part of it(almost 1%) is reserved for inodes and will take up the available block space. So in your case almost 5GiB space is taken up by inode table.

To check inode usage, use this command :

df --inodes
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.