Alexandros Kosiaris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/213958

Change subject: Setup ganeti100X with RAID1
......................................................................

Setup ganeti100X with RAID1

Finally have an almost working partman configuration

Change-Id: I2797a6e87f35002aeab3edbb14c3da5b4cfa7a3c
---
M modules/install-server/files/autoinstall/netboot.cfg
A modules/install-server/files/autoinstall/partman/ganeti-raid1.cfg
2 files changed, 88 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/213958/1

diff --git a/modules/install-server/files/autoinstall/netboot.cfg 
b/modules/install-server/files/autoinstall/netboot.cfg
index 558c832..9545e63 100755
--- a/modules/install-server/files/autoinstall/netboot.cfg
+++ b/modules/install-server/files/autoinstall/netboot.cfg
@@ -59,7 +59,8 @@
                cp[1234][0-9][0-9][0-9]) echo partman/varnish.cfg ;; \
                d-i-test) echo partman/flat.cfg ;; \
                
antimony|arsenic|caesium|erbium|gadolinium|heze|magnesium|neodymium|oxygen|palladium|promethium|rubidium|strontium|terbium)
 echo partman/lvm.cfg ;; \
-               ganeti[12]00[0-9]) echo partman/ganeti.cfg ;; \
+               ganeti100[1-9]) echo partman/ganeti-raid1.cfg ;; \
+               ganeti200[1-9]) echo partman/ganeti.cfg ;; \
                graphite[12]001) echo partman/graphite.cfg ;; \
                graphite1002) echo partman/graphite-dmcache.cfg ;; \
                lvs[1-6]|lvs[12]00*) echo partman/flat.cfg ;; \
diff --git a/modules/install-server/files/autoinstall/partman/ganeti-raid1.cfg 
b/modules/install-server/files/autoinstall/partman/ganeti-raid1.cfg
new file mode 100644
index 0000000..c0e1901
--- /dev/null
+++ b/modules/install-server/files/autoinstall/partman/ganeti-raid1.cfg
@@ -0,0 +1,86 @@
+# configuration to create:
+#  * software RAID1
+#  * 500M on /boot outside of LVM
+#  * LVM: 40G PV/VG named local containing:
+#  ** 30G / LV
+#  ** 8G swap Lv
+#  * A HUGE swap on RAID. That's a trick to trick partman into creating
+#  a second RAID1 device that will be not used but wil be manually destroyed
+#  after installation. I could not make partman create an unused LVM PV on the
+#  second RAID group
+
+d-i    partman-auto/method     string raid
+d-i    partman-auto/disk       string /dev/sda /dev/sdb
+
+# Do force a new label
+d-i    partman/confirm_write_new_label boolean true
+
+# wipe md RAID
+d-i    partman-md/device_remove_md     boolean true
+d-i    partman-md/confirm_nooverwrite  boolean true
+
+# the install makes sure we want to wipe the lvm
+d-i    partman-lvm/device_remove_lvm   boolean true
+d-i    partman-lvm/confirm             boolean true
+d-i    partman-lvm/confirm_nooverwrite boolean true
+
+# Confirm partman-md
+d-i    partman-md/confirm              boolean true
+d-i    partman/confirm_nooverwrite     boolean true
+d-i    partman/choose_partition        select finish
+
+d-i    partman-auto-lvm/new_vg_name    string local
+d-i    partman/confirm                 boolean true
+
+# Define physical partitions
+d-i    partman-auto/expert_recipe      string  ganetiraid :: \
+               500     500     500     raid            \
+                       $primary{ }                     \
+                       $bootable{ }                    \
+                       $lvmignore{ }                   \
+                       method{ raid }                  \
+               .                                       \
+               40000   40000   40000   raid            \
+                       $primary{ }                     \
+                       $lvmignore{ }                   \
+                       method{ raid }                  \
+               .                                       \
+               3000    1000000 -1      raid            \
+                       $primary{ }                     \
+                       $lvmignore{ }                   \
+                       method{ raid }                  \
+               .                                       \
+               30000   30000   30000   ext3            \
+                       $lvmok{ }                       \
+                       $defaultignore{ }               \
+                       method{ format }                \
+                       format{ }                       \
+                       use_filesystem{ }               \
+                       lv_name{ root }                 \
+                       in_vg{ local }                  \
+                       filesystem{ ext4 }              \
+                       mountpoint{ / }                 \
+               .                                       \
+               8000    8000    8000    linux-swap      \
+                       $lvmok{ }                       \
+                       $defaultignore{ }               \
+                       method{ swap }                  \
+                       format{ }                       \
+                       lv_name{ swap }                 \
+                       in_vg{ local }                  \
+               .
+
+# Parameters are:
+# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> \
+#      <devices> <sparedevices>
+d-i    partman-auto-raid/recipe        string          \
+               1       2       0       ext3    /boot   \
+                       /dev/sda1#/dev/sdb1             \
+               .                                       \
+               1       2       0       lvm     -       \
+                       /dev/sda2#/dev/sdb2             \
+               .                                       \
+               1       2       0       swap    -       \
+                       /dev/sda3#/dev/sdb3             \
+               .
+d-i    partman-auto-lvm/guided_size    string 80%

-- 
To view, visit https://gerrit.wikimedia.org/r/213958
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2797a6e87f35002aeab3edbb14c3da5b4cfa7a3c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to