You are not logged in.

#1 2022-01-07 18:04:33

Strangiato
Member
Registered: 2020-01-10
Posts: 382

df and fdisk give diferent sizes for EXT4 partitions

Hi
I'm just curious...
As seen in the outputs below, df and fdisk commands give different sizes for my two ext4 partitions (sdb3 and sdb4).
Dolphin file manager gives the same sizes as df command. Why? What sizes are correct?

$  df -khT|grep sdb
/dev/sdb3      ext4      148G  117G   25G  83% /
/dev/sdb2      ntfs3     151G  109G   43G  72% /mnt/WIN7
/dev/sdb4      ext4      620G  572G   18G  98% /mnt/WD
$ fdisk -l /dev/sdb
Disk /dev/sdb: 931.51 GiB, 1000203804160 bytes, 1953523055 sectors
Disk model: WDC WD10EZEX-00B
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x053ee8b3

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sdb1            2048     206846     204799   100M  7 HPFS/NTFS/exFAT
/dev/sdb2          206848  315870028  315663181 150.5G  7 HPFS/NTFS/exFAT
/dev/sdb3  *    315871232  630444031  314572800   150G 83 Linux
/dev/sdb4       630444032 1953519615 1323075584 630.9G 83 Linux

Offline

#2 2022-01-07 18:18:33

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: df and fdisk give diferent sizes for EXT4 partitions

The default for ext partitions is to reserve 5% for root use only.
https://wiki.archlinux.org/title/Ext4#Reserved_blocks

Either that or it's the usual Gib/GB conversion factor.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-01-07 18:32:16

Strangiato
Member
Registered: 2020-01-10
Posts: 382

Re: df and fdisk give diferent sizes for EXT4 partitions

Slithery wrote:

The default for ext partitions is to reserve 5% for root use only.
https://wiki.archlinux.org/title/Ext4#Reserved_blocks

Either that or it's the usual Gib/GB conversion factor.

Interesting. Thank you for your reply and link Slithery.

Offline

Board footer

Powered by FluxBB