Saturday, January 22


The Wimpification of Unix

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:


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!

Posted by: Pixy Misa at 12:01 PM | Comments (9) | Add Comment | Trackbacks (Suck)
Post contains 689 words, total size 4 kb.

1 But obviously those parts weren't necessary or they wouldn't be left over! ;)

Posted by: Susie at Saturday, January 22 2005 12:42 PM (CDC0W)

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.

Posted by: TallDave at Saturday, January 22 2005 04:58 PM (oDnE7)

3 Nothing can ever be idiot-proof because idiots are so ingenious. </repeating old jokes>

Posted by: McGehee at Sunday, January 23 2005 02:13 PM (S504z)

4 I've dealt with more than one computer where I'd have just loved to send the drive heads crashing into the platters. They need to add that command for Windows boxes.

Posted by: Jim at Tuesday, January 25 2005 10:07 AM (tyQ8y)

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.

Posted by: J. Arnold at Wednesday, January 26 2005 01:39 AM (vddKB)

6 Haha, good one McGehee. I guess I'm too young to know all the old jokes.

Posted by: TallDave at Wednesday, January 26 2005 02:04 PM (2VQaM)

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.

Posted by: phokz at Monday, October 24 2005 02:11 PM (K7mJ6)

8 This is best site i see thank you.!

Posted by: buy diazepam online at Tuesday, May 09 2006 07:29 AM (iU9qR)

9 Hello guys what a wonderfull resource thank you all!

Posted by: tooth whitening los angeles at Monday, May 22 2006 03:07 PM (iU9qR)

Hide Comments | Add Comment

Comments are disabled. Post is locked.
50kb generated in CPU 0.0151, elapsed 0.0979 seconds.
56 queries taking 0.0878 seconds, 333 records returned.
Powered by Minx 1.1.6c-pink.