1 |
Branko Badrljica <brankob@××××××××××.com> posted |
2 |
49DFDE56.4000107@××××××××××.com, excerpted below, on Sat, 11 Apr 2009 |
3 |
02:03:34 +0200: |
4 |
|
5 |
> Duncan wrote: |
6 |
> |
7 |
> |
8 |
>>> Duncan wrote: |
9 |
>>> |
10 |
>>> |
11 |
>>> |
12 |
>>>> Did you try md-mod,start_dirty_degraded=1 (AFAIK this applies to |
13 |
>>>> RAID-4/5/6 only)? |
14 |
>>>> |
15 |
>>> No |
16 |
>>> |
17 |
>> Hmm, and you said RAID-5, right? |
18 |
|
19 |
> BTW: Where is this mod-module name way of setting inbuilt module |
20 |
> variables documented ? |
21 |
> I have uvesafb built-in as part of kernel and had to check the sources ( |
22 |
> documentation was out of date at some point ) to coem up with command |
23 |
> line setting, like "uvesafb.mode_option=1280x1024-16@60 uvesafb.mtrr=3". |
24 |
> |
25 |
> Could I also write "md.start_dirty_degraded=1" ? |
26 |
|
27 |
That info came from the kernel Documentation/md.txt file (so normally |
28 |
/usr/src/linux/Documentation/md.txt ). The first several sections talk |
29 |
about boot time assembly and detection of arrays, with the various kernel |
30 |
command line options. That particular info is covered in the "Boot time |
31 |
assembly of degraded/dirty arrays" section, starting on line 54. |
32 |
|
33 |
There's also a much more general kernel parameter list in |
34 |
Documentation/kernel-parameters.txt , and some x86_64 specific options in |
35 |
Documentation/x86/x86_64/boot-options.txt . The documentation for |
36 |
individual modules may also contain additional command line options for |
37 |
them. |
38 |
|
39 |
I have no idea whether simply md. instead of mod-md. would work or not. |
40 |
As I said, I've never actually had to use that one, and simply copied it |
41 |
verbatim from the documentation, first into my grub.conf, then later |
42 |
moved from there to an informational/reminder file I keep around in |
43 |
/boot/grub/ , viewable using grub's cat command. |
44 |
|
45 |
>> I think one of the reasons I may have never had to use that option on |
46 |
>> RAID-6 is that it has two-way parity, so chances are either one or the |
47 |
>> other will still be valid |
48 |
|
49 |
> Yes, but RAID-6 isn't simple expansion of RAID-5 concept. |
50 |
> |
51 |
> It has two parity chunks-P and Q. While P is simple XOR parity from |
52 |
> RAID-5, Q is substantially compute intensive. Further, while Q |
53 |
> generation is "expensive", CPU can utilise its SSE artillery and soften |
54 |
> the perceived extra load. |
55 |
> |
56 |
> But when CPU has to actually use Q parity for data regeneration, things |
57 |
> come to a crawl. That part is quite intensive and SSE is useless there, |
58 |
> so best CPU can do is use tabelaric approach and regenerate data |
59 |
> byte-by-byte. |
60 |
> |
61 |
> So SW RAID-6 has come to be a bad idea, at least for me and my |
62 |
> applications. HW RAID-6 with good HW is another story altogether, |
63 |
> though. |
64 |
> |
65 |
> With SW, you pay extra drive, small extra power consumption, some extra |
66 |
> cycles for Q generation ( not quite inconsequiential) and BIG penalty |
67 |
> for regeneration - so big that usually "doing bussines as usual" while |
68 |
> in such degraded mode is out of the question. |
69 |
> |
70 |
> So after some experience with SW and HW RAID-6 i opted for RAID-5 with |
71 |
> cold spare and regular backups for pretty much everything. |
72 |
|
73 |
This Q information I didn't know, tho it doesn't particularly surprise |
74 |
me. However, I believe the additional data integrity is worth it for |
75 |
me. After all, if more than a single disk dropped out on a RAID-5, you'd |
76 |
be down for recreate and restore from backup anyway, so while RAID-6 may |
77 |
be slow in that circumstance it's certainly not worse than the |
78 |
alternative. |
79 |
|
80 |
> I did run for some time all of my machines through UPS only to find this |
81 |
> costs too much. |
82 |
> |
83 |
> So I switched to DC. I rectified all three 220VAC phases to 260-300V DC |
84 |
> and backed this up by 20x 100Ah-12V lead-acid akus in series. Even |
85 |
> without akus it feels pretty much close to having UPS. When interruption |
86 |
> happens, 90% of the time it affects only one phase, so remaining ones |
87 |
> take over and I don't feel a thing... |
88 |
|
89 |
That makes sense -- you more or less rolled your own UPS. |
90 |
|
91 |
But I'be be leary of working with that 260+ DC. That's dangerous to be |
92 |
working with. Unlike AC, if you touch DC, it grabs you and doesn't let |
93 |
go. |
94 |
|
95 |
Now what I might do is run off of 12 VDC or the comms standard 48 VDC, |
96 |
with individual power supplies running off of that accordingly. |
97 |
|
98 |
> For my remote location I can't have 20 akus there, so I am working on |
99 |
> PSU modification which would allow me to work on two... |
100 |
|
101 |
That's more like it... or four, for the 48 VDC I mentioned above. If I'm |
102 |
not mistaken there's standard power supplies available that run off of |
103 |
that already, since it's comms standard (at least here in the US). |
104 |
|
105 |
>> That's what my "rootbak" partition is for. =:^) |
106 |
>> |
107 |
> Yes. And I use same thing on my workstation. Still, that doesn't quite |
108 |
> match robustness of initrd. |
109 |
> With initrd, if you can get to the phase where grub takes over, you can |
110 |
> pretty much boot. Even if your kernel can't work with root drive for |
111 |
> whatever reason ( missing driver for SATA,AHCI, ext4 ...) |
112 |
|
113 |
Well, that only works if you've compiled the missing drivers as modules |
114 |
and have them on the initramfs/initrd. Then, yes, it works, but doing |
115 |
that adds complexity once again. |
116 |
|
117 |
Another way of doing the same thing would be to simply build a second |
118 |
kernel, with all those extra drivers built-in. That'd avoid the |
119 |
initramfs, while allowing you to run the normal kernel, thus avoiding the |
120 |
extra memory used by all those additional drivers, most of the time. (A |
121 |
script to play switcheroo with the .config and run make oldconfig, |
122 |
keeping a normal and a backup/everything kernel config around, would be |
123 |
trivial.) You'd only have to build the "everything" one perhaps every |
124 |
six months, or say every 2-3 mainline kernel releases (2.6.x), to keep it |
125 |
working with the userspace (udev, etc). |
126 |
|
127 |
>> Well, you /could/ burn a CD with a kernel built with the proper |
128 |
>> options, but you are correct, booting from a CD is indeed a hassle. |
129 |
>> |
130 |
> On Gentoo, how to do this is far from obvious. |
131 |
|
132 |
I don't think it'd be too hard, tho it would take a bit of research. |
133 |
Catalyst (what they use to generate the Gentoo install media) may help. |
134 |
|
135 |
But the other possibility is to just take a normal LiveCD distribution, |
136 |
probably one designed for rescue operations (SysRescue seems to come well |
137 |
recommended), and if necessary, replace its kernel with one including the |
138 |
specific options necessary to support your hardware. That's simply a |
139 |
matter of mounting the ISO using the loopback device, changing out the |
140 |
(or adding an additional) kernel, adding a boot menu entry for it if |
141 |
desired, unounting the loopback, then burning the ISO to disk. |
142 |
|
143 |
Or as you mentioned, use a thumb drive and do about the same thing. |
144 |
|
145 |
>> Actually, I've seen mods for *-WRT class routers and software (OpenWRT, |
146 |
>> DD-WRT, Tomato, etc) that do pretty much the same thing, solder a USB |
147 |
>> based flash module to the thing and expand their storage and |
148 |
>> flexibility by an order or two of magnitude! Run a server, etc, |
149 |
>> directly off your router! They can be made detachable, or not, as |
150 |
>> desired. |
151 |
>> |
152 |
> Cool. If you have a link to such a thing, it would be apppreciated ;o) |
153 |
|
154 |
The one I saw was one of the mod-projects I found while researching |
155 |
OpenWRT, which I eventually decided was what I wanted on my Linksys |
156 |
WRT54GL (bought specifically TO run community firmware in, tho I wasn't |
157 |
sure which distribution I was going to use when I bought it), tho I've |
158 |
not actually modded the hardware yet. |
159 |
|
160 |
(Actually, while OpenWRT is decent, I'm thinking about checking about |
161 |
cross-compiling Gentoo/MIPS for it. As I looked around at the OpenWRT |
162 |
init system and etc, I realized that while I could hack it, it was setup |
163 |
much closer to say Red Hat or possibly Debian than Gentoo, and I was |
164 |
having Mandrake flashbacks. There's nothing wrong with that at all, but |
165 |
I realized that if I were to really start hacking on it, having Gentoo on |
166 |
it so I was working with something currently familiar to me would very |
167 |
likely be about as much trouble as learning all the details of its init |
168 |
system, and running Gentoo on it would be MUCH MUCH cooler! =:^) I |
169 |
suspect there may be a few Gentooers that have already done it, actually, |
170 |
but I've done very little research on that, yet. Linux and computing is |
171 |
my hobby, so I'm not /too/ worried if I never get it done, but it's nice |
172 |
to have the idea available to play with, and who knows, maybe I /will/ |
173 |
get it done some day.) |
174 |
|
175 |
Anyway, here's the OpenWRT site, let's see if I can find the info on that |
176 |
mod once again: |
177 |
|
178 |
http://openwrt.org/ |
179 |
|
180 |
Here's the WIKI entry for single or dual serial port addition (watch the |
181 |
wrap): |
182 |
|
183 |
http://oldwiki.openwrt.org/OpenWrtDocs(2f) |
184 |
KamikazeHowto.html#head-17977c9dcc901d82265a1c843e70b40694cd8eb2 |
185 |
|
186 |
Here's a table of peripherals they've tested (USB, Bluetooth, etc): |
187 |
http://oldwiki.openwrt.org/OpenWrtDocs(2f)TableOfPeripherals.html |
188 |
and |
189 |
http://oldwiki.openwrt.org/TableOfPeripheralHardware.html |
190 |
|
191 |
The above mentions USB connected printers, thumb-drives, scanners, input |
192 |
devices, audio/VoIP/telephony, cameras, all sorts of stuff. Some work |
193 |
well, some don't. Also mentioned is SD/MMC direct-connect to the GPIO |
194 |
lines on the unit, tho it cautions IO is slow compared to USB access. |
195 |
|
196 |
Here's the BIG list of all the routers, etc, OpenWRT supports, along with |
197 |
model-specific notes: |
198 |
|
199 |
http://oldwiki.openwrt.org/OpenWrtDocs(2f)Hardware.html |
200 |
|
201 |
OK, here's the modding page. |
202 |
http://oldwiki.openwrt.org/OpenWrtDocs(2f)Customizing.html |
203 |
|
204 |
And here's what I had in mind when I wrote the bit that got this whole |
205 |
thing started -- it wasn't USB, it was MMC. See the picture (2nd/3rd |
206 |
links direct to images). The USB mentioned above was for routers other |
207 |
than the Linksys ones. Some have it already, others it can be added, but |
208 |
I don't see anything about adding it directly to the Linksys WRT54Gx |
209 |
series, only the SD/MMC stuff. |
210 |
|
211 |
http://oldwiki.openwrt.org/OpenWrtDocs(2f)Customizing(2f)Hardware(2f) |
212 |
MMC.html |
213 |
|
214 |
http://oldwiki.openwrt.org/attachments/OpenWrtDocs(2f)Customizing(2f) |
215 |
Hardware(2f)MMC/kiel.kool.dk-AllSolderingDone.jpg |
216 |
|
217 |
http://oldwiki.openwrt.org/attachments/OpenWrtDocs(2f)Customizing(2f) |
218 |
Hardware(2f)MMC/kiel.kool.dk-Reuter_complete.jpg |
219 |
|
220 |
There's way more instructions and photos at that first link. |
221 |
|
222 |
>> But if I were doing it over, as I said earlier, I'd definitely create |
223 |
>> separate RAID-6s instead of the single partitioned RAID-6, and use two |
224 |
>> rootbaks so three root filesystem images total, one on each of three |
225 |
>> separate RAID-6s, so if one failed to come up, I'd just change the |
226 |
>> command line as necessary to bring up the second, and if it failed, the |
227 |
>> third. |
228 |
>> |
229 |
> Not every application has plenty of storage space. |
230 |
|
231 |
While you are correct, given the size of hard drives these days and the |
232 |
fact that we ARE talking minimum four-spindle RAID (for the RAID-6 |
233 |
mentioned), by the time you get two spindles or more worth of data |
234 |
stripes, space isn't generally that much of an issue. Especially so when |
235 |
my root filesystem is < 5 gigs, and that's including both KDE 4 and KDE |
236 |
5. Thus, the above suggested three RAID-6 root filesystem images, a main/ |
237 |
working and two backups, is only 15 gigs or so, four spindles each with |
238 |
three 2.5 gig partitions, each of which forms a stripe of its own RAID-6 |
239 |
2.5 gig partitions are tiny on todays disks. Leave a bit more room and |
240 |
make each partition five gigs, for 10 gigs of data stripe per RAID-6, and |
241 |
it's still only 15 gigs of partitions on each drive. |
242 |
|
243 |
> |
244 |
>> I'd also split the RAID-1, either creating two single-disk RAID-1s or |
245 |
>> more likely, four separate /boot images direct on the individual |
246 |
>> spindles. |
247 |
>> |
248 |
>> |
249 |
> This is what I do now. Four way RAID-1 for boot is exactly that. GRUB |
250 |
> sees it as four separate drives with ext2 that can be mounted exactly |
251 |
> the same as any other drive, so I can boot from any of them. When kernel |
252 |
> takes over, it assembles them into an md array, so you can mount /boot |
253 |
> and update all four drives with exactly the same data, when needed... |
254 |
|
255 |
Well, I'm running 4-way RAID-1 for /boot too, and yes, GRUB does see it |
256 |
as four separate drives. However, the problem I've run into and why I |
257 |
would make it two separate RAID-1s or four separate individual |
258 |
partitions, one per spindle, is that if something (including my own fat- |
259 |
fingering) writes a bad config to or deletes grub-stage-two from that |
260 |
RAID-1, it blows away ALL FOUR config/boot spindles AT ONCE. It'd be |
261 |
MUCH better if I had it at least split in half, with a working and |
262 |
backup /boot, just as I do most of the rest of the system. |
263 |
|
264 |
But as I was writing the last reply, I thought about doing it slightly |
265 |
differently. Setup two or three of the individual partitions I'm using |
266 |
now for the RAID-1 as individual /boot and bootbak partitions, then setup |
267 |
one (or perhaps two) with a LiveCD/thumbdrive based distribution, say a |
268 |
rescue disk, modified to boot from that partition instead of from the CD |
269 |
or thumbdrive. The effect would be similar to having a bootable rescue |
270 |
disk (SysRescue or whatever) directly on the hard drive, instead of |
271 |
having to dig around for the CD. Should it come to that, I could use the |
272 |
BIOS boot selector to select that drive, and it would boot the SysRescue |
273 |
or whatever image, and I'd go from there. |
274 |
|
275 |
-- |
276 |
Duncan - List replies preferred. No HTML msgs. |
277 |
"Every nonfree program has a lord, a master -- |
278 |
and if you use the program, he is your master." Richard Stallman |