How to remotely convert live 1xHDD/LVM Linux server to 2xHDD RAID1/LVM (GRUB2, GPT)
17th May 2011
Assumptions:
- current HDD is /dev/sda, it has a GPT (with bios_grub being /dev/sda1), separate /boot partition (/dev/sda2), and a physical LVM volume (/dev/sda3), where LVM holds all the remaining partitions (root, /home, /srv, …); LVM is properly configured, and system reboots with no problems
- your new drive is /dev/sdb, it is identical to /dev/sda, and it comes empty from the manufacturer (this is important! wipe the drive if it is not empty, especially if it used to be a part of another RAID)
- your system is Debian or Debian-based; in this exact example I’ve been using Ubuntu Server 10.04
- your LVM volume group is named vg0
- make sure you understand what each command does before executing it
- you do have an external backup of all your important data, and you do understand that the following operations are potentially dangerous to your data integrity
Inspired by: Debian Etch RAID guide, serverfault question.
Read the rest of this entry »
Posted in *nix, how-to, Software | 6 Comments »