slight discrepancy between size reported by df and lvs commands
Issue
Even being careful to select identical units, there is some difference between lvs and df :
# df /dev/mapper/VG01-Root
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VG01-Root
12709344 9755412 2319828 81% /
# lvs --units k /dev/mapper/VG01-Root
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert
Root VG01 -wi-ao--- 12910592.00k
Both output above are shown in KiB (1024 bytes)
# lvs --units K /dev/mapper/VG01-Root
LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert
Root VG01 -wi-ao--- 13220446.21K
# df -B KB /dev/mapper/VG01-Root
Filesystem 1kB-blocks Used Available Use% Mounted on
/dev/mapper/VG01-Root
13014369kB 9989542kB 2375504kB 81% /
Trying the same using 1KB == 1000 bytes, we still see a discrepancy in the size of the file system : the lvs command always reports bigger size.
Environment
Red Hat Enterprise Linux all versions
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
