Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #209501

Re: df shows wrong disk size

From Roberto C. Sánchez <roberto@debian.org>
Newsgroups linux.debian.user
Subject Re: df shows wrong disk size
Date 2019-06-01 20:50 +0200
Message-ID <y4heN-3Jj-1@gated-at.bofh.it> (permalink)
References <y4giJ-39F-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jun 01, 2019 at 10:41:20AM -0700, Ross Boylan wrote:
> df says my volume is 3G, but everything else says it's 4G.  What's
> going on and how can I correct it?
> 
> This question concerns the total reported space, not the free space.
> 
> The volume is an LVM logical volume on buster with an ext4 file
> system.  I originally mistakenly created it as 4TB in size.
> Then I took it offline, resized the file system to 3G, resized the
> logical volume to 4G, and  then auto-resized (that is, ran resize2fs
> without specifying an explicit size) the file system to 4G.  When df
> showed the size as 3G I thought it might be temporary, but it it
> reports the same value after reboot.
> 
> (If you're wondering: I resized to 3G first out of concern that the
> file system requires a slightly larger "partition" than its own size,
> and I didn't want to risk cutting off the end of the file system.)
> 
> I thought there might have been a huge amount of reserved space or
> journal from the original 4TB size, but the values in dumpe2fs appear
> normal to me.
> 
> Running buster.
> 
> Thanks.
> Ross
> 
> # df -h /var/local/cache/
> Filesystem                  Size  Used Avail Use% Mounted on
> /dev/mapper/vgbarley-cache  3.0G  721M  2.1G  26% /var/local/cache
> root@barley:~/tempserver/root# lvs vgbarley
>   LV      VG       Attr       LSize   Pool Origin Data%  Meta%  Move
> Log Cpy%Sync Convert
>   cache   vgbarley -wi-ao----   4.00g
> ## etc
> # resize2fs /dev/vgbarley/cache
> resize2fs 1.44.5 (15-Dec-2018)
> The filesystem is already 1048576 (4k) blocks long.  Nothing to do!
> # So both LVM and e2fs utilities see 4G , even thouogh df reports 3G
> 
What is the output of 'df -B4096'?

Regards,

-Roberto

-- 
Roberto C. Sánchez

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

df shows wrong disk size Ross Boylan <rossboylan@stanfordalumni.org> - 2019-06-01 19:50 +0200
  Re: df shows wrong disk size Roberto C. Sánchez <roberto@debian.org> - 2019-06-01 20:50 +0200
    Re: df shows wrong disk size Ross Boylan <rossboylan@stanfordalumni.org> - 2019-06-01 23:50 +0200
      Re: df shows wrong disk size Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-06-02 00:40 +0200
        Re: df shows wrong disk size Ross Boylan <rossboylan@stanfordalumni.org> - 2019-06-02 03:10 +0200
      Re: df shows wrong disk size Henning Follmann <hfollmann@itcfollmann.com> - 2019-06-03 12:50 +0200
        Re: df shows wrong disk size Ross Boylan <rossboylan@stanfordalumni.org> - 2019-06-03 18:20 +0200
          Re: df shows wrong disk size Ross Boylan <rossboylan@stanfordalumni.org> - 2019-06-03 19:40 +0200
            Re: df shows wrong disk size Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-06-04 07:30 +0200
  Re: df shows wrong disk size Pascal Hambourg <pascal@plouf.fr.eu.org> - 2019-06-01 21:20 +0200
  Re: df shows wrong disk size Gary Dale <gary@extremeground.com> - 2019-06-02 00:50 +0200
    Re: df shows wrong disk size Ross Boylan <rossboylan@stanfordalumni.org> - 2019-06-02 02:40 +0200
      Re: df shows wrong disk size Stefan Monnier <monnier@iro.umontreal.ca> - 2019-06-02 17:20 +0200

csiph-web