0

I have CentOS 7 at VM and I want to merge /dev/sda3 with /dev/sda4 (recently created PV). Output of fdisk -l listed below:

Disk /dev/sda: 24.7 GB, 24696061952 bytes, 48234496 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: 0x0009c749

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      411647      204800   83  Linux
/dev/sda2          411648     1460223      524288   82  Linux swap / Solaris
/dev/sda3         1460224    41058303    19799040   83  Linux
/dev/sda4   *    41058304    48234495     3588096   8e  Linux LVM

But when Im trying to check VG it leads to nothing:

[root@server1 ~]# vgs
[root@server1 ~]# vgdisplay

Output of df -h:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        19G   17G  640M  97% /
devtmpfs        2.8G     0  2.8G   0% /dev
tmpfs           2.8G     0  2.8G   0% /dev/shm
tmpfs           2.8G  8.8M  2.8G   1% /run
tmpfs           2.8G     0  2.8G   0% /sys/fs/cgroup
/dev/sda1       190M  135M   42M  77% /boot
tmpfs           566M     0  566M   0% /run/user/600
tmpfs           566M     0  566M   0% /run/user/0

What I have to do?

2 Answers 2

0

Based on the output of commands, it looks like you do not have any Volume group set up. You current root filesystem is just based on normal non-lvm partition, /dev/sda3.

You would need to migrate your existing non-LVM partition to LVM partition, if it has enough space. Your /dev/sda4 does not seem to be big enough. If you are able to add additional disk, with at least same size as current /dev/sda3, you can use this procedure for partition migration:

https://www.thegeekdiary.com/centos-rhel-converting-an-existing-root-filesystem-to-lvm-partition/

0

So, I extended size of mounted virtual disk in my hyper-v, then boot livecd CentOS and resized sda3 with unmapped space. Seems easy, but hard to figure out to novice.

You must log in to answer this question.

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