1

My newly purchased KVM based VPS (virtual server) running Centos 7 shows a - to my mind - odd result for the df -h command versus fdisk -l and ssm list.

I've put the output of various disk related commands below.

What I expected to see was a Size of roughly 60 GB on /dev/vda1 when I did df -h

ssm shows that the difference is between Volume size and FS Size.

What am I missing?

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       2.0G  1.1G  754M  60% /
devtmpfs        912M     0  912M   0% /dev
tmpfs           921M     0  921M   0% /dev/shm
tmpfs           921M   17M  904M   2% /run
tmpfs           921M     0  921M   0% /sys/fs/cgroup
tmpfs           921M   17M  904M   2% /etc/machine-id

Seems I only have 2 GB on the / mount.

However, fdisk shows this: # fdisk -l

Disk /dev/vda: 64.4 GB, 64424509440 bytes, 125829120 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
Disk label type: dos
Disk identifier: 0x000dcb5c

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048   121632383    60815168   83  Linux
/dev/vda2       121632384   125826687     2097152   82  Linux swap / Solaris

ssm gives this:

# ssm list
--------------------------------
Device        Total  Mount point
--------------------------------
/dev/vda   60.00 GB  PARTITIONED
/dev/vda1  58.00 GB  /
/dev/vda2   2.00 GB  SWAP
--------------------------------
-------------------------------------------------------------------
Volume     Volume size  FS    FS size       Free  TypeMount point
-------------------------------------------------------------------
/dev/vda1     58.00 GB  ext4  1.97 GB  851.11 MB  part/
-------------------------------------------------------------------
Paul W
  • 11
  • 1

2 Answers2

4

You need to grow your root filesystem. Try issuing resize2fs /dev/vda1. As always, take a backup first.

shodanshok
  • 47,711
  • 7
  • 111
  • 180
0

Thanks shodanshok

This did it:

# resize2fs /dev/vda1
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/vda1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 8
The filesystem on /dev/vda1 is now 15203792 blocks long.

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        58G  1.1G   54G   2% /
Paul W
  • 11
  • 1