RAID Recovery

From Linux Raid Wiki
(Difference between revisions)
Jump to: navigation, search
(added recreate text and link to permute script...)
(Recreating an array)
Line 13: Line 13:
 
==Recreating an array==
 
==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.
+
When an array is created, the data areas are not written to, *provided* the array is created in degraded mode; that is 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.
 
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]]
 
This perl script is an un-tested prototype : [[permute_array.pl]]

Revision as of 17:45, 3 March 2008

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; that is 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

Personal tools