Tuesday, January 25

Truth in Advertising

My new 8x DVD burner really is twice as fast as my old 4x model. When was the last time that happened?

Of course, I note that Pioneer now has a 16x model selling for less than I paid for my 8x (which was in turn much cheaper than my 4x). Fortunately for those of us on the upgrade treadmill, that's likely to be it, because at higher speeds than that the discstendtoexplode.

2
Eep! Pixy, I know if MY anime drive went south on me, I'd be shattered. Bereft. In tears. Rending my garments.
Even though I've got the DVDs, I'd lose my Azumanga Daioh files! I have a soft spot in my heart for those: great job of fansubbing... not to mention losing all the AMVs I've downloaded!
I'd be very unhappy, is what I'm saying.

Back in the Good Old Days, Unix was an operating system for men.* If you typed in a command, which might be something arcane like mq or something more prosaic like Θ and it turned out that what that command did was to grind the drive heads into the platters, well, then the machine would take your word for it and grind those drive heads.**

Of course, you really meant to type mw or perhaps Φ which would forward all your email to the office in Bratislava or send a request to the vending-machine people to stop putting that Pepsi Max crap in the machine. But at least now you don't have to be concerned about such minor matters as you will need to focus all your energies on escaping from the burning computer room before the CO2 dump kicks in and you asphyxiate.

These days the wussification of Unix is almost complete. Say, for example, that you had a transient drive failure on a degraded RAID-5 array. Now, you can rebuild a RAID-5 array by using the mkraid command. In the old days, this would have been something more like ∂ but since people no longer have real keyboards we have to make do with letters and numbers.

Now, if you build a RAID-5 set without zeroing out the disks, the contents will be utter garbage. You could type another command to do the zeroing out, perhaps ς, but no, that's too straightforward. So instead we make our friend mkraid do the zeroing out automatically, and if you don't want that perfectly sane and normal behaviour you have to say so.

With what? A -n option? Not in this century. No, it has to be --dangerous-no-resync. And that only works if you use it alongside --force.

And in fact that doesn't work either. What it does do is tell you this:

WARNING!

NOTE: if you are recovering a double-disk error or some other failure mode that made your array unrunnable but data is still intact then it's strongly recommended to use the lsraid utility and to read the lsraid HOWTO.

If your RAID array holds useful and not yet backed up data then --force and the hot-add/hot-remove functionality should be used with extreme care! If your /etc/raidtab file is not in sync with the real array configuration, then --force might DESTROY ALL YOUR DATA. It's especially dangerous to use -f if the array is in degraded mode.

If your /etc/raidtab file matches the real layout of on-disk data then recreating the array will not hurt your data, but be aware of the risks of doing this anyway: freshly created RAID1 and RAID5 arrays do a full resync of their mirror/parity blocks, which, if the raidtab is incorrect, the resync will wipe out data irrecoverably. Also, if your array is in degraded mode then the raidtab must match the degraded config exactly, otherwise you'll get the same kind of data destruction during resync. (see the failed-disk raidtab option.) You have been warned!

[ If your array holds no data, or you have it all backed up, or if you know precisely what you are doing and you still want to proceed then use the --really-force (or -R) flag. ]

Of course, you'd only be trying this if your raidset was already toast and you have nothing to lose.

But the interesting thing comes if you follow those instructions: It says

DESTROYING the contents of /dev/md6 in 5 seconds, Ctrl-C if unsure!

Which is in fact exactly what it isn't (or isn't supposed to be) doing. What this command does is assemble your disks into a RAID volume without actually writing over any of your data. After all the dire warnings, we are left with a promise of disaster and destruction which is never to be fulfilled!

Unless, of course, it doesn't work. We shall see...

* And women, too, of course, but they had to be that special breed of woman who can take apart a carburetor, clean it, and put it back together without any parts left over.** You might ask why a computer would have a command so pointless and destructive. The answer is, of course, that someday someone might want to grind the drive heads into the platters, and when that day comes, we will be ready!

2
Ha. We just had a contractor go into /etc and type the dreaded "rm *.*". Our UNIX guys had to spend their morning recovering and pronouncing ten thousand curses upon all contractors.
So it's not quite totally idiot-proof yet.

5
Overview of OPENXML:-
XML is one of the easiest ways to exchange data between applications. When XML first became available, many developers attempted to write their own XML parsers in the language of their choice. Indeed, because XML consists of tags, writing such a parser in T-SQL isn't very difficult. However, going though thousands of lines of XML can quickly degrade performance. That's why it is nice to have the OPENXML function, which does the parsing work for you fairly efficiently.

7
Thanks for useful article. I'm just trying to recover data from failed hw raid array :-)
Finaly I got it (after 12hours or so).
mkraid --dangerous-no-resync -R worked for me.
So again, thanks a lot for this article.

Wednesday, January 12

They Don't Make Them Like That Any More

So I had to take one of the servers out of the computer room today. It's been running one of our telephony apps ever since the company started up, and now it doesn't want to run any more. I've built a new server, and we have a techie coming in later today to swap the special cards across and configure the application, so I just needed to get the server out of the rack and put it somewhere where he'd be able to open it up.

First problem: Most of our servers are in racks, but most of our servers aren't rack-mounted. They're little Compaq mini-towers; we bought dozens of them cheap when the line was discontinued (we also use them as desktops). They're not particularly fast, but they're quite reliable. So we have shelves in the racks for the servers to sit on.

Now, some bright spark had positioned the shelf immediately above this server so that there was all of, oh, half a millimetre of clearance. Since the server itself was sitting on the floor, and the frame of the rack itself sticks up over an inch at the bottom, I had to first remove two other servers and the shelf before I could move the server I wanted. Fortunately, neither of the two servers on the shelf above were critical (our backup internet server and the remote-access server), so I just yanked them out, undid the screws, twisted the shelf sideways and up to get it around the cables, and it was free.

Second problem: I grabbed the server and tried to hoick it out of the rack. It didn't move. Was it caught on something? No... Can't see anything. Wiggle it a bit... Wiggle... Wiggle. Ah. Now lift. Grrrrgh.

The reason it wasn't moving is that it weighs about seventy pounds. It's the size of a standard mini-tower, though about six inches deeper, but it appears to be constructed entirely of cast iron.

They don't make them like that any more. Thank God.

This little cutie weighs all of 2.9 pounds, and it's faster, has more memory and more disk space than the cast iron cow now sitting on my desk. Admittedly it doesn't have expansion slots or hot-swap drive bays, but ooh, shiny.*

4
I've actually rented and played a two-sided DVD -- no label side. Put the disc in one way, the movie plays. Take it out, flip it over, the movie plays.
It made me scratch my head, but it was a fun movie even upside down. [rimshot]
Seriously, though -- it really could just be a two-sider.