Developers Club geek daily blog

1 year, 5 months ago
Proxmox VE 4 installation of the root section on unsupported the soft raid1 installer
Starting with version 3.6 in the Proxmox installer there was an installation option on different ZFS Raid options, but did not appear, used by many, a configuration with an arrangement of a root and storage area of disks of virtual computers on program raid an array.
On Habré and in a network there is a set of similar articles, but they are actual for version 3,6, and in version 4.0 several interesting nuances appeared. Besides in this instruction I will approach a solution of this task absolutely some other way.


Nuances


1. The Proxmox installer of the 4th version puts to us efi the loader and I do not see a method as it to reserve software of raid with the help — if someone knows — share.
2.Proxmox 4.0 it is built on Debian 8, and in it there is the known bug — at start of system arrays do not gather if in it one of disks took off. Do not gather at all and the option "bootdegraded=1" does not work
3. Having considered points 1 and 2 to me it was thought and why to us to govern something for instyallyatorm Proxmox when we can quietly deliver to Debian 8 as it is necessary to us, and already atop to set Proxmox. This deal will also be considered in the instruction.

We put Debian 8


I think with disk neinst you will cope with the Debian 8 minimal installation.
We do all settings as it is necessary to you, we will consider only breakdown of disks:
— disks at me with the partition table in GPT
— we select the section of 1 MB and we mark out him as bios boot
— we select the remained space in the section for an array
— we collect md0 array
— over an array we start up LVM
— we create LV at the roots and a swap

We check a bug — we pull out any of disks, members of an array, and we are loaded. We are not loaded more correct because the loader cannot find LVM with the root section because the array on which this LVM also lies did not gather.

We repair assembly of an array when loading


I put grub on both sections at installation if you did not make it:
# dpkg-reconfigure grub-pc


We impose a 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 as the patch works and to be loaded with the pulled-out disk — on forget then it to return back to an array:
# mdadm --add /dev/md0 /dev/sda2


We put Proxmox


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


We add in / etc/apt/sources.list
deb http://download.proxmox.com/debian jessie pve-no-subscription


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


We are updated:
# apt-get update &&apt-get dist-upgrade


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


At installation in /etc/apt/sources.list.d/pve-enterprise.list the commercial repository will register if there is no subscription — we will comment out it.

We reboot and use.

This article is a translation of the original post at habrahabr.ru/post/273391/
If you have any questions regarding the material covered in the article above, please, contact the original author of the post.
If you have any complaints about this article or you want this article to be deleted, please, drop an email here: sysmagazine.com@gmail.com.

We believe that the knowledge, which is available at the most popular Russian IT blog habrahabr.ru, should be accessed by everyone, even though it is poorly translated.
Shared knowledge makes the world better.
Best wishes.

comments powered by Disqus