Saturday, June 09, 2007

Linux: Sucks, just sucks less

Okay, so I put my new motherboard in, plugged in my drives, turned it on, and things went haywire fast because the Ubuntu install on those drives didn't have the foggiest dadburned idea how to handle the new SATA controller. So next I tried putting the old Promise controller back in and plugged four of the drives into it. Still no go, Linux still got confuzled.

I sat back, and thought about it. I was out of partitions, so installing a new setup on it without destroying current data didn't seem feasible, so I did what any other self-respecting computer geek would do: I opened up Friday's Fry's ad (the rest of the paper went into the trash yesterday, the Fry's ads did not!), and found they had a special for 500 gb hard drives for $109.95.

So I bought two of them, of course, to set up in a RAID1 mirroring setup using the Linux software RAID.

The next problem was that when I tried plugging my old drives back in, Ubuntu got confused about the RAID arrays because some of them were numbered the same as the RAID arrays I'd created on the new drives. So I pulled the old drives back *out* again. And thought about it. And did what any self-respecting computer geek would do -- made another Fry's trip and bought an external USB enclosure capable of holding two drives. Add that to another enclosure I already had, and I had enough hardware to move my old drives (three 160GB SATA drives set up as RAID5 using Linux software RAID) to USB, which is hot pluggable, unlike SATA.

My RAID1 array (a pair of 80gb drives) copied over cleanly. Now came the next problem -- the Linux software RAID system absolutely refused to assemble my RAID5 arrays again. It reported two different problems -- stale header data, and a bad UUID. I used 'mdadm -E' to examine the RAID headers, and discovered the problem(s). First, one of the drives was marked as 'bad' by the other two drives due to the abortive assembly attempt during the failed boot. Secondly, one of the drives had a different HOST ID written to its UUID field during the failed aborted boot, so its UUID was different from the UUID on the other two drives. Unfortunately, this was one of the "good" drives (a drive with good data).

So I did some digging around in the Linux manpage for mdadm, and poked around a bit, and finally figured out how to force the host ID back to what it was supposed to be, one partition at a time. Once I did that I could assemble two partitions into 2/3rds of a RAID5, then add the remaining partition back in. So now my RAID arrays are happily burbling away rebuilding, I have my data back that seemed forever lost (well, actually, I had a backup of *most* of the data, but losing my collection of, uhm, questionables, which does *not* get backed up, would have been a bit of a bummer), and as soon as the rebuilding finishes I'm going to copy the remaining data onto my big drives.

Some things to note here:

Even when I got things totally confused, Linux gave me the tools to get everything back. With Windows, once your data is gone, it's gone. After a certain point, there's nothing to be done with a Windows system except reformat the drives and start over again.

The reason I use Linux software RAID is because it gives me more tools for fixing things when they break. (And, admittedly, more opportunities for things to break, but there is no free lunch). In addition, when I upgrade to a new disk controller or whatever, my data is still there and good. My data is sitting on the freakin' *USB* bus now, with no RAID controller in sight, and I can still assemble the blessed things.

That said, Linux still sucks. I shouldn't have had problems booting into the new system to begin with, since the appropriate SATA modules for the new SATA controller on the new motherboard actually did exist in the initrd. The fact that Linux gave me the tools to recover from the problem doesn't mean that Linux doesn't suck. It just means that Linux sucks less. A whole day's worth of hacking less, but suck all the same.

-- Badtux the Linux Penguin


  1. Every OS sucks
    -Three Dead Trolls in a Baggie

  2. Reminded me of a corny line I read a long time ago ... The box said "Requires Windows 95, NT, or better,” so I installed Linux.

  3. Jeez, you're making me feel inadaquete. I was having problems with the ol' franken-puter that led to a re-install, but nothing as complex as what you're playing with.
    Side note: see if you'd be interested in this project:
    One Million Blogs for Peace
    To End the Iraq War

  4. Umm, okay.

    I don't upgrade until I have to. It's all cool but that doesn't mean I need it all. Still running Win Me and have it tweaked pretty well so I'm sticking with it for now.

    Have fun.

  5. Pyglalgia, unless your day job includes creating Linux distributions from scratch to fit into flash memory inside embedded appliances, don't feel bad that you don't know about Linux as I do. I lavish love and money on my computer equipment because this is what I make my living with. I'm good at it, I enjoy it, and nevermind that I would have been better off just buying a new computer (not that there's anything original left inside my old computer except the DVD-RW drive and the actual chassis itself), putting together my own computers from pieces and parts is just part of what I do. I learned long ago that going cheap on the tools of your trade is a loser's game. I also learned that if you want it done right, too often you have to do it yourself (sigh!).

    - Badtux the Linux Penguin

  6. You could do that sort of thing in DOS, but Windows is just too much of a pain in the neck. The tools aren't available, and they're a pain to create on your own.

    Linux was designed to be tweaked, so the tools are included.

    The build vs. buy is a matter of accepting the compromises someone else made, because there are always compromises.

    I would have used more memory and less hard drive, because that's what the software I work with requires. I would have also used AMD vice Intel because of a couple of the things that the AMD does better than the Intel chip that only probably affect 1 in 10000 users.

    That's the worth of rolling your own.

    Hey, if things worked out of the box, I would be out of a job.


Ground rules: Comments that consist solely of insults, fact-free talking points, are off-topic, or simply spam the same argument over and over will be deleted. The penguin is the only one allowed to be an ass here. All viewpoints, however, are welcomed, even if I disagree vehemently with you.

WARNING: You are entitled to create your own arguments, but you are NOT entitled to create your own facts. If you spew scientific denialism, or insist that the sky is purple, or otherwise insist that your made-up universe of pink unicorns and cotton candy trees is "real", well -- expect the banhammer.

Note: Only a member of this blog may post a comment.