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/02 14:20] – 172.26.0.166 | raid [2009/11/16 14:23] – 172.26.0.166 | ||
---|---|---|---|
Line 5: | Line 5: | ||
==== Drive numbering ==== | ==== Drive numbering ==== | ||
- | If you're looking at the front of the HPC you'll see four rows of drives. | + | If you're looking at the front of the HPC you'll see four rows of drives. |
* Rows 0 - 2 are SATA, connected to the hardware 3ware RAID card | * Rows 0 - 2 are SATA, connected to the hardware 3ware RAID card | ||
* Row 3 are IDE | * Row 3 are IDE | ||
+ | |||
===== Software RAID ===== | ===== Software RAID ===== | ||
The Linux kernel has the '' | The Linux kernel has the '' | ||
Line 51: | Line 52: | ||
==== Repair RAID ==== | ==== Repair RAID ==== | ||
+ | When a disk is failing you might see errors in the system logs from smartd like this: | ||
+ | < | ||
+ | In that case you need to replace the drive. | ||
+ | < | ||
+ | Personalities : [raid1] [raid0] | ||
+ | md3 : active raid1 hdd1[1] hda1[0] | ||
+ | 200704 blocks [2/2] [UU] | ||
+ | | ||
+ | md1 : active raid1 hdd3[1] hda3[0] | ||
+ | 26627648 blocks [2/2] [UU] | ||
+ | | ||
+ | md2 : active raid0 hdd5[1] hda5[0] | ||
+ | 36868608 blocks 256k chunks | ||
+ | | ||
+ | md4 : active raid1 hdd6[1] hda6[0] | ||
+ | 2168640 blocks [2/2] [UU] | ||
+ | | ||
+ | md0 : active raid1 hdd2[1] hda2[0] | ||
+ | 30716160 blocks [2/2] [UU] | ||
+ | | ||
+ | unused devices: < | ||
- | Setting a disk faulty/failed: | + | Because it is ''/ |
- | + | < | |
- | # mdadm --fail /dev/md0 /dev/hdc1 | + | # mdadm / |
- | + | # mdadm /dev/md3 --fail /dev/hda1 --remove /dev/hda1 | |
- | DO NOT run this every on a raid0 or linear device or your data is toasted! | + | # mdadm /dev/md4 --fail /dev/hda6 --remove / |
- | Removing a faulty | + | Shut the server down and replace the faulty |
+ | Clone the partition table from the good drive to the bad one: | ||
+ | < | ||
+ | Verify the new partitions can be seen: | ||
+ | < | ||
+ | # partprobe -s | ||
+ | /dev/hda: msdos partitions 1 2 3 4 <5 6> | ||
+ | /dev/hdd: msdos partitions 1 2 3 4 <5 6> | ||
+ | /dev/sda: msdos partitions 1 | ||
+ | /dev/sdb: msdos partitions 1 | ||
+ | /dev/sdc: msdos partitions 1 | ||
+ | </ | ||
+ | You can now add the new partitions back to the arrays: | ||
+ | < | ||
+ | # mdadm /dev/md1 --add /dev/hdd3 | ||
+ | # mdadm /dev/md3 --add /dev/hdd1 | ||
+ | # mdadm /dev/md4 --add / | ||
- | # mdadm --remove /dev/md0 /dev/hdc1 | ||
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) | ||
raid.txt · Last modified: 2010/09/19 23:58 by aorth