This is an old revision of the document!


Working with software RAID

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

Forcing md array parity check

Force your md array to recheck parity from time to time, to assure data consistency. The following command will read every block on every disk in the md0 array:

 echo check > /sys/block/md0/md/sync_action

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: Very detailed instalation of fedora4, 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
linux/raid.1228753742.txt.gz · Last modified: 2009/05/25 00:34 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready