CentOS 7 XFS disk resizing

Couldn’t find any article that explained step by step how to resize the main disks volume in a CentOS 7 vm. In my example I started witha single disk of 8GB and expanded to 20GB. I have two partitions on disk sda

sda1 type Linux for boot
sda2 type Linux LVM for the remaining logical volumes

Space utilisation as following:

[root@vcd-c1-s1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.8M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/centos-root 6.2G 1.9G 4.4G 31% /
/dev/sda1 1014M 179M 836M 18% /boot
tmpfs 783M 0 783M 0% /run/user/0

We basically need to: Continue reading “CentOS 7 XFS disk resizing” »


Extend/Reduce LVM’s (Logical Volume Management) in Linux

My Server Setup – Requirements

  1. Operating System – CentOS 6.5 with LVM Installation
  2. Server IP –

How to Extend Volume Group and Reduce Logical Volume

Logical Volume Extending

Currently, we have One PV, VG and 2 LV. Let’s list them one by one using following commands.

# pvs
# vgs
# lvs

Logical Volume Extending

Logical Volume Extending

Continue reading “Extend/Reduce LVM’s (Logical Volume Management) in Linux” »


Ubuntu Server 18.04 LVM out of space with improper default partitioning

Problem Statement:

I installed Ubuntu Server 18.04 with the LVM option and left the default partition setup. Now my main drive only has 4GB in a 1TB hard drive. How can I fix this without starting from scratch?

Results of df -h :

Filesystem Size Used Available Use% Mounted on
udev 16G 0 16G 0% /dev
tmpfs 32G 1.7M 32G 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 3.9G 3.6G 92M 98% / 
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/loop0 87M 87M 0 100% /snap/core/4917
/dev/loop1 3.2M 3.2M 0 100% /snap/stress-ng/471
/dev/loop2 90M 90M 0 100% /snap/core/6130
/dev/sda2 976M 143M 766M 16% /boot
tmpfs 3.2G 0 3.2G 0% /run/user/1000

Resolution: Continue reading “Ubuntu Server 18.04 LVM out of space with improper default partitioning” »