Extend disk space on OVA 4.11

I use OVA and 4.11 Graylog. Trying to expand LVM drive and every time it fails after reboot.

Grub goes to rescue mode and Grub error ‘lvmid/xxx’ not found.

I tried every possible grub recovery, made new grub, add script to activate lvm faster, recreated device map, deleted completely boot/grub and recreated it - every time it fails the same way.

Looks like normal extend of LVM does not work in this case.

What is the best way to extend disk space ?

Hey there, I’m kind of curious about this:

There’s no 4.11 release of Graylog, only 4.1.1, which is what I’m assuming you meant. In which case, we stopped publishing the OVA. The OVA is categorically not something we recommend using in production. It’s really only suitable for testing Graylog.

Among the reasons that it’s not recommended for production use is that it’s not a hardened image, nor has it been tuned to accommodate whatever volume of traffic you may be putting through it.

With that out of the way, can you provide the community with the steps you went through to try and extend the disk so that we can understand the approach you took and spot any potential misconfiguration?

2 Likes

Hi, sorry missed one dot. Yes it is 4.1.1.
Oh I was not aware that is not recommended for the production.
So you answered my question, I will reinstall using supported operating system.

As you know, OVA got HDD which is about 20 GB.
Ok so what I did:

  1. Checked what LVM setup looks like

root@graylog:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda1 graylog-vg lvm2 a-- <19.53g 0

root@graylog:~# vgs
VG #PV #LV #SN Attr VSize VFree
graylog-vg 1 2 0 wz–n- <19.53g 0

root@graylog:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root graylog-vg -wi-ao---- 18.57g
swap_1 graylog-vg -wi-ao---- 980.00m

As you can see it is pretty simple.

  1. Added new HDD to VM.
  2. Created Linux LVM partition using fdisk /dev/sdb
  3. Created new PV pvcreate /dev/sdb1
  4. Extended VG vgextend graylog-vg /dev/sdb1
  5. Extended LV lvmextend -L +200G /dev/graylog-vg/root
  6. Resized FS resize2fs /dev/graylog-vg/root
    Everything finished with success.
    I can see that new size is 220GB, there are no Free PE (number is 0)
    VG and LG is extended by 200 GB.

After reboot, grub goes into rescue mode saying that cannot find LVM boot drive.
When making ls I can see lvm graylog-vg, but cannot see files, folders etc.

I run rescue mode, triple checked /boot configs. ID of the LVM is correct, files are there.
I recreate initramfs and update grub entries, checked kernels, paths, LVM IDs, PV, VG IDs. everything is correct and lvm modules are loaded and saved into boot and grub and initramfs etc.
I used grub recovery and repairing tools, everything finished with success but still cannot boot.

I did it on another, clean install ubuntu and the same steps worked just fine.
It crashes only on this Graylog image and I do not have idea why.

Anyway, I will stop using it.

I just saw that there are many topics and people are looking for answers how to do it and got the same problem.

Try to recreate grub file after resize LVM on running system:

  • Run update-grub
  • Or grub-mkconfig -o /boot/grub/grub.cfg
1 Like

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