1

When I run df -H, my network mount reports 100% usage:

user@system:/mnt/backup$ df -H Filesystem Size Used Avail Use% Mounted on ... //192.168.71.2/Linux-Database-Backup-Storage 806G 806G 0 100% /mnt/backup 

Running stat -f confirms there are no free inodes/blocks:

user@system:/mnt/backup$ stat -f /mnt/backup File: "/mnt/backup" ID: 0 Namelen: 255 Type: smb2 Block size: 1024 Fundamental block size: 1024 Blocks: Total: 786432000 Free: 0 Available: 0 Inodes: Total: 0 Free: 0 

However, when I try to find what's using up all the disk space, the reported usage (~115G) isn't anywhere near the network mount size (~806G):

user@system:/mnt/backup$ du -h /mnt/backup 13G /mnt/backup/backups-a 99G /mnt/backup/backups-b 3.7G /mnt/backup/backups-c 115G /mnt/backup 

I have a relatively small number of files as well, checking the reported inodes usage only reports 66 inodes in use:

user@system:/mnt/backup$ du -s --inodes /mnt/backup | sort -rn 66 /mnt/backup 

My /etc/fstab configuration:

user@system:/mnt/backup$ cat /etc/fstab \\192.168.71.2\Linux-Database-Backup-Storage /mnt/backup cifs credentials=/home/user/.smbcredentials2,file_mode=0755,dir_mode=0755,vers=2.0,_netdev,uid=1000,gid=1000 0 0 

Why is there a discrepancy between df and du? What's using up all the extra storage?

Thanks!

1 Answer 1

2

There are various possible reasons for this, mostly hinging around the fact that a network share need not correspond to an entire filesystem. Here, it's possible that although the remote filesystem is 806GB, only part of it is being exported to you over the network. You have used 115GB but another party has used the remaining 690GB or so.

Here's an illustrative example from my home network:

mkdir -p /mnt/net mount -o 'user=…' //REMOTE/Share /mnt/net df -h /mnt/net Filesystem Size Used Avail Use% Mounted on //REMOTE/Share 984G 915G 59G 94% /mnt/net du -hsx /mnt/net 8.7G /mnt/net 

In my situation there is a 1TB filesystem that is shared out in a number of different ways. (Each of my family members has their own semi-private network share, for example.) The total usage is 915GB of 984GB but the share shown here is using less than 10GB of it.

1
  • 1
    Turns out the network user for the CIFS store had a quota set, not the folders themselves. Just disabling this quota fixed it. Commented May 16, 2024 at 14:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.