28. Mai 2012

Hetzner Root Server with RAID does not Boot after disk swap and re-Installing Grub Bootloader

(I am writing this to pay back to the Web, because it helped me to solve a problem and my post might help someone else.)

Two weeks ago a disk of my Hetzner root server was slowly degrading. I asked for an exchange, got the go from Hetzner support, removed the disk from RAID1. Hetzner installed a new disk and booted up. I added the disk to the RAID, resync, done.

Request Rescue-System
Two weeks later the server just disappeard from the net with all services. No connection possible on any port. No idea, if the earlier disk change was related to this problem. I suppose it was.

Here is what I did to fix it:

Check if it boots into the rescue system

Log in to the Hetzner management site (https://robot.your-server.de/) and enable the rescue-system. Then request an automatic hardware reset.

Connect to the server, log in as root. This means, there is no hardware problem and no persistent routing problem.

Request Hardware-Reset
Just to be sure: request another hardware reset and let it do the normal boot. Trying to connect again fails. This eliminates a temporary routing problem or a switch problem (I once had a switch problem, where after a power outage, the switch needed an "I am here" from the server in order to send packets on the link. The only way to make the server known to the switch was a reset to force a DHCP request during boot.)

I need to know what happens on the console during boot

Asked Hetzner support to attach a LARA remote console. The  console shows the local screen output and accepts keyboard input. It is even possible to re-configure the BIOS.

Request hardware reset and watch the console. I see the memory test, scanning for devices, 2 disks found (fine), then "Booting from local disk"...

Remote console Java applet
Since the disks were found, it must be a problem on the disk. Maybe the bootloader is broken.

Check the file system and the re-install the bootloader

Request the rescue-system and then a hardware-reset. Connect to the rescue system.

Possible to mount the RAID?

# mount /dev/md1 /mnt

Yes. Do a file system check (first umount the file system):

# ummount /mnt
# fsck /dev/md1;

Shows some (many) errors. Fixed them by staying on the "y" key. Could use the auto repair option of fsck (-y).

Re-Install the bootloader

This is a Hetzner installimage-setup, so there should be a grub bootloader. Check for the /boot/grub/ folder. Again mount the RAID.

# mount /dev/md1 /mnt
# ls /mnt/boot/grub

It is there, so there is a good chance, that the bootloader is grub, not lilo. Now re-install grub on the disk. Actually on both disks, just in case one is missing.

Make a chroot environment:

# mount /dev/md1 /mnt
# mount -t none -o bind /dev /mnt/dev
# mount -t proc -o bind /proc /mnt/proc
# mount -t sysfs -o bind /sys /mnt/sys
# chroot /mnt

Grub:

# grub

Look for the file stage1 to find the boot partitions

grub> find /grub/stage1
 (hd0,1)
 (hd1,1)

Install the bootloader on both partitions. Both are regarded as hd0 from the point of view of the bootloader at boot time.

grub> device (hd0) /dev/sda
 device (hd0) /dev/sda
grub> root (hd0,1)
 root (hd0,1)
  Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
 setup (hd0)
  Checking if "/boot/grub/stage1" exists... yes
  Checking if "/boot/grub/stage2" exists... yes
  Checking if "/boot/grub/e2fs_stage1_5" exists... yes
  Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  17 sectors are embedded.
 succeeded
  Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,1)...
 succeeded
 Done.

The same for the other disk

grub> device (hd0) /dev/sdb
grub> root (hd1,1)
grub> setup (hd0)
grub> quit

And reboot - works.

(Maybe my mistake was not to re-install the bootloader after swapping the disk. I expected, that the RAID1 resync would make both disks identical on the sector level. Maybe this assumption is wrong. The fsck problems may also indicate, that the boot sector was affected by disk problems, who knows. These things happen, especially to part time admins.)

_happy_grubbing()

19. Februar 2012

Tech Startups brauchen CTO-Gründer

Was für ein Traum. Ein neuer Gedanke geht um in Silicon Valley. High Tech Startups brauchen einen Gründer als CTO. Aktueller Artikel auf TechCrunch: "In The Future, The Business Founder Will Not Be Ignored".

Ein paar Auszüge:

  • "A startup requires a founder with a deep technical skillset."
  • "So much, in fact, that they can often be funded without the business counterpart."
Schade, dass die deutsche Startup-Szene nicht so weit denkt. Da gilt noch "Hauptsache ein Vertriebsterrier ist dabei, der CTO findet sich schon". Oder wie Clemens von Bergmann vom High-Tech Gründerfonds (HTGF) sich ausdrückte: "Jeder ist ersetzbar". Jetzt entlassen wir erstmal den CTO und das Engineering Team. Huch, der Investor will dann nicht mehr investieren. Komisch. Vielleicht ist die Technik doch wichtig? 

_happy_founding_with_htgf()

1. Februar 2012

Stellenausschreibung Senior Java Entwickler(in)

Ihre Aufgaben:

  • Selbständige Projektarbeit in einem Scrum- Team
  • Entwicklung von webbasierten Anwendungen, Webservices und ggf. nativen Anwendungen
  • Aktive Teilnahme an modernen agilen Entwicklungsprozessen
  • Praktische Arbeit bei der Implementierung als „primus(a) inter pares“
  • Mitarbeit bei der Festlegung der IT-Strategie für die Systeminfrastruktur
  • Aktive Teilnahme an interner Weiterbildung
Ihre Qualifikationen:
  • Erfahrungen im Bereich objektorientierter Entwicklungsmethoden
  • sehr gute Programmierkenntnisse in Java/J2EE , Spring, Hibernate, JPA
  • sicherer Umgang mit CSS, JavaScript, XML, DOM/DHTML, Webservices
  • Erfahrungen in der Datenbankentwicklung (MySQL)
  • Know-How bei Tools wie Subversion, Maven, Eclipse, …
  • Kenntnisse agiler Entwicklungsmethoden wie Scrum und Unit-Testing
  • Idealerweise Erfahrung mit moderner Programmiermethodik wie TDD, SOLID, DRY, KISS
  • Abgeschlossenes Hochschulstudium der Informatik, Naturwissenschaften, Ingenieurwissenschaften oder vergleichbare Qualifikation
  • Mindestens 5 Jahre Berufserfahrung als Java Entwickler
  • 2 Jahre Teamleitung als Lead-Developer/Senior-Developer
  • Sehr gute Programmierkenntnisse und mehrjährige praktische Arbeit in wenigstens 3 aus der Top-10 der Programmiersprachen: z.B. C++, C#, Java, PHP, JavaScript (siehe  http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
  • Praktische Erfahrung mit Scrum als Entwickler, Scrum Master oder PO
  • Sehr gute Deutsch- und gute Englischkenntnisse
Die Deutsche Messe stellt im B2B-Umfeld Kontakt zwischen Herstellern und Interessenten her. Dazu dienen die großen Präsenzmessen CeBIT, HANNOVER MESSE und viele andere. Die Deutsche Messe Interactive, eine Tochter der Deutschen Messe setzt das Business der Messe im Netz fort. Die DMI führt im Auftrag der Deutsche Messe AG Aussteller und Geschäftskunden über seriöse, Internet-basierte Mehrwertdienste zusammen und hilft den Ausstellern, ihre Produkte ganzjährig zu vermarkten sowie den Interessenten, den Kontakt zu vorqualifizierten Herstellern zu finden.

Arbeitsort: Hannover
Beginn: je früher desto besser
Profile an: heiner.wolf@messe-interactive.de

Stellenausschreibung Java Softwareentwickler(in)

Ihre Aufgaben:
  • Selbständige Projektarbeit in einem Scrum- Team
  • Objektorientierte Analyse und Entwurf
  • Entwicklung von webbasierten Anwendungen und Webservices
  • Aktive Teilnahme an modernen agilen Entwicklungsprozessen
Ihre Qualifikationen:
  • Erfahrungen im Bereich objektorientierter Entwicklungsmethoden
  • sehr gute Programmierkenntnisse in Java/J2EE , Spring, Hibernate, JPA
  • sicherer Umgang mit CSS, JavaScript, XML, DOM/DHTML, Webservices
  • Erfahrungen in der Datenbankentwicklung (MySQL)
  • Know-How bei Tools wie Subversion, Maven, Eclipse, …
  • Kenntnisse agiler Entwicklungsmethoden wie Scrum und Unit-Testing
  • Idealerweise Erfahrung mit moderner Programmiermethodik wie TDD, SOLID, DRY, KISS
  • Abgeschlossenes Hochschulstudium der Informatik, Naturwissenschaften, Ingenieurwissenschaften oder vergleichbare Qualifikation
  • Mindestens einjährige Berufserfahrung
  • Sehr gute Deutsch- und gute Englischkenntnisse
Vorteilhaft:
  • Praktische Erfahrung mit Scrum
Die Deutsche Messe stellt im B2B-Umfeld Kontakt zwischen Herstellern und Interessenten her. Dazu dienen die großen Präsenzmessen CeBIT, HANNOVER MESSE und viele andere. Die Deutsche Messe Interactive, eine Tochter der Deutschen Messe setzt das Business der Messe im Netz fort. Die DMI führt im Auftrag der Deutsche Messe AG Aussteller und Geschäftskunden über seriöse, Internet-basierte Mehrwertdienste zusammen und hilft den Ausstellern, ihre Produkte ganzjährig zu vermarkten sowie den Interessenten, den Kontakt zu vorqualifizierten Herstellern zu finden.


Arbeitsort: Hannover
Beginn: je früher desto besser
Profile an: heiner.wolf@messe-interactive.de

30. Januar 2012

Wieder CTO

Ab 1. Februar bin ich CTO bei Deutsche Messe Interactive (DMI).

DMI ist einer Tochter der Deutschen Messe Hannover wo CeBIT, HANNOVER MESSE und viele andere führende Branchenmessen stattfinden.

Ich bin dann Leiter der IT-Abteilung. Die IT-Abteilung macht die IT für eCommerce Geschäftsmodelle mit zig-tausend Partnern der Messe, Media-Service für die großen Messen und B2B Lead-Generation, Shops, Content Management, CRM, Marketing Automation, Entwicklung, System Integration, usw. Tolle Sache das.

_happy_deja_vu()

13. November 2011

Server Migration

Heute stand wieder mal eine Server-Migration an. Die Weblins wurden vom Ein-Server-Testbetrieb zum aktuellen Produktiv-Cluster migriert. Das war meine bisher schönste Migration:

- Server installieren,
- Konfigurationsdaten anpassen,
- Daten migrieren,
- Integrationstests checken,
- DNS umschalten,
- fertig.

Zugegeben, langsam bekomme ich Übung. Angefangen hat alles mit einem Entwicklungsserver. Dann kam das erste Produktiv-System aus 2 Hetzner-Servern. Darauf folgte ziemlich schnell das erste echte Rechenzentrum aus 10 Servern, genannt: der Proton-Cluster. Der wurde dann ausgebaut bis zu 60 Hosts. Vor 2 Monaten habe ich alles auf einem Server installiert als Testbetrieb mit einem simulierten Cluster (genannt Delta). Zwischendurch gab es noch eine Installation des gesamten Systems auf einer VMware. Heute dann die bisher letzte Installation (genannt Atlas) auf mehreren Servern, die sich die ca. 8 Rollen teilen.

Weblin ist ein komplexes System. Viele Subsysteme, zusätzlich zur Website auch noch ein Client und das Instant Message-System. Trotzdem ist es gut handhabbar, läuft stabil und ist flexibel, wie die unterschiedlichen Setups zeigen. Wäre es nicht so gut in Schuss, dann hätte ich es nicht wieder zum Laufen bekommen.

An Weblin Client und Portal haben viele Leute gearbeitet. Bei denen möchte ich mich hier für mich und im Namen der User bedanken: Entwickler im T-Team und iTeam, Research-Team und Praktikanten, Operating und Code-Review, Design und Content, Partner-Integration und Community-Management. Und nicht zuletzt die, die in letzter Zeit mit Rat (=Consulting) und Tat (=Twincoding) geholfen haben.

Ein paar meiner "Learnings":
- Viele gut ausgeprägte Server-Rollen helfen dabei groß (und klein) zu skalieren.
- Konfiguration zentralisieren und das dann durchhalten, wenn viele Rollen und Subsysteme dazukommen.
- Konsequentes Durchziehen einer verteilten Architektur hilft, auch wenn es manchmal mehr Arbeit macht.
- Ausführliche Integrationstests helfen Konfigurationsprobleme aufzuspüren.
- Refactoring hält jung.
- Technische Lösungen nicht ausreizen. Immer noch eine Optimierung in petto haben.
- Ich kann programmieren, deshalb funktionieren für mich eigene Lösungen, z.B. beim Backup (scp, rsync, tar) und beim Setup (svn und Shellskripte). Und das ist auch gut so.

Jetzt sind wir richtig online.

Weblin is back.

Und das ist erst der Anfang.

_happy_migrating()

5. November 2011

Throttling Bandwidth with Linux Tools

As a semi-professional admin I do backups of production systems all the time. This means various "tar", "scp", "rsync" and even "lftp" operations depending on what is to be backup-ed.

The problem: Backup interferes with normal operation

Backup is running at the same time as the normal operation of the production system and the system is already quite busy. Copy and transfer tools take as many resources as they can get from CPU, DMA and network. This usually interferes with the normal server operations and can even bring down the server (thank you DMA).

The solution: Throttling

Many of the tools have a throttling option, which can limit the bandwidth in network transfers and file system operations.

scp:
  • Option -l limits the used bandwidth, specified in Kbit/s. 
  • Example for max 5 MByte/sec: scp -l 40000 myfile $user@$host:
rsync:
  • Option --bwlimit limits I/O bandwidth in KBytes per second. 
  • Example for max 5 MByte/sec: rsync --bwlimit 5000 myfile destfolder 
lftp:
  • Setting "net:limit-rate" limits transfer rate on data connection in bytes per second. 
  • Example for max. 5 MByte/sec: echo "set net:limit-rate 5000000; put myfile" | lftp -u $user,$password $host
Anything else, e.g. tar, use the cstream command:
  • cstream can limit throughput of pipes with option -t in bytes per second.
  • Example for max 5 MByte/sec: tar cf - myfolder | cstream -t -5000k > myfolder.tar
  • Use "-5000k" instead of "5000k" to never exceed the max. Otherwise cstream saves throughput it could not use for later, which may be more bursty.
happy_throttling()