[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 08 Aug 2016 11:15:46 +0300
From: Tom <0x6d3468@...il.com>
To: linux-ext4@...r.kernel.org
Subject: df report incorrect free space for a filesystem (ext4)
Greetings,
This is my first message to community - so please forgive me message
format and mistakes I did :-)
I am writing to you, as I have a strong suspect that problem related to
filesystem/kernel internals.
I are continuosly having problems with inconsistency of free space
reported by `df` and calculating free size from SB. I are using LVM and
ext4 for our volumes (/, /tmp, /opt and etc).
Here is an example of / volume on bare metal server.
Reported by df:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-lv_root 20G 16G 2.8G 86% /
Super-Block:
Last mounted on: /
Filesystem magic number: 0xEF53
Filesystem state: clean
Filesystem OS type: Linux
Inode count: 1290240
Block count: 5242880
Reserved block count: 227170
Free blocks: 3616906
Free inodes: 1201391
First block: 0
Block size: 4096
Fragment size: 4096
`df` reports 2.8G free space for /, but by binding fs and calculating
with `du` clearly seen that about ~12GB is free:
root@...e:~# mount -o bind / /tmp/root/
root@...e:~# du -sk /tmp/root/* | awk '{sum += $1} END {print sum}'
8688976
I tried to remount the fs without any results:
root@...e:~# mount /dev/rootvg/lv_root -oremount,rw
root@...e:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-lv_root 20G 17G 2.7G 86% /
The problem was resolved by remounting the fs with RO option:
root@...e:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-lv_root 20G 17G 2.7G 86% /
root@...e:~# mount /dev/rootvg/lv_root -oremount,ro
mount: / is busy
root@...e:~# mount /dev/rootvg/lv_root -oremount,rw
root@...e:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-lv_root 20G 8.1G 11G 44% /
By looking for a solution, I found that this topic relatively hot and
there are no clear and certain answers.
My questions are:
- what cause to df report wrong information?
- what can be done to proactively avoid it (usually we get an alert on
partition and discover the problem)?
P.S.
Here is a link to question i created - http://serverfault.com/questions
/795324/df-report-incorrect-free-space-for-a-filesystem-ext4
Cheers,
Tom
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists