D
D
Daniil Muidinov2016-05-12 17:47:24
linux
Daniil Muidinov, 2016-05-12 17:47:24

How to increase Physical volumes (LVM) after disk expansion in VMware?

Good afternoon.
There is VMware and guest CentOS 6
On the guest OS, a virtual disk was initially added
and the following was done
pvcreate /dev/sdb
vgextend VolGroup /dev/sdb
lvcreate -l 100%FREE -n lv VolGroup
mkfs.xfs /dev/VolGroup/lv
Then it was extended the added disk (sdb)
fdisk sees the new size, but pvscan shows the old size
cfdisk and fdisk sees the entire disk as unallocated
How now to expand Physical volumes from sdb to the full size of the disk without deleting the existing data?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
landergate, 2016-05-12
@DANic

Expand physical volume to maximum:
pvresize /dev/sdb
Check if the volume size has changed:
pvdisplay
Check if "Free PE / Size" has appeared:
vgdisplay
Resize the logical volume using the maximum available space:
lvextend -l +100%FREE /dev/VolGroup/lv
Resize the file system taking into account the new space:
xfs_growfs /

N
Nikolay Baranenko, 2019-09-13
@drno-reg

history if you increased an existing HDD Unit in VMWare,
we are looking for which physical partition will be used to expand it,
we stretch
it, we see that there is free space

pvdisplay
vgdisplay

pull out section
fix
check
df -h

I
inkva, 2022-03-14
@inkva

parted
print
resizepart 1-3
q
and only then pvresize

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question