Line 61: |
Line 61: |
| {{note box|You'll have to determine if your disk can be reinstated at the array. In fact sometimes a raid can get out of sync after a power failure but also some outages times for physical disk itself. It is necessary to test the hard drive if this occurs repeatedly. For this we will use '''smartctl'''.}} | | {{note box|You'll have to determine if your disk can be reinstated at the array. In fact sometimes a raid can get out of sync after a power failure but also some outages times for physical disk itself. It is necessary to test the hard drive if this occurs repeatedly. For this we will use '''smartctl'''.}} |
| | | |
− | smartctl -a /dev/sdb # For all the details available by SMART on the disk
| + | For all the details available by SMART on the disk |
| + | |
| + | smartctl -a /dev/sdb |
| | | |
| At least two types of tests are possible, short (~ 1 min) and long (~ 10 min to 90 min). | | At least two types of tests are possible, short (~ 1 min) and long (~ 10 min to 90 min). |
Line 72: |
Line 74: |
| smartctl -l selftest /dev/sdb | | smartctl -l selftest /dev/sdb |
| | | |
| + | {{Note box|if you need to change the disk due to physical failure found by the smartctl command, install a new disk of the same capacity (or more) and enter the following commands to recreate new partitions by copying them from healthy disk sda.}} |
| + | |
| + | sfdisk -d /dev/sda > sfdisk_sda.output |
| + | sfdisk /dev/sdb < sfdisk_sda.output |
| | | |
| + | If you want to reintegrate the same disk without replacing it, go to the next step. |
| | | |
| === Add the partitions back === | | === Add the partitions back === |
Line 83: |
Line 90: |
| === Another Look at the mdstat === | | === Another Look at the mdstat === |
| | | |
− | [root@ ~]# '''cat /proc/mdstat''' | + | [root@sme8-64-dev ~]# cat /proc/mdstat |
− | Personalities : [raid1] | + | Personalities : [raid1] |
− | md2 : active raid1 sdb2[2] sda2[0]
| |
− | 488279488 blocks [2/1] [U_]
| |
− | [=>...................] recovery = 6.3% (31179264/488279488) finish=91.3min speed=83358K/sec
| |
| md1 : active raid1 sdb1[1] sda1[0] | | md1 : active raid1 sdb1[1] sda1[0] |
| 104320 blocks [2/2] [UU] | | 104320 blocks [2/2] [UU] |
| + | |
| + | md2 : active raid1 sdb2[2] sda2[0] |
| + | 52323584 blocks [2/1] [U_] |
| + | [>....................] recovery = 1.9% (1041600/52323584) finish=14.7min speed=57866K/sec |
| | | |
| unused devices: <none> | | unused devices: <none> |