Skip to content

Instantly share code, notes, and snippets.

@gjedeer
Created April 21, 2013 16:22
Show Gist options
  • Save gjedeer/5430144 to your computer and use it in GitHub Desktop.
Save gjedeer/5430144 to your computer and use it in GitHub Desktop.
mdadm resync RAID1 array
root@rescue:~# mkdir --parent /dev/md
root@rescue:~# mdadm --assemble --scan --auto=yes --symlink=no
mdadm: /dev/md/le02:1 has been started with 1 drive (out of 2).
mdadm: /dev/md/le02:0 has been started with 1 drive (out of 2).
root@rescue:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md126 : active raid1 sdb1[1]
40957880 blocks super 1.2 [2/1] [_U]
md127 : active raid1 sdb7[1]
1871089528 blocks super 1.2 [2/1] [_U]
unused devices: <none>
root@rescue:~# mdadm --manage /dev/md126 --add /dev/sda1
mdadm: added /dev/sda1
root@rescue:~# mdadm --manage /dev/md127 --add /dev/sda7
mdadm: added /dev/sda7
root@rescue:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md126 : active raid1 sda1[2] sdb1[1]
40957880 blocks super 1.2 [2/1] [_U]
[>....................] recovery = 4.6% (1884352/40957880) finish=4.8min speed=134596K/sec
md127 : active raid1 sda7[2] sdb7[1]
1871089528 blocks super 1.2 [2/1] [_U]
resync=DELAYED
unused devices: <none>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment