df -h Size - User != Avail

2

When I run df -h I get the following

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             809G  753G   14G  99% /

But Size - Used is not even close to Avail (809-753 = 56 and it shows 14)

How is that possible? How much space do I really have left?

Noam

Posted 2014-07-07T07:15:34.133

Reputation: 181

Answers

2

Usually there is some "reserved" space for superuser (sic), and then there is the fs overhead (i-node tables, etc). Depends on the filesystem.

ext2/3/4 has a default reserve of 5% for uid0 (-m) depending on the usage-type (-T) i-node space is pre-allocated - see df -ih

I'd say the 14G are really available, but there may be 40G of reserve and say 100MB of i-nodes, which would pretty much add up. #ymmw

rogerovo

Posted 2014-07-07T07:15:34.133

Reputation: 406

40GB of reserve, what does that mean? – Noam – 2014-07-07T07:48:05.967

only the root can use it. – rogerovo – 2014-07-07T07:49:50.737

1if you have the ext4 fs, check man tune2fs where the reserved space can be changed (i-nodes can be set only while formatting) – rogerovo – 2014-07-07T07:53:58.373

Is that something I can verify / configure? I'm pretty sure a couple of days ago it did add up (and didn't change any config) – Noam – 2014-07-07T07:54:13.723

sometimes the filesystem totals lag if a big amount of files and/or space is freed up. But not couple of days... – rogerovo – 2014-07-07T08:12:23.187