stat command gives wrong block count

Solution Verified - Updated -

Issue

  • stat command shows block count as 8 even for empty file
  • Block count = 8 in stat output.
  • File size = 0 but Block count=8, why?
  • Block usage is 8 for an empty file.
  • stat gives wrong information

Environment

  • Red Hat Enterprise Linux
  • Red Hat Storage Server
  • ext2, ext3, ext4, xfs, glusterfs
  • All filesystem supporting extended attributes

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content