Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: How does grub assemble a RAID1 for / ??
Date: Mon, 05 Apr 2010 00:03:20
Message-Id: k2m5bdc1c8b1004041612r2bc43e81jf202c45321c1b4a7@mail.gmail.com
In Reply to: [gentoo-user] Re: How does grub assemble a RAID1 for / ?? by Kerin Millar
1 On Sun, Apr 4, 2010 at 3:47 PM, Kerin Millar <kerframil@×××××.com> wrote:
2 > On 04/04/2010 23:16, Mark Knecht wrote:
3 >>
4 >>    First, thanks for sticking with me on this. I really appreciate it.
5 >> Second, I apologize for the length of the reply but it's still not
6 >> working and I wanted to try and clearly show the steps I've taken.
7 >> Maybe you or someone else will see the step I'm missing.
8 >
9 > [snip]
10 >
11 >> I don't know what to try next.
12 >
13 > OK, I think I now understand what's happening here. I regret that I did not
14 > recall this earlier but only the original RAID superblock format (version
15 > 0.90.00) is supported for automatic assembly! I have two servers that are
16 > set up in a similar way as your box, and they both use this format. It's
17 > possible that the docs may be out of date but
18 > /usr/src/linux/Documentation/md.txt says:
19 >
20 > "When md is compiled into the kernel (not as module), partitions of type
21 > 0xfd are scanned and automatically assembled into RAID arrays. This
22 > autodetection may be suppressed with the kernel parameter
23 > "raid=noautodetect".  As of kernel 2.6.9, only drives with a type 0
24 > superblock can be autodetected and run at boot time."
25 >
26 > Also, look at this:
27 >
28 > http://www.mail-archive.com/linux-raid@×××××××××××.org/msg06215.html
29 >
30 > To quote Neil Brown:
31 >
32 > "v0.90 can be used with 'in kernel autodetect' (i.e. partition type 0xfd).
33 > v1 cannot (I consider this an improvement :-)"
34 >
35 > Well, I can't say I agree with him there.
36 >
37 > Anyway, it seems that you're using the 1.1 superblock format. So, what
38 > options does this leave you with?
39 >
40 > a) Backup the root filesystem, and re-create the array with the regular
41 >   superblock format. If necessary, coerce mdadm with -e 0 but it should
42 >   be a default.
43 >
44 > b) Rely on userspace tools to assemble the array. This means either
45 >   having the root filesystem off raid, or using an initrd/initramfs
46 >   image.
47 >
48 > I'd got for the first option as it keeps things simple and the benefits of
49 > the v1 format are nebulous in practical terms.
50 >
51 > Cheers,
52 >
53 > --Kerin
54 >
55 >
56 >
57
58 Hi,
59 From my post this morning:
60
61 "No problem supplying it. I did the rebuild this morning but forced
62 metadata to Type 1.0. No change as you suggested there wouldn't be."
63
64 I guess I didn't post it there but what I meant by that was the following:
65
66 1) If you don't specify metadata then you get the newest - I think
67 that's currently ver. 1.2 or something.
68
69 2) I tried 1.0 this morning (shown below) which didn't fix it.
70
71 (commands used are below)
72
73 I will immediately try 0.90 as I have no problem with the limitations
74 at this time:
75
76 0, 0.90
77 Use the original 0.90 format superblock.
78 This format limits arrays to 28 component
79 devices and limits component devices of levels 1
80 and greater to 2 terabytes.
81
82 I should hopefully know in an hour or two how this worked.
83
84 Thanks for the help!
85
86 Cheers,
87 Mark
88
89 keeper ~ # mdadm --create /dev/md0 --level=1 --raid-devices=2
90 /dev/sdb3 /dev/sdc3
91 mdadm: Note: this array has metadata at the start and
92 may not be suitable as a boot device. If you plan to
93 store '/' or '/boot' on this device please ensure that
94 your boot-loader understands md/v1.x metadata, or use
95 --metadata=1.0
96 mdadm: Note: this array has metadata at the start and
97 may not be suitable as a boot device. If you plan to
98 store '/' or '/boot' on this device please ensure that
99 your boot-loader understands md/v1.x metadata, or use
100 --metadata=1.0
101 Continue creating array? n
102 mdadm: create aborted.
103 keeper ~ # mdadm --create /dev/md0 --level=1 --raid-devices=2
104 --metadata=1.0 /dev/sdb3 /dev/sdc3
105 mdadm: array /dev/md0 started.
106 keeper ~ # cat /proc/mdstat
107 Personalities : [raid1]
108 md0 : active raid1 sdc3[1] sdb3[0]
109 31463228 blocks super 1.0 [2/2] [UU]
110 [>....................] resync = 3.9% (1241664/31463228)
111 finish=5.2min speed=95512K/sec
112
113 unused devices: <none>
114 keeper ~ #

Replies

Subject Author
[gentoo-user] Re: How does grub assemble a RAID1 for / ?? Kerin Millar <kerframil@×××××.com>