I have a partition /dev/mapper/datavg-lv_data.
df -h results shows
while lvdisplay shows
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?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
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).
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 :