Problem: Proxmox see duplicated disks instead of one. And cannot boot from it (LVM fails).
Even if multipath-tools-boot is installed and initramfs is updated(as well as grub config).
Cause: possibly initramfs scripts order is broken (thus multipath is not ready yet and LVM can see only duplicated disks)
Solution: Join all necessary steps in one quick custom script and rebuild initramfs with it.
Even if multipath-tools-boot is installed and initramfs is updated(as well as grub config).
Cause: possibly initramfs scripts order is broken (thus multipath is not ready yet and LVM can see only duplicated disks)
Solution: Join all necessary steps in one quick custom script and rebuild initramfs with it.
- Create file /etc/initramfs-tools/scripts/local-top/forcelvm with following content
#!/bin/sh
# See man INITRAMFS-TOOLS(8). Section HEADER. # https://manpages.debian.org/jessie/initramfs-tools/initramfs-tools.8.en.html PREREQ="" prereqs() { echo "$PREREQ" } case $1 in prereqs) prereqs exit 0 ;; esac . /scripts/functions # Begin real processing below this line # Load driver for your HBA /sbin/modprobe qla2xxx # Load device-mapper multipath support /sbin/modprobe dm_multipath # Start multipath # WARNING!!! Your /etc/multipath.conf, /etc/multipath/bindings should be configured prior to this! /sbin/multipath -v3 /sbin/multipath -ll # Check how it works. To debug blkid sleep 5 vgchange -ay if [ -x /sbin/kpartx -a -x /sbin/dmsetup ]; then /sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a -p -part" >/dev/null fi # tmp. Checking again #tmp_my_debug=`blkid` #echo $tmp_my_debug # To debug initramfs: # You can boot your kernel with "debug" option # and then check /run/initramfs/initramfs.debug after boot # https://wiki.debian.org/InitramfsDebug # N.B. Useful commands when dropped into the initramfs shell: # blkid, multipath -v3, multipath -ll, vgchange -ay and "exit" ;)
- Make it executable
chmod +x /etc/initramfs-tools/scripts/local-top/forcelvm
- Rebuild your initramfs:
sudo update-initramfs -u -k all
- Rebuild your grub cfg:
sudo update-grub
apt-get install multipath-tools-boot
ReplyDeleteworked for me on proxmox 6.4 without this script.