Home > Linux, RAID > Installing Debian/Ubuntu on an Existing RAID/LVM

Installing Debian/Ubuntu on an Existing RAID/LVM

December 13th, 2007 Leave a comment Go to comments

I like to test all the possible scenarios before putting a server into production. One of these tests was whether I could reinstall linux without disturbing the RAID arrays. Unfortunately the Debian and Ubuntu installers do not make this easy. When you reach the partitioning stage it will just show you the physical drives with the linux raid partitions and not the md devices. Here are the steps that worked for me.

When starting the installer proceed until you reach the network configuration screen where it asks for the hostname. At this point you’ll want to switch to another virtual terminal (alt+f2). Run the following commands

modprobe raid1
modprobe dm_mod

Mdrun might return command not found as it has been depreciated in later linux releases. Don’t worry we can use mdadm instead.

mdadm --examine --scan --config=partitions > /tmp/mdadm.conf
mdadm --assemble --scan --config=/tmp/mdadm.conf

Let’s verify that the RAID arrays were found and started.

cat /proc/mdstat

If you are using LVM we can now scan and activate the volumes.

vgchange -a y

Now you can return to the installer with alt+f1. When you reach the partitioning stage select manual and assign the RAID / LVM volumes mount points.

Categories: Linux, RAID Tags:
  1. No comments yet.
  1. No trackbacks yet.