A root server installation from the technician’s point of view
Summary
Manuel Schmitt shows the console output of the in-house installer that manitu used in 2006 to set up root servers automatically. The output runs step by step from partitioning two disks through software RAID and Debian Sarge to the reboot. The comments contain an instructive discussion on whether swap belongs on a RAID 1.
What the output shows
After a safety prompt that requires typing "yes" and a countdown, the program stops existing LVM and MD devices, writes partition tables to /dev/sda and /dev/sdb and creates two software RAIDs: /dev/md0 for swap and /dev/md1 with ext3 for the system.
It then downloads the debian-sarge-minimal image, extracts it, sets the root password, writes fstab and the network configuration, generates SSH host keys and installs GRUB in the master boot record of both disks. Debian 3.1, codenamed Sarge, had been released in June 2005.
Swap on RAID 1 or not
One reader asked why swap sat on a RAID instead of two partitions with equal priority. Another quoted the Software-RAID HOWTO: swap does not need RAID for speed, because the kernel stripes across devices of equal priority by itself. It does for availability, though: if a disk fails while swapped pages sit on it, the system crashes, and swap on RAID 1 prevents that.
Manuel Schmitt added that the configuration shown was an individual customer request and did not necessarily reflect manitu's own recommendation.
Ideas
- A safety prompt with a countdown protects against accidentally overwriting a server.
- Old LVM and RAID devices must be stopped before partitioning.
- With RAID 1, GRUB belongs in the boot sector of every disk.
- Swap on RAID 1 keeps the system running when a disk fails.
- For swap speed alone, several partitions of equal priority suffice without RAID.
- A visible installer console makes progress and errors observable before the target system works.
Insights
- Automated installation needs visible individual steps so that errors can be clearly attributed.
- Redundancy must cover every part: data, swap and boot loader.
- Publicly shown procedures invite experts to check them and improve as a result.
Facts
- According to Manuel Schmitt, the installer was developed entirely in-house.
- Debian 3.1, codenamed Sarge, was released on 6 June 2005.
- According to Manuel Schmitt, the swap configuration shown was a customer request.
- A typo in the output ("configuartion") was corrected after a reader pointed it out.
- The output shown was copied via SSH, not photographed.
References
- Manuel Schmitt on Hostblogger: original article (German)
- The Software-RAID HOWTO: Why RAID? (swap)
- Debian: Debian GNU/Linux 3.1 released (2005)
Remarks
- A later Hostblogger post from 2010 covers in detail why GRUB belongs on every disk of a RAID 1.
Recommendations
- Write the boot loader to every disk of a RAID 1.
- Put swap on RAID 1 if a disk failure must not stop operations.
- Build an explicit confirmation and a countdown into destructive installation scripts.
- Keep serial or remote consoles reachable independently of the production network.
Read the original article on Hostblogger
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.