O
O
Oleg2020-10-06 16:38:18
linux
Oleg, 2020-10-06 16:38:18

Why different data in reports on disk partitions?

This is the first time I see this, but
df -h (2GB of total disk space)

[email protected]:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            986M     0  986M   0% /dev
tmpfs           200M  2.7M  197M   2% /run
/dev/vda1       1.9G  1.6G  214M  89% /
tmpfs           997M     0  997M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           997M     0  997M   0% /sys/fs/cgroup
tmpfs           200M     0  200M   0% /run/user/0


"fdisk -l" already sees 30GB

fdisk -l
Disk /dev/vda: 30 GiB, 32212254720 bytes, 62914560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc8d5eddc

Device     Boot    Start      End  Sectors  Size Id Type
/dev/vda1  *        2048 62649983 62647936 29.9G 83 Linux
/dev/vda2       62649984 62912127   262144  128M 82 Linux swap / Solaris

"lsblk" is the same... 30Gb on vda1
lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0     11:0    1 1024M  0 rom
vda    252:0    0   30G  0 disk
├─vda1 252:1    0 29.9G  0 part /
└─vda2 252:2    0  128M  0 part [SWAP]


In fact, Ubuntu screams that the space on the "/" is critically small.

Why is that? First time you've encountered this?
How to "unsee" the remaining 28GB for the root partition?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ruslan Fedoseev, 2020-10-06
@VDT2

resizing a disk, resizing a partition, resizing a file system on that partition.
This is how the increase in space operation is performed. In your case, the disk is enlarged, the partition is enlarged, but the FS is not
man resize2fs

P
Puma Thailand, 2020-10-07
@opium

df shows the size of the file system
And fdisk is the size of the logical volume Of course
, the file system was made smaller than the volume, expand

R
Rsa97, 2020-10-06
@Rsa97

Show outputsudo tune2fs -l /dev/vda1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question