0

I have little mistake on configuration with LVM partions. It is virtual machine in esxi.

  • I need extend LogVol01 in vg_vmm02.
  • /dev/sdc was extended in hypervisor to 10GB (from 5).
  • Problem is that I forgot create sdb1 or sdc1 via fdisk before, so LVM partion is created directly on /dev/sdc
  • In fdisk /dev/sdc now I cant add new partition, because fdisk want primary rewrite parts from start of sdc
  • in vgdisplay I can't see any free space
  • via Partition Magic live cd with gui I can't expand lvm too.

What is the best way fix it and use 5GB of free space from sdc? Thanks

lsblk
NAME                         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0                           11:0    1  624M  0 rom
sda                            8:0    0   40G  0 disk
├─sda1                         8:1    0  200M  0 part /boot
├─sda2                         8:2    0 37.9G  0 part
│ ├─vg_vmm02-LogVol00 (dm-0) 253:0    0 11.8G  0 lvm  /
│ └─vg_vmm02-LogVol01 (dm-1) 253:1    0 41.1G  0 lvm  /www
└─sda3                         8:3    0    2G  0 part [SWAP]
sdb                            8:16   0   10G  0 disk
├─vg_vmm02-LogVol00 (dm-0)   253:0    0 11.8G  0 lvm  /
└─vg_vmm02-LogVol01 (dm-1)   253:1    0 41.1G  0 lvm  /www
sdc                            8:32   0   10G  0 disk
└─vg_vmm02-LogVol01 (dm-1)   253:1    0 41.1G  0 lvm  /www


vgdisplay
  --- Volume group ---
  VG Name               vg_vmm02
  System ID
  Format                lvm2
  Metadata Areas        3
  Metadata Sequence No  11
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                3
  Act PV                3
  VG Size               52.84 GiB
  PE Size               4.00 MiB
  Total PE              13527
  Alloc PE / Size       13527 / 52.84 GiB
  Free  PE / Size       0 / 0
  VG UUID               LmLmD1-ucp9-Pj3G-Po7W-s9bq-GMQ6-7jFErM
0

You need to pvresize /dev/sdc, then a vgs will show free space that you can assign to the specific logical volume.

As always, take a snapshot/backup first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.