0

I created a LV which it's size is 700MiB .

When I mounted the FS, I noticed the df -h shows the filesystem's size is 697MiB.

Where did 3MiB go? Could it reserved for the LVM's metadata?

The FS is xfs if that matters.

3 Answers 3

3

All file systems use some of the total space available on a device for storing internal structures and data (the file system's metadata). The overhead of the XFS filesystem is around 0,5%.

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

2

Mostly Inodes and a few superblocks

Many filesystems, including XFS, use inodes. These are pointers to the actual data blocks and contain the ACLs and any other extended attributes. When a filesystem is created, part of it is reserved for inodes and will eat into the available block space.

Sometimes, it's possible to exhaust your inode space before your block space, especially in situations where your FS is made up of many, many small files.

You can see your inode usage with:

df --inodes

Superblocks contain information about the filesystem, like size, name, inode location etc. They are replicated across the filesystem so that if there's corruption, there's a chance one will survive. These will also eat into your space.

You can see some of your XFS metadata with:

xfs_info

I'm teaching a class so I'm preparing in case soneone else will wonder as well

For your lesson, you may want to read up on filesystems concepts: http://www.cyberciti.biz/tips/understanding-unixlinux-file-system-part-i.html

0

What you are comparing is, if I understand you correctly, an LV size of 700 MiB to a usable filesystem size of 697 MiB (df -h will output MiB, df -H MB).

The difference is 3 MiB, not 33 MB.

I'm not sure that those 3 MiB are really worth investigating?

1
  • ,yeah you're right about the mib o/p , I'll fix my question . I'm not investigating since I need those 3mib back , I'm just carious why it happens .I'm teaching a class so I'm preparing in case soneone else will wonder as well :)
    – John Doe
    Dec 26, 2015 at 12:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .