[Bug 1276197] [NEW] df isn't showing the correct available space as root if blocks are reserved
Sworddragon
1276197 at bugs.launchpad.net
Tue Feb 4 15:07:53 UTC 2014
Public bug reported:
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 at ubuntu:~# dumpe2fs -h /dev/sda1 | grep 'Reserved block count:'
dumpe2fs 1.42.9 (28-Dec-2013)
Reserved block count: 0
root at ubuntu:~# df /dev/sda1
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 144684684 82382148 62286152 57% /
root at ubuntu:~# tune2fs -r 262144 /dev/sda1
tune2fs 1.42.9 (28-Dec-2013)
Setting reserved blocks count to 262144
root at 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.
** Affects: coreutils (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/1276197
Title:
df isn't showing the correct available space as root if blocks are
reserved
Status in “coreutils” package in Ubuntu:
New
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 at ubuntu:~# dumpe2fs -h /dev/sda1 | grep 'Reserved block count:'
dumpe2fs 1.42.9 (28-Dec-2013)
Reserved block count: 0
root at ubuntu:~# df /dev/sda1
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 144684684 82382148 62286152 57% /
root at ubuntu:~# tune2fs -r 262144 /dev/sda1
tune2fs 1.42.9 (28-Dec-2013)
Setting reserved blocks count to 262144
root at 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 manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1276197/+subscriptions
More information about the foundations-bugs
mailing list