XFS Disk Usage

Posted by Burine@reddit | linuxadmin | View on Reddit | 7 comments

In process of building a DYI NAS. I prefer RPM distros and run Fedora KDE on my PC, but I wanted something more "stable" for the NAS so I went with Alma KDE. I put a few HDDs in and formatted using XFS.

[XXX@NAS DATA]$ df -Th
Filesystem                                 Type      Size  Used Avail Use% Mounted on
devtmpfs                                   devtmpfs  4.0M     0  4.0M   0% /dev
tmpfs                                      tmpfs     7.7G     0  7.7G   0% /dev/shm
tmpfs                                      tmpfs     3.1G   24M  3.1G   1% /run
/dev/mapper/almalinux_localhost--live-root xfs        70G   14G   57G  20% /
tmpfs                                      tmpfs     7.7G  4.0K  7.7G   1% /tmp
/dev/mapper/almalinux_localhost--live-home xfs       159G  2.2G  157G   2% /home
/dev/nvme0n1p2                             xfs       960M  595M  366M  62% /boot
/dev/sda1                                  xfs       3.7T   26G  3.7T   1% /DATA
/dev/sdb1                                  xfs       233G   42G  192G  18% /MISC
/dev/nvme0n1p1                             vfat      599M  9.5M  590M   2% /boot/efi
tmpfs                                      tmpfs     1.6G  124K  1.6G   1% /run/user/1000

SDA is a 4 TB drive and SDB is a 256 GB drive. Usage of SDA1 is 26 GB, according to this command, but I have no file on it.

[XXX@NAS DATA]$ sudo du -h
4.0K    ./.Trash-1000/info
0       ./.Trash-1000/files
4.0K    ./.Trash-1000
4.0K    ./New Folder
12K     .

I have a "test" folder and a "test" file in that folder, totaling only a few K. So why does df show 26 GB used? Is it the journal? Is it the metadata?

SDB1 contains my various .iso file that I've been distro-hopping with and shows 40 GB used of the above reported 42 GB used, so only 2 GB discrepancy vs >25 GB discrepancy on my 4 TB drive.

[XXX@NAS MISC]$ du -h
40G     ./ISO
40G     .