1. Introduction

1.1. New Versions of This Document

You can always view the latest version of this document at the URL http://www.midhgard.it/docs/index_en.html

1.2. Copyright, License and Disclaimer

This document, Root-on-LVM-on-RAID HOWTO, is copyrighted (c) 2003 by Massimiliano Ferrero. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html.

Linux is a registered trademark of Linus Torvalds.

1.3. Disclaimer

This document records the methods used by the authors. All reasonable effort is expended in making sure that the description is indeed accurate. The document is distributed in good faith and with the hope that the contents may prove useful to others. There is, however, no guarantee, express or implied, that the methods and procedures described herein are fit for the stated purpose. The authors disclaim any and all liability for any and all consequences, direct or indirect, of the application of these methods.

No liability for the contents of this document can be accepted. Use the concepts, examples and information at your own risk. There may be errors and inaccuracies, that could be damaging to your system. Proceed with caution, and although this is highly unlikely, the author(s) do not take any responsibility.

All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements.

1.4. Credits / Contributors

This document is of course based on the work of many people.

The author wish to thank:

1.5. Feedback

Feedback is most certainly welcome for this document. Send your additions, comments and criticisms to the following email address : .

1.6. What this document is about...

This document describes a procedure to install a Linux system with software RAID and Logical Volume Manager (LVM) support and with a root file system stored into a LVM logical volume.

As stated in next section there are already other documents over this topic: this procedure differs from those documents as it can be used to install such a system from scratch, without the need to install first a "normal" system and then convert root to LVM and RAID.

The procedure has been developed and tested using Debian "Woody" 3.0 distribution and 2.4 kernel version. The install process and steps illustrated are those of Debian setup, but this method should be valid for any distribution, provided that some user interaction is allowed during install (that would be: pause the install process, open a shell and type some magik).

This procedure describes the installation of a system with two disks, using RAID 1 arrays (mirroring). All given commands refer to two IDE hard disks on primary IDE channel (/dev/hda, /dev/hdb): the procedure can be easily modified for different disks, more RAID arrays or different RAID levels (ex. RAID 5).

1.7. ...and what is not

1.7.1. Converting a root file system to LVM

The situation where a system has already been installed without LVM support or with root on a normal partition has already been discussed by other documents. Look at the LVM howto, it has a section dedicated to this task.

Look also to the excellent "Unofficial Kernel 2.4 Root-on-RAID and Root-on-LVM-on-RAID HOWTO" by George Karaolides: his howto covers extensively root migration from a standard partition to LVM and is also a good source of other informations about LVM.

1.7.2. General RAID and LVM info

For an introduction about RAID systems look at these pages and documents:

For general info about Logical Volume Manager look at:

1.7.3. RAID and LVM with 2.0.x and 2.2.x kernel versions

The procedure described in this howto has been tested only with kernel versions 2.4.x

For information about RAID over older kernel versions look at:

1.8. Required Software

Required software is:

1.9. Required Hardware

1.10. Some Warnings

Before starting install the system read entirely sections Overview, Before starting install, Installing: disks and file systems and Installing: kernel, RAM disk and packages. At some points of the install process there is more than one path possible: this way the choices will be clear before.

A software RAID system and/or a system with root-on-LVM requires special attention: in case of a crash recovery is more complex than usual and special tools are needed (the same used to install it). KNOW WHAT YOU ARE DOING before you put such a system up and running.