1 |
Is there anyone who can help me recover my raid array? |
2 |
|
3 |
On Wed, 2011-07-20 at 20:43 -0400, Jeff Cranmer wrote: |
4 |
> On Tue, 2011-07-19 at 09:06 -0400, Michael Orlitzky wrote: |
5 |
> > On 07/18/2011 11:08 PM, Jeff Cranmer wrote: |
6 |
> > > |
7 |
> > > |
8 |
> > > Pardon my additional questions before taking the plunge here. |
9 |
> > > |
10 |
> > > So, given that I have three devices, /dev/sda, /dev/sdb and /dev/sdc, if |
11 |
> > > I run the command mdadm --assemble --scan, would this find all the |
12 |
> > > components and create a /dev/md0 disk without damaging the contents of |
13 |
> > > the original RAID array? |
14 |
> > |
15 |
> > If you've got the space and time, a backup can't hurt. Using --scan will |
16 |
> > make it check the config file, but right now, there's probably nothing |
17 |
> > useful in it. This looks like what you want to do to me: |
18 |
> > |
19 |
> > If the --scan option is not given, then only devices and identities |
20 |
> > listed on the command line are considered. |
21 |
> > |
22 |
> > The first device will be the array device, and the remainder will be |
23 |
> > examined when looking for components. |
24 |
> > |
25 |
> > but I'd figure out where that md0 is coming from (below) first. |
26 |
> > |
27 |
> When I tried mdadm --assemble --scan with nothing uncommented in the |
28 |
> configuration file, I got |
29 |
> mdadm: No arrays found in config file or automatically. |
30 |
> Typing dmesg | grep md0 returned no lines. |
31 |
> |
32 |
> There are a couple of lines in dmesg when I run dmesg | grep md:, but |
33 |
> they read |
34 |
> md: linear personality registered for level -1 |
35 |
> md: raid0 personality registered for level 0 |
36 |
> md: raid1 personality registered for level 1 |
37 |
> md: raid10 personality registered for level 10 |
38 |
> md: raid6 personality registered for level 6 |
39 |
> md: raid5 personality registered for level 5 |
40 |
> md: raid4 personality registered for level 4 |
41 |
> md: Waiting for all devices to be available before autodetect |
42 |
> md: If you don't use raid, use raid=noautodetect |
43 |
> md: Autodetecting RAID arrays |
44 |
> md: Scanned 0 and added 0 devices |
45 |
> md: autorun... |
46 |
> md: ... autorun DONE. |
47 |
> |
48 |
> I think this means that raid5 is set up correctly in the kernel, but it |
49 |
> can't find the raid array. |
50 |
> |
51 |
> Next I tried adding a line to the config file: |
52 |
> |
53 |
> DEVICE /dev/sda /dev/sdb /dev/sdc |
54 |
> mdadm --assemble --scan returned the same results as before |
55 |
> |
56 |
> Next, I tried commenting out the previously added DEVICE line, and |
57 |
> adding |
58 |
> ARRAY /dev/md0 devices=/dev/sda,/dev/sdb,/dev/sdc |
59 |
> |
60 |
> mdadm --assemble --scan returns something different |
61 |
> mdadm: /dev/sdb has no superblock - assembly aborted. |
62 |
> > |
63 |
> > > The only item in /dev/mapper is th default 'control' entry. There is |
64 |
> > > a /dev/md0 item already listed, but presently when I try to mount it, it |
65 |
> > > reports that it is unable to read the superblock. Would the command |
66 |
> > > above fix this? |
67 |
> > |
68 |
> > Depends. Where'd the md0 come from? You probably have something in your |
69 |
> > logs or dmesg, unless that device was created manually on your old system. |
70 |
> > |
71 |
> > |
72 |
> > > Where is the config file mentioned in your e-mail, and do I need to edit |
73 |
> > > it first to add the three raid disks? |
74 |
> > |
75 |
> > It's /etc/mdadm.conf. You don't need it to create or use the array, but |
76 |
> > you'll want to run mdadm when the machine boots and the config file |
77 |
> > tells it what to do. Once the array is working, you can just do, |
78 |
> > |
79 |
> > mdadm --detail --scan >> /etc/mdadm.conf |
80 |
> > |
81 |
> mdadm --detail --scan returns no output. |
82 |
> |
83 |
> Also, I just checked /dev and md0 is now gone from the list. |
84 |
> |
85 |
> Since there are also /dev/sg0, /dev/sg1 and /dev/sg1, I also tried those |
86 |
> instead of /dev/sda, /dev/sdb and /dev/sdc in the ARRAY line, but mdadm |
87 |
> --assemble --scan returned no output |
88 |
> |
89 |
> I tried re-booting, but /dev/md0 is now permanently gone. |
90 |
> |
91 |
> Does this give you any ideas what I can try next?? |
92 |
> |
93 |
> Thanks |
94 |
> |
95 |
> Jeff |
96 |
> |
97 |
> |
98 |
> |