| hdd | partition | raid1 | lvm | mount point |
|---|---|---|---|---|
| sda | sda1 | md0 | - | / |
| sdb | sdb1 | md0 | ||
| sda | sda2 | - | - | swap |
| sdb | sdb2 | - | swap | |
| sdc | sdc1 | md1 | vg1 | /home, /srv, |
| sdd | sdd1 | md1 | vg1 | /media |
| sde | sde1 | md2 | vg1 | |
| sdf | sdf1 | md2 | vg1 | |
| sdg | sdg1 | md3 | vg2 | /backup |
| sdh | sdh1 | md3 | vg2 | /backup |
see also Hardware configuration
Replace the disk, then copy the partition information from the good disk, randomize the UUID, and re-read the partition information into the system. First, install gdisk from the Debian Universe repositories.
apt-get install gdisk sgdisk -R=/dev/sdb /dev/sda sgdisk -G /dev/sdb partprobe
Taken from How can I quickly copy a GPT partition scheme from one hard drive to another?
Other resources on mdadm and How do I rename an mdadm raid array?:
Setup configuration:
mdadm -Es >> /etc/mdadm/mdadm.conf
to check wether root and swap are mounted, enter:
mount free -m -t
to check mismatching uuid's, enter:
ls -la /dev/disk/by-uuid cat /etc/fstab
to fix, do:
vim /etc/fstab
replace the uuid's found in fstab with the ones found in /dev/disk. Make sure you copy the correct uuid (md0, md1) to the respective entry in fstab.