Category Archives: Hardware

How To Configure Software RAID To Send An Email When Something’s Wrong With RAID

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>
Last edited 12/12/2008

This short guide explains how you can configure software RAID to send you an email when something’s wrong with RAID, for example if a hard drive fails. I’ve tested this on Debian Etch, but it should apply to all other distributions with minor adjustments to paths, etc.



dmidecode: Finding Out Hardware Details Without Opening The Computer Case

dmidecode is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware.


How To Repair MySQL Replication

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>

If you have set up MySQL replication, you probably know this problem: sometimes there are invalid MySQL queries which cause the replication to not work anymore. In this short guide I explain how you can repair the replication on the MySQL slave without the need to set it up from scratch again.

I do not issue any guarantee that this will work for you!


How To Virtualise A Physical Linux Machine

This tutorial shows how you can virtualize a physical Linux machine. It is intended not only for virtualisation, but for any relocation of a RedHat Linux based system from one machine to another.

Here are the steps to be completed:

1. Install a virtualisation software on the desired machine.

2. Create an empty virtual machine with enough disk space, selecting the OS you’re going to migrate.

3. Download a Linux Live-CD ISO (e.g. Knoppix).

4. Burn one copy on a CD and then copy the ISO to the virtualisation server (the host).

5. Reboot the original Linux box (the physical machine that you want to virtualize) with the CD you’ve just burnt, and connect the ISO to the newly created virtual machine (i.e., boot the VM from the ISO).

6. Check both live CDs have net connection correctly configured and that they can see each other.

7. In the virtual machine, type this:

nc -l -p 10000 | dd of=/dev/hda

8. On the machine you’re migrating, type:

dd conv=noerror if=/dev/hda | nc $IP_OF_THE_VM 10000

9. Wait until dd finishes its job and do a clean reboot of the virtual machine.

10. Boot in rescue mode with the distro’s first CD or DVD and chroot to the new system (on the virtual machine).

11. Run kudzu to remove old devices and find the new ones (or manually edit your /etc/modules.conf file, which is the most important since it includes your scsi-device). For SuSE Linux systems, you may need to run yast to discover the new hardware.

12. Create a new init using mkinitrd on your kernel version. Example:

/sbin/mkinitrd -v -f /boot/initrd-2.6.20-1-new.img 2.6.20-1

13. Edit your /boot/grub/menu.lst file to boot your newly created initrd image.

14. Keep your fingers crossed and reboot your VM.

Redundant Array Of Inexpensive Disks (RAID) – Technical Paper

Arvind Kumar
May 2008
Version 1.0

1. Introduction

1.1 Background:

The storage capacity and data retrieval speeds of Hard Disks have increased multiple folds in last few years. However for large business organizations, which not only need to store terabytes of invaluable data but access them frequently as well. These organizations cannot afford to let their systems go offline even for a short duration of time. Moreover they cannot even think of loosing even small amount of data due to disk failure or for that matter any other reason.

1.2 Issues:

A single hard disk cannot fulfill all these requirements no matter how large is the storage capacity or how good the performance and quality of disk is. The need here arises of a system that can store large volumes of data, provides fault tolerance, scalable in terms of increasing storage capacity and above all that can be reliable.

1.3 Solution:

RAID – Redundant Array of Inexpensive Disks, system solves most of the above stated problems. The idea behind RAID is usage of multiple independent hard disks, such that they appear to be a single large disk to the user of system, but at the same time provide faster access and data protection. RAID can be implemented in a number of ways depending on the type of application and environment where they are intended to be used. However every innovation that eases our problems comes with an added cost and complexity. But as stated, no one wants to loose their data which is invaluable as compared to the cost spend for implementing RAID.

1.4 Types of RAID:

RAID can be implemented as Hardware or Software. A hardware RAID system requires a dedicated RAID Controller, on the other hand a software RAID doesn’t require any additional hardware and is bundled as a feature in the operating system. Since hardware RAID employs dedicated controller setup for its implementation, it has performance benefits over the software RAID.
Due to decreasing costs of the hardware, sooner or later the RAID subsystem would be a part of basic PC system configuration.

1.5 RAID – How useful it is?

We saw that RAID offers a lot of advantages over usage of a single disk system. However it is not a magic wand that can blow off all the issues and problems. If we simply say that some RAID level will always provide fault tolerance with high availability and improved performance we MIGHT be wrong. It all depends upon the specific usage, which RAID level we intend to use and how do we implement and manage it. We’ll discuss these issues in detail.


How-To Ha-DRDB


– Setup Minimal CentOS 5

– be sure that both nodes can resolve correctly names (either through dns or /etc/hosts)

– yum update (as usual … ;-) )

– yum install heartbeat drbd kmod-drbd (available in the extras repository)

Current situation :

  • , source disc /dev/sdb that will be replicated
  • , target disc /dev/sdb


Setting Up LVM On Top Of Software RAID Subsystem – RHEL & Fedora

Here is a quick look how to build an LVM on top of RAID 1 array, so that we combine the power of these two. This kind of setup is extremely useful in situations where we want a file server to store large amounts of data which provides a centralized backup, storage space for downloadable files via ftp/http, and that may grow enormously in the coming years after the initial setup.


Managing RAID and LVM with Linux (v0.5)

I hope to turn this into a general easy to follow guide to setting up RAID-5 and LVM on a modern Linux system. However, for now it’s basically a collection of my notes as I experimented on my own systems. Please note that my own experimentation was based on the RAID and LVM implementations under Fedora Core 3 & 4, as wel as Red Hat Enterprise Linux 4, all of which are based on the 2.6 series of kernels. These instructions may or may not work with other versions or distros. I’m not an expert (yet) in either Software RAID or LVM so please use the comment section below for corrections and comments. Recent changes are highlighted in yellow.


Adding a UPS to a desktop Linux machine

An uninterruptible power supply (UPS) will allow your computer to continue to function for a period of time when mains power is lost. This can help you to smooth over short-term (1-5 minute) loss of power by running from the UPS battery. When the UPS battery is running low, the UPS can signal your computer to shut down cleanly. With a UPS you can avoid lengthly filesystem or RAID checks due to abrupt power loss. Here are some tips on UPSes in general and how to set one up to protect a Linux machine, even if the model you have lacks explicit Linux support.


Monitoring Multiple Systems With munin (Debian Etch)

Version 1.0
Author: Falko Timme <ft [at] falkotimme [dot] com>

In this article I will describe how you can monitor multiple systems with munin. munin produces nifty little graphics about nearly every aspect of your server (load average, memory usage, CPU usage, MySQL throughput, eth0 traffic, etc.) without much configuration. I will install the munin client on all systems that are to be monitored (including the munin server itself); the munin clients will then report to the munin server.