Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:raid [2008/12/08 17:29]
a + Forcing md array parity check
linux:raid [2009/07/06 01:30] (current)
193.164.137.52
Line 5: Line 5:
    * [[http://www.debian-administration.org/articles/424|growing ext3 partition on RAID1 without rebooting]]    * [[http://www.debian-administration.org/articles/424|growing ext3 partition on RAID1 without rebooting]]
    * [[:linux:lvm|LVM]]    * [[:linux:lvm|LVM]]
 +
 +
  
  
 ===== Debian Woody + kernel 2.4 ===== ===== 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]]+Good article (based on the one that has already been available on old [[http://tnt.aufbix.org/old/linux/raid/|TNT site]]) on this topic is on URL: [[http://www.rot13.org/~dpavlin/md-raid1.html]]
  
 ===== Debian Sarge  ===== ===== Debian Sarge  =====
Line 16: Line 18:
  
  
-===== sw RAID recover =====+===== RAID5 ===== 
 +**Creating a new one** 
 +   mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1 
 + 
 +**Adding spare to RAID5** 
 +   mdadm --add /dev/md0 /dev/sdh1 
 + 
 +**Fixing /etc/mdadm/mdadm.conf** 
 +   echo "DEVICE partitions" > /etc/mdadm/mdadm.conf 
 +   mdadm --detail --scan >> /etc/mdadm/mdadm.conf 
 + 
 + 
 +===== SW RAID recover =====
 **Copying the partition table from working HDD to new one** **Copying the partition table from working HDD to new one**
  
Line 23: Line 37:
  
 **Adding partitions back to raid** **Adding partitions back to raid**
-   mdadm -add /dev/md0 /dev/sdb1 +   mdadm --add /dev/md0 /dev/sdb1 
-   mdadm -add /dev/md1 /dev/sdb2 +   mdadm --add /dev/md1 /dev/sdb2 
-   mdadm -add /dev/md2 /dev/sdb3 +   mdadm --add /dev/md2 /dev/sdb3 
-   mdadm -add /dev/md3 /dev/sdb4+   mdadm --add /dev/md3 /dev/sdb4 
 + 
 + 
 +**How to know which disk to remove?** 
 + 
 +The safest way (IMHO) to know which disk to remove is to write down the serial number of the disk, e.g. using smartctl, and then check the back side of each disk for the matching serial number. 
 + 
 +   smartctl -i /dev/hda | grep Serial 
 +   smartctl -i /dev/hde | grep Serial 
 +   smartctl -i /dev/hdg | grep Serial
  
 ===== Forcing md array parity check ===== ===== Forcing md array parity check =====
Line 33: Line 56:
  
    echo check > /sys/block/md0/md/sync_action    echo check > /sys/block/md0/md/sync_action
 +
 +===== active (auto-read-only) =====
 +
 +   md0 : active (auto-read-only) raid1 sda1[0] sdb1[1]
 +         1951744 blocks [2/2] [UU]
 +
 +to fix:
 +
 +   # mdadm --readwrite /dev/md0
  
 ===== Force the Linux kernel to re-read a partitiontable ===== ===== Force the Linux kernel to re-read a partitiontable =====
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