df isn't showing the correct available space as root if blocks are reserved

Bug #1276197 reported by Removed by request
6
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
New
Undecided
Unassigned

Bug Description

I'm using Ubuntu 14.04 dev with coreutils 8.21-1ubuntu4 and if blocks are reserved (at default 5% on ext4) and df is executed as root it shows the available space excluding the reserved blocks. But as root is able to write to the reserved blocks df should also show these space as available space. Here is an example:

root@ubuntu:~# dumpe2fs -h /dev/sda1 | grep 'Reserved block count:'
dumpe2fs 1.42.9 (28-Dec-2013)
Reserved block count: 0
root@ubuntu:~# df /dev/sda1
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 144684684 82382148 62286152 57% /
root@ubuntu:~# tune2fs -r 262144 /dev/sda1
tune2fs 1.42.9 (28-Dec-2013)
Setting reserved blocks count to 262144
root@ubuntu:~# df /dev/sda1
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 144684684 82382148 61237576 58% /

For example a 4 TiB partition would use at default 200 GiB as reserved space. As soon as 3.8 GiB are full df will show as root that there is no available space anymore while root can still write 200 GiB to the partition. Not to know then the 200 GiB will end is a problem here.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.