linux:centos:software-raid1-setup
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:centos:software-raid1-setup [2020/04/22 17:58] – odefta | linux:centos:software-raid1-setup [2025/01/02 18:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 108: | Line 108: | ||
| </ | </ | ||
| - | ==== Replace a failed hard disk in raid setup ==== | + | ==== Replace a failed hard disk in the raid configuration |
| Suppose the /dev/sdb hard disk failed. \\ | Suppose the /dev/sdb hard disk failed. \\ | ||
| - | To replace it with a good hdd, set it as failed and remove it from raid array: | + | To replace it with a good hdd, set it as failed and remove it from the array: |
| < | < | ||
| mdadm /dev/md0 --fail /dev/sdb --remove /dev/sdb | mdadm /dev/md0 --fail /dev/sdb --remove /dev/sdb | ||
| Line 118: | Line 118: | ||
| Add the new device to the array: | Add the new device to the array: | ||
| < | < | ||
| - | mdadm --add /dev/md0 /dev/sdb1 | + | mdadm --add /dev/md0 /dev/sdb |
| </ | </ | ||
| + | |||
| + | ==== Re-add a good hard disk (after cable disconnection for example) ==== | ||
| + | |||
| + | After reinserting the hard disk, it may be mounted now on a different device letter.\\ Ckeck it by running: | ||
| + | |||
| + | < | ||
| + | fdisk -l | ||
| + | </ | ||
| + | |||
| + | Output: | ||
| + | < | ||
| + | ... | ||
| + | Disk /dev/sdd: 4000.8 GB, 4000787029504 bytes, 7814037167 sectors | ||
| + | Units = sectors of 1 * 512 = 512 bytes | ||
| + | Sector size (logical/ | ||
| + | I/O size (minimum/ | ||
| + | </ | ||
| + | |||
| + | After identifying it, re-add it to the raid array with: | ||
| + | |||
| + | < | ||
| + | mdadm --manage /dev/md0 --add /dev/sdd | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
linux/centos/software-raid1-setup.1587578290.txt.gz · Last modified: (external edit)
