Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web.
|
2012-07-20 Ubuntu 12.04 can't reliably boot with software RAID (and why)Recently one of my co-workers discovered, diagnosed, and worked around a significant issue with software RAID on Ubuntu 12.04. I'm writing it up here partly to get it all straight in my head and partly so we can help out anyone else with the same problem. The quick summary of the situation comes from my tweet:
(As you might guess, I am not happy.) If you set up Ubuntu 12.04 with one or more software RAID arrays for
things other than the root filesystem, you will almost certainly
find that some of the time when you reboot your system it will come
up with one or more software RAID arrays in a degraded state with
one or more component devices not added to the array. If you have
set This can happen whether or not your root filesystem is on a software
RAID array (although it doesn't happen to the root array itself,
only to other arrays) and even if you do not have the software RAID
arrays configured or used in your system in any way (not listed in
Now let's talk about how this happens. Like other modern systems Ubuntu 12.04 handles device discovery with
This is a race. If udev wins the race and fully assembles all visible software RAID arrays before the rest of the initramfs checks them, you win and your system boots. If udev loses the race, you lose; the check for degraded software RAID arrays will see some partially assembled arrays and throw up its hands. Our brute force solution is to modify the check for degraded software
RAID arrays to explicitly wait for the udev event queue to drain by
running ' This is unquestionably an Ubuntu bug and I hope that it will be fixed in some future update. Sidebar: our fix in specific(For the benefit of anyone with this problem who's doing Internet searches.) Change
degraded_arrays()
{
+ udevadm settle
mdadm --misc --scan --detail --test >/dev/null 2>&1
return $((! $?))
}
Then rebuild your current initramfs by running ' Since I suspect that (This may not be the best and most Ubuntu-correct solution. It's just what we've done and tested right now.) Sidebar: where the bits of this are on 12.04
Various parts of the initramfs boot process are found (on a running
system) in
Looking at this, I suspect that a better solution is to stick our own
script in (Testing has shown that creating a (8 comments.)
linux/Ubuntu1204SoftwareRaidFail written at 23:23:08; Add Comment
The temptation of selective sender address verificationYou could say that we have at least three mail problems. We have a requirement to accept all email by default, we have people who either forward all their mail to places with more strict spam policies or have autoreplies, and such people sometimes get email from known domains that can't be sent email (sometimes in annoying ways). The result is a moderate amount of email camped out on our system that I know will never be delivered, and a sender address verification temptation. There all sorts of reasons why general callback-based sender verification is a bad idea; people much more articulate than I am have written lots about this. I would never do general sender verification. However, the temptation is that I could make our mailer do selective sender verification, verifying only addresses at certain domains. Say, the known domains that send us stuff that then causes bounces or autoreplies that said domains never accept back. This wouldn't make callback verification any less of a bad thing but on the other hand I would only be applying it to domains that are already behaving antisocially towards us (as far as we're concerned). In theory , this would have the net effect of blocking email from those 'bad' domains but (mostly) only to the extent that they themselves are being bad SMTP citizens; if they became willing to accept their email addresses back, we'd become willing to accept their email. (In theory this is what happens with all uses of callback sender verification.) Sadly, this is a bad idea and illustrates a certain dangerous mindset that I can get into when I think about spam. Spam fundamentally irritates me; it just gets under my skin and acts as one of my hot buttons. It's uncomfortably easy for me to slip into a mindset where I start losing balance and perspective, one where the most important thing is blocking spam and other concerns are decidedly secondary. In theory I could argue that we have a defensible technical reason for insisting on callback verification for these domains; after all, our email system effectively chokes on these undeliverable addresses. In practice I know full well that the mail system is not being particularly affected by the current or likely future level of delivery attempts to these domains and that the real reason I want callback sender verification for these domains is that it'll cause us to stop accepting their email. We have no mandate to stop accepting email from domains I don't like (rather the contrary), so I'd be trying to sneak it in through the back door in a vaguely deniable fashion. (Having written this, I am hopefully now somewhat better prepared to resist this particular temptation. But I have to say that it's very attractive to the bit of me that likes poetic justice and hates spam.)
|
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |