2.3 to 3.0 upgrade kernel 2.6.32-20 can't find pve volume group

A

asterix

Guest
Hello!

After correctly upgrading from Proxmox VE 2.3 to 3.0 I used the optional --purge command and rebooted the server.
After reboot the server picked the kernel 2.6.32-20 but can't find the volume group "pve" and is unable to find the pve/root LVM volume.

The /proc/cmdline states:
BOOT_IMAGE=/vmlinuz-2.6.32-20-pve root=/dev/mapper/pve-root ro quiet

Rebooting and selecting the same kernel in recovery ends up in the same place.

So I rebooted and selected the 2.6.32-19 and all worked out, so I'm running the server with it.
root@vs0:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 10M 0 10M 0% /dev
tmpfs 370M 400K 370M 1% /run
/dev/mapper/pve-root 95G 1.2G 89G 2% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 740M 3.1M 737M 1% /run/shm
/dev/mapper/pve-data 803G 443G 360G 56% /var/lib/vz
/dev/md0 495M 133M 337M 29% /boot
/dev/fuse 30M 16K 30M 1% /etc/pve
/var/lib/vz/private/100 500G 403G 98G 81% /var/lib/vz/root/100
varrun 512M 440K 512M 1% /var/lib/vz/root/100/var/run
varlock 512M 0 512M 0% /var/lib/vz/root/100/var/lock


After some reboots I realized GRUB was also saying it couldn't find some files...

Does anyone had the same issue or has any clues to solve this?

Thanks!
 
It is a bad idea to use "purge" if you installation require additional packages like software RAID (/dev/md0). Seem you use a customized installation, so I cannot say what packages are required.
 
Thanks for the feedback. Indeed I installed software RAID...
So I checked for the custom packages removed during purge and found mdadm, so I apt-get it but still no good. Jóquei tribunal can't find some dll.
I was thinking on changing the storage layout, so I guess I'll do it now and start with a fresh install.
There's another thread made by mystique (I think) that had successfully purged and reinstalled mdadm without any issue, so I might give another try to recover the system. If so, I'll post the solution.
Thanks.
 
OK!

So here I am again...

Found a blog on reinstalling grub to a software RAID setup (on RHEL...)[1] and almost worked out.
I have to do some research and adapt it a little bit to fit the proxmox setup.

My setup:
RAID on /dev/md0 puts together (/dev/sda1 and /dev/sdb1) to do the /boot
RAID on /dev/md1 puts together (/dev/sda2 and /dev/sdb2) to do the pve LVM: /dev/pve/swap, /dev/pve/root and /dev/pve/data

So I booted with GRML-64bits USB (always on my backpack!) and:
1. Activate RAID
mkdir /etc/mdadm
mdadm --examine --scan > /etc/mdadm/mdadm.conf
mdadm -A --scan

2. Activate LVM
lvm pvscan
lvm vgscan
lvm lvscan
lvm vgchange -ay

3. Mount /root, /dev and /proc
mkdir /mnt/sysimage
mount /dev/pve/root /mnt/sysimage
mount -o bind /dev /mnt/sysimage/dev
mount -o bind /proc /mnt/sysimage/proc

4. chroot into proxmox /root
chroot /mnt/sysimage /bin/bash

5. Mount /boot and install grub
mount /dev/md0 /boot
update-grub
[Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-20-pve
Found initrd image: /boot/initrd.img-2.6.32-20-pve
Found linux image: /boot/vmlinuz-2.6.32-19-pve
Found initrd image: /boot/initrd.img-2.6.32-19-pve
Found linux image: /boot/vmlinuz-2.6.32-11-pve
Found initrd image: /boot/initrd.img-2.6.32-11-pve
Found memtest86+ image: /memtest86+.bin
Found memtest86+ multiboot image: /memtest86+_multiboot.bin
done]

root@grml:/# grub-install /dev/sda
Installation finished. No error reported.
root@grml:/# grub-install /dev/sdb
Installation finished. No error reported.

6. Reboot
Unmount and deactivate all and...
Fingers crossed...
reboot


All went OK!
And proxmox is now fully upgraded. (and a little bit of my skills) ;)

Hope this help anyone as clumzy as I.
(READ CAREFULLY AND THINK BEFORE PURGE IF YOU INSTALLED ANYTHING TO PROXMOX!!) ;)

Thanks and Cheers.

[1] http://blog.mydream.com.hk/howto/linux/howto-reinstall-grub-in-rescue-mode-while-using-lvm-mdadm
 
If you're able to boot off a linux (any distro) USB stick or DVD you can chroot into the environment and re-install mdadm:

1) Boot to the live-distro
2) If the packages aren't already there, install mdadm
3) Mount your Proxmox partitions (I assume you're mounting the proxmox root partition at /mnt)
4) Get into the new environment by running:
Code:
mount -o bind /proc /mnt/proc && mount -o bind /dev /mnt/dev && cp /etc/resolv.conf /mnt/etc && chroot /mnt /bin/bash
5) You'll now be in your proxmox environment;if the bootable distro setup networking you'll have internet access otherwise you'll need to do that manually and then can install mdadm
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!