📜 ⬆️ ⬇️

Proxmox VE 4 install root partition on unsupported installer soft raid1


Starting with version 3.6, the Proxmox installer has the option to install on various ZFS Raid options, but the configuration used by many with the location of the root and storage area of ​​virtual machine disks on the software raid array did not appear.
On Habré and the network there are many similar articles, but they are relevant for version 3.6, and in version 4.0 appeared some interesting nuances. In addition to this, in this manual I will approach the solution of this problem in a completely different way.


Nuances


1.Installer Proxmox 4th version puts us efi bootloader and I do not see a way to backup it using raid software - if someone knows, share it.
2.Proxmox 4.0 compiled on Debian 8, and there is a known bug in it - when starting the system, arrays are not collected if one of the disks crashes in it. The “bootdegraded = 1” option is not collected at all and does not work.
3. Having considered points 1 and 2, I thought, why should we edit something behind the Proxmox installer, when we can safely install Debian 8 as we need, and then install Proxmox on top. This alignment will be discussed in the instructions.

We put Debian 8


I think installing Debian 8 minimal with the neinst disk you can handle.
We do all the settings as you need, we consider only the disk layout:
- I have disks with a partition table in GPT
- select section 1 MB and mark it as bios boot
- select the remaining space in the section under the array
- we collect md0 array
- let LVM be over the array
- create LV under the root and swap
')
Checking the bug - pulling out any of the disks, members of the array, and boot. Rather, we do not boot, because the bootloader cannot find the LVM with the root partition, because the array on which this very LVM is not built is not built.

UPD in Debian 8.5, the bug has already been repaired and there is no need to patch the patch (or rather, it could have been fixed before, but it was checked for 8.5)

We fix the assembly of the array when loading


I put grub on both sections during installation, if you did not:
# dpkg-reconfigure grub-pc 


Patch patch:
 cd /etc/initramfs-tools/scripts/local-top cp /usr/share/initramfs-tools/scripts/local-top/mdadm . patch --verbose --ignore-whitespace <<'EndOfPatch' --- mdadm +++ mdadm @@ -76,7 +76,15 @@ if $MDADM --assemble --scan --run --auto=yes${extra_args:+ $extra_args}; then verbose && log_success_msg "assembled all arrays." else - log_failure_msg "failed to assemble all arrays." + log_warning_msg "failed to assemble all arrays...attempting individual starts" + for dev in $(cat /proc/mdstat | grep md | cut -d ' ' -f 1); do + log_begin_msg "attempting mdadm --run $dev" + if $MDADM --run $dev; then + verbose && log_success_msg "started $dev" + else + log_failure_msg "failed to start $dev" + fi + done fi verbose && log_end_msg EndOfPatch 

We update a config:
 update-initramfs -u 


Attention: if you check how the patch works and boot up with the disc pulled out, then forget to return it back to the array:
 # mdadm --add /dev/md0 /dev/sda2 


We put Proxmox


We bring / etc / hosts to the form:
 127.0.0.1 localhost.localdomain localhost 123.456.789.1 myproxmox.mydomain.ru myproxmox pvelocalhost 


Add to /etc/apt/sources.list
 deb http://download.proxmox.com/debian jessie pve-no-subscription 


Add a digital signature:
 # wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add - 


Updating:
 # apt-get update && apt-get dist-upgrade 


Install Proxmox:
 # apt-get install proxmox-ve ntp ssh postfix ksm-control-daemon open-iscsi 


When installing in /etc/apt/sources.list.d/pve-enterprise.list, a commercial repository will be added; if there is no subscription, we will comment it out.

Reboot and use.

Source: https://habr.com/ru/post/273391/


All Articles