Use stable instead of squeeze in a couple of places
[mirror/dsa-wiki.git] / input / howto / install-ganeti.creole
index ddab5df..3af7113 100644 (file)
@@ -4,7 +4,7 @@
 
 Suppose that there are two identical hosts: foo.debian.org and bar.debian.org.
 
-They are running squeeze and have been integrated into Debian infrastructure.
+They are running stable and have been integrated into Debian infrastructure.
 
 They will serve as nodes in a ganeti cluster named foobar.debian.org.
 
@@ -36,7 +36,7 @@ The following DNS records exist:
 On each node, install the required packages:
 
 {{{
-    # maybe: apt-get install drbd8-utils
+    # maybe: apt-get install drbd-utils
     # maybe: apt-get install ganeti-instance-debootstrap
     apt-get install ganeti2 ganeti-htools qemu-kvm
 }}}
@@ -412,3 +412,58 @@ echo "$WWN" | sed -re 's#(.{6})(.{6})0000(.{2})(.*)#36\1000\2\3\4#'
 
   This will update the multipath config on all cluster nodes. WITHOUT doing this, you can't migrate VMs between nodes.
 }}}
+
+** Remove LUNs.
+
+Order is important, or else things get very, very confused and the world needs a reboot.
+
+*** Make sure nothing uses the volume anymore.
+
+*** Make sure we do not have any partitions lying around for it:
+{{{
+  gnt-cluster command "ls -l /dev/mapper/backuphost*"
+  # and maybe:
+  gnt-cluster command "kpartx -v -p -part -d /dev/mapper/backuphost"
+}}}
+
+*** flush the device, remove the multipath mapping, flush all backing devices:
+{{{
+  root@bm-bl1:~# cat flush-mp-device 
+  #!/bin/sh
+
+  dev="$1"
+
+  if [ -z "$dev" ] || ! [ -e "$dev" ]; then
+    echo 2>&1 "Device $dev does not exist."
+    exit 1
+  fi
+
+  devs=$(multipath -ll "$dev" | grep cciss | sed -e 's/.*cciss!//; s/ .*//;')
+
+  if [ -z "$devs" ]; then
+    echo 2>&1 "No backends found for $dev."
+    exit 1
+  fi
+
+  set -e
+
+  blockdev --flushbufs "$dev"
+  multipath -f "$dev"
+  for d in $devs; do
+    blockdev --flushbufs "/dev/cciss/$d"
+  done
+  echo done.
+}}}
+{{{
+  gnt-cluster command "/root/flush-mp-device /dev/mapper/backuphost"
+}}}
+
+*** Immediately afterwards, paste the output of the following to the MSA console.  Best prepare this before, so you do it quickly before anything else rescans stuff, reloads or restarts multipathd, and the devices become used again.
+{{{
+  for bl in 1 2 3 4 5 6 ; do for p in 1 2 3 4; do echo "unmap volume DECOMMISSION-backuph host bm-bl$bl-p$p" ; done ; done
+}}}
+
+*** Lastly, rescan the scsi bus on all hosts.  Do not forget that.  hpacucli and the monitoring tools might lock up the machine if they try to check the status of a device that now no longer exists but that the system still thinkgs is around.
+{{{
+  gnt-cluster command "echo 1 > /sys/bus/pci/devices/0000:0e:00.0/cciss0/rescan"
+}}}