How do I extend my lvm partition?

Hi all,

On my freepbx I added 50GB to /dev/sdb

**[root@pbx1-ams-central efixvpbx]# lsblk
**fd0 2:0 1 4K 0 disk
**sda 8:0 0 70G 0 disk
**├─sda1 8:1 0 300M 0 part /boot
**├─sda2 8:2 0 67.5G 0 part /
**└─sda3 8:3 0 2G 0 part [SWAP]
**sdb 8:16 0 90G 0 disk
**└─freepbx_vg-monitor 253:0 0 40G 0 lvm /var/spool/asterisk/monitor
**sr0 11:0 1 1024M 0 rom

so, now I have 50GB allocated and 40GB used by freepbx_vg-monitor= 90GB total.

I want to extend └─freepbx_vg-monitor with the allocated 50GB. I tried

vgextend freepbx_vg /dev/sdb as well as lvextend -L +50G /dev/freepbx_vg/monitor
but no free space there to use.

VG #PV #LV #SN Attr VSize VFree
freepbx_vg 1 1 0 wz–n- <40.00g 0

Please assist if you can, thanks in advance.

hi @dorbe,

This guide will help you, since you need to know what is the space that actually left on the new partition.

Thank you,

Daniel Friedman
Trixton LTD.

1 Like

Thank you!

Resolved with:

pvresize /dev/sdb

lvextend -l +100%FREE /dev/mapper/freepbx_vg-monitor

resize2fs /dev/mapper/freepbx_vg-monitor

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.