Aerosol Posted March 23, 2015 Report Posted March 23, 2015 For this let's think that sda is the first HDD and sdb is the second one.To do this we must do some steps:- Partitioning- Configure boot device- Create the new swap device- Configure LVM- Configure GrubOn the first step, Partitioning, we should do the next:sfdisk -d > disks.outsfdisk /dev/sdb <disks.outparted /dev/sda set 1 raid onparted /dev/sda set 2 raid onparted /dev/sda set 3 raid onparted /dev/sda set 5 raid onparted /dev/sdb set 1 raid onparted /dev/sdb set 2 raid onparted /dev/sdb set 3 raid onparted /dev/sdb set 5 raid onmdadm --create /dev/md0 --level=1 --raid-disks=2 missing /dev/sdb1 --metadata=0.90mdadm --create /dev/md1 --level=1 --raid-disks=2 missing /dev/sdb2 --metadata=1.0mdadm --create /dev/md2 --level=1 --raid-disks=2 missing /dev/sdb3 --metadata=1.0mdadm --create /dev/md3 --level=1 --raid-disks=2 missing /dev/sdb5 --metadata=1.0After that we must configure the boot device:mkfs.ext4 /dev/md0mkdir /mnt/md0mount /dev/md0 /mnt/md0cp -dpRx /boot/* /mnt/md0syncumount /mnt/md0rmdir /mnt/md0umount /bootmount /dev/md0 /bootmdadm /dev/md0 -a /dev/sda1mdadm -D /dev/md0 Finding the UUID using command: blkid |grep md0/dev/md0: UUID="d43e4912-57b3-456a-8ef2-af747d37bead" TYPE="ext4" Uptate it in /etc/fstab:# grep boot /etc/fstab #UUID=3428cd4c1-c81b-4d94-240b-12f9020e870e /boot ext4 defaults 1 2UUID=d43e4912-57b3-456a-8ef2-af747d37bead /boot ext4 defaults 1 2 Verify that both of your disks are listed in*/boot/grub/device.map add them if needed.cat /boot/grub/device.map(hd0) /dev/sda(hd1) /dev/sdbInstall grub on both devices:grub-install /dev/sdagrub-install /dev/sdbCreate the new swap devicemkswap /dev/md1swapoff /dev/sda2mdadm --add /dev/md1 /dev/sda2swapon /dev/md1blkid | grep md1Update the /etc/fstab file.Configure LVMpvcreate /dev/md2pvcreate /dev/md3vgextend ROOTVOL /dev/md2vgextend ROOTVOL /dev/md3pvmove /dev/sda3 /dev/md2pvmove /dev/sda5 /dev/md3vgreduce ROOTVOL /dev/sda3vgreduce ROOTVOL /dev/sda5pvremove /dev/sda3pvremove /dev/sda5mdadm /dev/md2 -a /dev/sda3mdadm /dev/md3 -a /dev/sda5mdadm --examine --scan >/etc/mdadm.confConfigure GrubRemove rd_NO_MD from lines in /boot/grub/grub.confdracut -frm -f /etc/lvm/cache/.cachevgscanEntering grub:grubgrub> find /grub/grub.confroot (hd0,0)setup (hd0)root (hd1,)setup (hd1)quit grubAuthor: razvan1@hy Quote