raid
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
raid [2009/11/16 14:26] – 172.26.0.166 | raid [2009/11/19 07:13] – 172.26.0.166 | ||
---|---|---|---|
Line 50: | Line 50: | ||
| | ||
unused devices: < | unused devices: < | ||
- | |||
==== Repair RAID ==== | ==== Repair RAID ==== | ||
When a disk is failing you might see errors in the system logs from smartd like this: | When a disk is failing you might see errors in the system logs from smartd like this: | ||
Line 79: | Line 78: | ||
# mdadm /dev/md3 --fail /dev/hda1 --remove /dev/hda1 | # mdadm /dev/md3 --fail /dev/hda1 --remove /dev/hda1 | ||
# mdadm /dev/md4 --fail /dev/hda6 --remove / | # mdadm /dev/md4 --fail /dev/hda6 --remove / | ||
+ | ''/ | ||
+ | < | ||
+ | # mdadm --stop / | ||
+ | <note warning> You must Shutdown the server before you physically remove the drive! </ | ||
Shut the server down and replace the faulty drive with a new one. After booting your drive letters may have shifted around, so just be sure to verify which is which before proceeding. | Shut the server down and replace the faulty drive with a new one. After booting your drive letters may have shifted around, so just be sure to verify which is which before proceeding. | ||
Clone the partition table from the good drive to the bad one: | Clone the partition table from the good drive to the bad one: | ||
Line 91: | Line 93: | ||
/dev/sdc: msdos partitions 1 | /dev/sdc: msdos partitions 1 | ||
</ | </ | ||
- | You can now add the new partitions back to the arrays: | + | Re-create the scratch partition (RAID0): |
+ | < | ||
+ | # mkfs.ext3 /dev/md2 | ||
+ | # mount /dev/md2 / | ||
+ | You can now add the new partitions back to the RAID1 arrays: | ||
< | < | ||
# mdadm /dev/md1 --add /dev/hdd3 | # mdadm /dev/md1 --add /dev/hdd3 | ||
Line 115: | Line 121: | ||
30716160 blocks [2/2] [UU] | 30716160 blocks [2/2] [UU] | ||
| | ||
- | unused devices: < | + | unused devices: < |
Clearing any previous raid info on a disk (eg. reusing a disk from another decommissioned raid array) | Clearing any previous raid info on a disk (eg. reusing a disk from another decommissioned raid array) | ||
Line 135: | Line 141: | ||
How do you know which physical disk is broken to replace it? | How do you know which physical disk is broken to replace it? | ||
+ | f | ||
===== Hardware RAID ===== | ===== Hardware RAID ===== |
raid.txt · Last modified: 2010/09/19 23:58 by aorth