RAID Recovery
DavidGreaves (Talk | contribs) |
DavidGreaves (Talk | contribs) (added recreate text and link to permute script...) |
||
Line 10: | Line 10: | ||
The first thing to do is to start to preserve information. You'll need data from <code>/var/log/messages</code>, <code>dmesg</code> etc. | The first thing to do is to start to preserve information. You'll need data from <code>/var/log/messages</code>, <code>dmesg</code> etc. | ||
+ | |||
+ | ==Recreating an array== | ||
+ | |||
+ | When an array is created, the data areas are not written to *provided* the array is created in degraded mode; ie with a 'missing' device. | ||
+ | |||
+ | So if you somehow screw up your array and can't remember how it was originally created, you can re-run the create command using various permutations until the data is readable. | ||
+ | |||
+ | This perl script is an un-tested prototype : [[permute_array.pl]] |
Revision as of 10:25, 13 July 2007
When Things Go Wrong
There are two kinds of failure with RAID systems: failures that reduce the resilience and failures that prevent the raid device from operating.
Normally a single disk failure will degrade the raid device but it will continue operating (that is the point of RAID after all).
However there will come a point when enough component devices fail that the raid device stops working.
If this happens then first of all: don't panic. Seriously. Don't rush into anything; don't issue any commands that will write to the disks (like mdadm -C
, fsck
or even mount
etc).
The first thing to do is to start to preserve information. You'll need data from /var/log/messages
, dmesg
etc.
Recreating an array
When an array is created, the data areas are not written to *provided* the array is created in degraded mode; ie with a 'missing' device.
So if you somehow screw up your array and can't remember how it was originally created, you can re-run the create command using various permutations until the data is readable.
This perl script is an un-tested prototype : permute_array.pl