Why does df report 3G used on empty LV mount (XFS)?


Rocky 9.2 (DVD install w/gnome) with XFS, LVM and mutiple LVs. LV “rl-animwork” is mounted to /animwork. The target mount dir shows empty, both with “rl-animwork” mounted and without it mounted:

ls -alh /animwork
total 4.0K
drwxr-xr-x. 2 root root 6 Nov 14 19:39 .
dr-xr-xr-x. 25 root root 4.0K Nov 8 18:21 …

du -hcs /animwork
0 /animwork
0 total

but when “rl-animwork” is mounted on /animwork, df reports 2.8GiB used:
/dev/mapper/rl-animwork xfs 390G 2.8G 388G 1% /animwork

How is this possible? lsof reporting no big deleted files.
Other infos:

/dev/mapper/rl-root / xfs defaults 0 0
/dev/mapper/rl-animwork /animwork xfs defaults 0 0
UUID=16d9afb6-8bd4-408e-b4a9-5e332f185576 /boot xfs defaults 0 0
/dev/mapper/rl-home /home xfs defaults 0 0
/dev/mapper/rl-swap none swap defaults 0 0

lvdisplay outoput for the lv:/
— Logical volume —
LV Path /dev/rl/animwork
LV Name animwork
VG Name rl
LV UUID QwG5Gj-jbhh-5UlF-4XDO-ges1-DHm4-mFDns8
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2023-10-19 12:50:01 -0700
LV Status available
open 1
LV Size 390.08 GiB
Current LE 99861
Segments 1
Allocation inherit
Read ahead sectors auto
currently set to 8192
Block device 253:3

Any ideas? Thank you.

XFS, like any filesystem, does reserve space for its metadata.
What does xfs_info /animwork show?

xfs_info /animwork
meta-data=/dev/mapper/rl-animwork isize=512 agcount=4, agsize=25564416 blks
= sectsz=4096 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1 bigtime=1 inobtcount=1
data = bsize=4096 blocks=102257664, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=49930, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

I am not seeing it. Please advise.

storage - Newly created XFS filesystem shows 78 GB used - Server Fault ?

RE: “…depending on which metadata features you enable at mkfs time.” (from the link supplied by quartsize):
The lv was created via Rocky 9.2 install DVD image- any mkfs defaults were not altered by me nor do I recall any ability to do so. Does anyone know how to alter this at the installer DVD? Is it possible for me to remove the metadata features now- after “mkfs time”? Thank you.

I believe the backend supports it, and you can set mkfsoptions if you’re Kickstarting, but I don’t remember if that’s exposed in the GUI. A quick peek at a screenshot suggests it is not.

The only such filesystem-level change I’ve personally made to existing XFS filesystems is to grow them. Whether any particular metadata option can be changed after filesystem creation seems likely to me to be niche knowledge that you’re gonna have to scour the man-pages or Web for, unfortunately.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.