Skip to content

Inaccurate Disk Usage Reporting for ext* Filesystems Due to Reserved Blocks #673

@ernolf

Description

@ernolf

Description:

  • The current implementation inaccurately reports disk usage for ext* filesystems by not accounting for reserved blocks. The df command’s Used-value does not include these reserved blocks, leading to an underestimation of the actual used space. When calculating the file system usage in percent, the calculation is also based on this incorrect basis, which means that the percentages provided by df are inaccurate and therefore actually unusable. Since the 'Blocks' (aka 'Size') value is not used for the actual size of the disk, but the computed sum of 'Used' and 'Available', the same inaccuracy also occur when displaying the actual disk size.
    This affects ext* file systems where a significant part of the disk (default 5%) can be reserved for system and root use.

Expected Behavior:

  • The disk usage should reflect the sum of all blocks that can not be used, which includes reserved blocks, to give an accurate representation of the available space in relation to the real disksize. Users know the size of their devices and get confused, when 5% of disksize is 'missing'.

Ref: https://help.nextcloud.com/t/why-is-my-1tb-ssd-showing-only-890gb-of-usable-space-in-nextcloud/202375/4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions