Errorneous block size calculation

Bug #180415 reported by Pavel Mlčoch
4
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Gutsy by Mahesh Aravind

Bug Description

Binary package hint: coreutils

df display this header

"Filesystem 1K-blocks Used Available Use% Mounted on"

but I`ve 4K blocksize too and value in this column is count of 4K blocks.

Revision history for this message
Mahesh Aravind (maravind) wrote :

I was about to file a bug report when I saw this.

I believe it should take the blocksize from dumpe2fs(8) or something, and go ahead and set the BLOCKSIZE env var.

Try:
$ BLOCKSIZE=4096 df

It gives correct values (apparently)

However it doesn't seem to affect 'df -h'/'du -h' -- funny!

Bundlers should apparently decide on setting BLOCK_SIZE or BLOCKSIZE (recommended) by default on install. Maybe on /etc/profile or something.

Revision history for this message
Pavel Mlčoch (pavkamlc) wrote :

I think this bug can be closed. In actualy Ubuntu HH is this header and value displayed right. In the future may be blocksize displayed as another column, but its only wish.

pavka@pavka:~$ df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/linux-feisty32
                      20642428 12844596 6749256 66% /
pavka@pavka:~$ BLOCKSIZE=4096 df /
Filesystem 4K-blocks Used Available Use% Mounted on
/dev/mapper/linux-feisty32
                       5160607 3211149 1687314 66% /

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Long ago in the distant past some Unixes would report 512 byte block sizes in df and some would report 1k blocks and everyone got mighty confused and upset; then everyone started reporting 1k consistently and you could look at the output of df and immediately see how much disc you had free without having to multiply by 2 (sometimes).

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Original poster states bug can be closed.

Changed in coreutils:
status: New → Invalid
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.