====== Working with software RAID ====== see also: * [[http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID|Gentoo Howto on RAID]] * [[http://www.debian-administration.org/articles/424|growing ext3 partition on RAID1 without rebooting]] * [[:linux:lvm|LVM]] ===== Debian Woody + kernel 2.4 ===== Good article (based on the one that has already been available on TNT) on this topic is on URL: [[http://www.rot13.org/~dpavlin/md-raid1.html]] ===== Debian Sarge ===== TODO ===== sw RAID recover ===== **Copying the partition table from working HDD to new one** sfdisk -d /dev/sda > /tmp/partions sfdisk --force /dev/sdb < /tmp/partions **Adding partitions back to raid** mdadm -add /dev/md0 /dev/sdb1 mdadm -add /dev/md1 /dev/sdb2 mdadm -add /dev/md2 /dev/sdb3 mdadm -add /dev/md3 /dev/sdb4 ===== Force the Linux kernel to re-read a partitiontable ===== blockdev --rereadpt /dev/device **Do NOT do this on a device where filesystems are mounted from.** ===== Boot system with GRUB from RAID1 ===== see also: [[http://www.texsoft.it/index.php?c=hardware&m=hw.storage.grubraid1&l=it|Very detailed instalation of fedora4]], [[http://ruslug.rutgers.edu/~mcgrof/grub-images/|GRUB Splash Image Howto]] [root@fedora4 ~]# grub GNU GRUB version 0.95 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename.] grub> root (hd0,0) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded Done. grub> root (hd1,0) Filesystem type is ext2fs, partition type 0xfd grub> setup (hd1) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd1)"... 15 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded Done. grub> quit