0

I'm trying to increase disk space available on /dev/mapper/centos-root, however, I'm not sure why df -h is not reporting increased size.

$ sudo fdisk -l

Disk /dev/sda: 68.7 GB, 68719476736 bytes, 134217728 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: 0x000a12e4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048   132120575    65547264   8e  Linux LVM

Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 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 /dev/mapper/centos-root: 64.6 GB, 64634224640 bytes, 126238720 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

versus:

$ df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   18G   13G  4.8G  73% /
devtmpfs                 906M     0  906M   0% /dev
tmpfs                    914M     0  914M   0% /dev/shm
tmpfs                    914M  8.6M  906M   1% /run
tmpfs                    914M     0  914M   0% /sys/fs/cgroup
/dev/sda1                497M  140M  357M  29% /boot
.host:/                  465G  432G   34G  93% /mnt/hgfs
.host:/-vagrant          465G  432G   34G  93% /vagrant
.host:/-etc-bolt         465G  432G   34G  93% /etc/bolt

In the fdisk command there is: Disk /dev/mapper/centos-root: 64.6 GB, 64634224640 bytes, 126238720 sectors In the df -h command there is: /dev/mapper/centos-root 18G 13G 4.8G 73% /

2

1 Answer 1

0

This solved it for me:

sudo xfs_growfs /dev/mapper/centos-root

Not the answer you're looking for? Browse other questions tagged .