Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mdadm [2023/11/17 13:24] – norman | mdadm [2025/06/20 11:25] (current) – [“not enough to start the array” – error while staring mdadm RAID array] norman | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Mdadm Helpers ====== | ====== Mdadm Helpers ====== | ||
| + | |||
| + | ************* | ||
| + | |||
| + | ===== Debian Disable/ | ||
| + | |||
| + | < | ||
| + | |||
| + | or edit cron job | ||
| + | |||
| + | < | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | |||
| ===== How do I replace a disk marked as removed from a linux md raid-5 array ===== | ===== How do I replace a disk marked as removed from a linux md raid-5 array ===== | ||
| Line 28: | Line 42: | ||
| | | ||
| < | < | ||
| + | |||
| + | |||
| + | RUN raid 1 with one disk: | ||
| + | < | ||
| + | mdadm --run /dev/md126 | ||
| + | </ | ||
| + | |||
| + | Then Add disk: | ||
| + | < | ||
| + | mdadm --manage /dev/md126 --add /dev/sdf4 | ||
| + | </ | ||
| ====== Test Email Settings ====== | ====== Test Email Settings ====== | ||
| Line 54: | Line 79: | ||
| Removing the spares=1 option or just recreating the mdadm.conf from scratch fixes the problem: | Removing the spares=1 option or just recreating the mdadm.conf from scratch fixes the problem: | ||
| + | |||
| + | ====== **Update MDADM config file** ====== | ||
| + | |||
| < | < | ||
| Line 59: | Line 87: | ||
| Double check new configuration ad then save as mdadm.conf | Double check new configuration ad then save as mdadm.conf | ||
| + | ====== **Just in case** ====== | ||
| + | Run < | ||
| ====== Speed Up or Slow Down Raid rebuild ====== | ====== Speed Up or Slow Down Raid rebuild ====== | ||
| Line 83: | Line 113: | ||
| - | If you want to override the defaults you could add these two lines to < | + | If you want to override the defaults you could add these two lines to: < |
| < | < | ||
| Line 96: | Line 125: | ||
| Source: [[https:// | Source: [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | ===== Speed Change Script Example ===== | ||
| + | |||
| + | |||
| + | < | ||
| + | #!/bin/bash | ||
| + | clear; | ||
| + | speed=$(cat / | ||
| + | echo "" | ||
| + | echo -e " | ||
| + | echo "" | ||
| + | echo -e " | ||
| + | tput setaf 2 | ||
| + | tput bold | ||
| + | if [[ $speed == ' | ||
| + | sysctl -w dev.raid.speed_limit_max=10000 | cut -c 28- | sed -e ' | ||
| + | sysctl -w dev.raid.speed_limit_min=1000 | ||
| + | else | ||
| + | sysctl -w dev.raid.speed_limit_max=150000 | cut -c 28- | sed -e ' | ||
| + | sysctl -w dev.raid.speed_limit_min=10000 | ||
| + | fi | ||
| + | |||
| + | tput sgr0 | ||
| + | </ | ||