Re: df shows wrong disk size
On Sat, Jun 1, 2019 at 3:49 PM Gary Dale <gary@xxxxxxxxxxxxxxxxx> wrote:
> I suggest trying gparted to read the partition table on your drive.
> There may be a problem and gparted is usually pretty good at finding
> partition table errors.
Since the file system is sitting on an LVM logical volume, I don't
think the partitioning of the raw disks is directly relevant.
The analogue to the partition size is the logical volume size. As my
original message showed, LVM does think the volume is 4GB.
If the filesystem and the volume manager both agree on 4GB, I don't
know where df is getting the notion that it's 3GB. It seems very
likely it's a holdover from when I shrunk the filesystem to 3GB. I
speculate that when I did the resize2fs that made it 4GB the fact that
I didn't explicitly specify a size meant the code path in resize2fs
didn't reset something that the explicit shrink to 3GB did set.