Saturday, July 30, 2011

mdadm Raid 5 Recovery

The solution was to recreate the RAID array. This sound counter-intuitive: if we recreate a raid array over an existing one, it will be erased ! Right ? Wrong !  mdadm is smart enough to “see” that HDD of the new array were elements of a previous one. Knowing that, mdadm rebuild raid 5 the new array upon the previous one in a non-destructive way, by keeping HDD content.


Here is how I finally mdadm recover raid :

  • [root@localhost ~]$ mdadm --create /dev/md0 --verbose --level=5 --raid-devices=3 /dev/hdc1 missing /dev/hdb1
  • mdadm: layout defaults to left-symmetric
  • mdadm: chunk size defaults to 64K
  • mdadm: size set to 312568576K
  • mdadm: array /dev/md0 started.
Hope its work for mdadm raid 5 recovery

No comments:

Post a Comment