Archive for the ‘Computers’ Category

Back Up

Tuesday, June 3rd, 2008

Finally I have an Uninterruptible Power Supply on my server! “Uninterruptible” is decidedly over the top, but at least I’ll get clean shutdowns now if the power carks it on me.

I went ahead and got one of the APC battery-backup systems, a Back-UPS ES 750VA model. (This model is discontinued now; APC has a new, more streamlined version with the same general features.) The UPS has a port that allows you to connect it to a USB port, so that the power supply can tell the computer that things are about to get ugly. I still need to set up the power-monitoring software on my Linux box, but after that, I should be all set.

Ahhh, Synched.

Monday, August 20th, 2007

Wow, am I glad that’s over.

In the ongoing saga of getting my new server set up, I was right at the point where I was going to switch my hard disks over to a RAID1 setup. I have two 500GB SATA disks, and probably about 200GB of data on the one of them. So I went through the process outlined in many places online:

  1. Create a number of RAID1 partitions on the empty disk, to match up what you have on the full disk. These RAID1 partitions are set up with two devices, the empty hard disk and “missing”, which tells the RAID controller that you haven’t gotten around to adding the other device yet.
  2. Copy all the data from the “normal” disk to the new RAID1 disk.
  3. Get as much of your system ready to boot under RAID as possible. This includes editing /etc/fstab, making an /etc/mdadm.conf file, and setting up lilo to boot off the RAID partition.

…except that lilo wasn’t cooperating. You see, lilo doesn’t like to install onto a degraded RAID1 array, with the versions of kernel/lilo/whatever that I have.

#$@*. Doomed.

Oh well, let’s carry on!

Next came booting the rescue OS that comes with the Linux installer and finishing up the installation. The idea is that you finish setting up the RAID1 partitions under the rescue OS so they have a chance to fully sync up before you bring the system back up. This is the first place where I thought my 200GB of data was lost (well only the few dozen megabytes I generated since my last full backup, but that still had me freaking out), because I just couldn’t get the RAID1 partitions loading.

“Oh wait, maybe I need to load some module.” Ah yes. Today’s episode, brought to you by the Linux command “modprobe raid1“. Now I can see my precious data again…

Once the RAID1 partitions were all synched up, it was a small matter of getting all the boot-related stuff taken care of. This would have been simple, except that the instructions I was following had me do something like this:

  mount /dev/md1 /mnt/raid
  mount /dev/md0 /mnt/raid/boot
  chroot /mnt/raid /bin/bash
  source /etc/profile

This was to switch the system into a state like the final running system, so that I could complete the boot setup. Only problem is, /proc, /dev, and /sys are all empy, and I kinda need those if I’m going to do any sweet-talking with my hard disks.

That was the second “#$@*. Doomed.” moment. But, thankfully, I got it figured out pretty quickly (/proc was easy, /sys was kludgey, and /dev was gross), and got my boot stuff taken care of.

And now, it all seems to work! You are reading my blog again, after all. :-)

I never want to deal with that again. If I have to, well, I’ll know how. But the reason I went through all this rigamarole in the first place was that I didn’t want to buy an extra hard disk, and in retrospect, I think I would have rather just had an extra HDD sitting around. It would be my emergency device/paperweight, or something.

Back?

Monday, August 13th, 2007

Well, it looks like I have my mailserver and webserver back up and running, all on my new machine. It seems a lot zippier too, probably because of all the extra memory and processors.

I still have to switch my hard disks over to RAID1, which I am sure will be quite an adventure. I’m really not worried about it, except for the /boot partition. If /boot gives me trouble then I’m going to be outta luck for a while…

The Rebuild Starteth

Thursday, August 9th, 2007

My new computer showed up yesterday, in a bunch of boxes. I assembled it yesterday and then started installing Linux on it today. We shall see how it goes.

One of the interesting challenges I have already faced with this machine is how to set up RAID with only one hard disk. You see, I have a second hard disk to put into the new computer, but it’s kinda busy serving up my stupid blog, and my e-mail, and all the rest. So I need to find a way to make this transition as smooth as possible.

This may not work, so don’t assume I’m an expert… but my current approach is to build a RAID1 array on the new computer, with only one hard disk in the array. Yes it would be dumb to leave it this way, but my idea is that when the new machine is all configured, I can just rsync all my data from the old machine to the new machine. Then I can turn off the old box and pull the HDD from it, drop it into the new machine, and add it into the RAID1 array.

And of course I will keep a backup just in case something goes horribly wrong…

New Compy

Monday, August 6th, 2007

Man, I hate buying new computers. I would actually prefer cleaning up indigestion-related dog accidents in the kitchen than buy a new computer. Thankfully I only have to do this every 2-3 years.

I didn’t really need to upgrade my computer - it’s actually pretty great for my needs - but my mom really could use a new computer, and she usually gets my hand-me-downs. It works for iPods, cameras, computers… Her computer is a wretched old thing, and it was getting increasingly painful to use, so I went ahead and bit the bullet and ordered a new computer.

Don’t ask me why, but I decided to get the Intel Core 2 Quad processor in this computer. I love processors, the more the better. It’s always suited my obsession with high-performance server programming and concurrent programming. I also decided to get 4GB of RAM, so I am officially entering into the 64-bit operating system world. Finally, I decided to try out one of the graphics cards with the nvidia 8800 GTS chipset on it, so I will get to see how far the graphics technology has progressed since my last computer. I only got 320 MB of RAM on the graphics card though, since I like graphics programming, not gaming, so I don’t really need tons of texture memory.

My mom will get a pretty fast computer out of this too, so hopefully that will make her life much, much easier.

Upgrades

Wednesday, May 30th, 2007

Well, it looks like I can postpone my computer upgrades no longer. Over the weekend my computer hung, and when I came in to check it out, there were filesystem journaling errors on the screen. This is after my computer hung two weeks earlier, again with a HDD issue.

So, it looks like my five year old hard disk is on its way out. That’s a pretty good run, although usually I have to upgrade my disks before they fail. So this is a first.

Anyway, the first order of business is to get a new power supply for the computer since it’s struggling as it is; my current power supply is a bit anemic, and with the big graphics card and other components, it has always struggled a bit. That should be on its way (thank you eBay!), so it’s just a matter of ordering the remaining components. I’m going to go with a 500GB Western Digital HDD this time.

I’m also going to begin building out my RAID fileserver in the next few weeks. That will be nice to have taken care of. I am running out of disk space on my laptop, and a survey of my disk contents revealed that it’s mainly iTunes music and digital photos taking up the space. Moving all that stuff onto a fileserver will free up at least 30GB right off the bat.

Progress sure is expensive.

Greylisted

Monday, April 30th, 2007

Today I installed postgrey to see if I could cut down the amount of spam that my mailserver receives. It is really pretty annoying to get all this spam, and then to have to review my junk folder to make sure it really is spam.

Postgrey is a greylisting service. The idea is simple: When an e-mail arrives, my mailserver will tell the remote server that the local recipient (i.e. me) isn’t available, but try again in five minutes. Normal mailservers will dutifully try back again in five minutes, and the mail will be let through. Spam servers, on the other hand, generally ignore such responses since they are too busy annoying other people by that point.

It will be interesting to see how well this works! I especially hope I don’t miss any important e-mails, but it’s not like I get a lot of e-mails anyway…

Too Fast

Wednesday, December 13th, 2006

This is the first time that my computer has ever been too fast for me!

I needed to come up with a good programming problem that would be easily parallelizable. So, I fell back on the old standard, the Mandelbrot set. I got the single-threaded version working yesterday, and much to my dismay, it was really fast. What’s the point in parallelizing a fast program?

Nonetheless, I love the Mandelbrot set. Here are some pictures I generated:

Most of these images only took a few seconds to generate. Back in 1995 when I wrote my first Mandelbrot viewer in CS3, it took several minutes to generate images this large. The parallelized version would still take 30-45 seconds.

So, since this is no longer challenging enough for modern computers, I’ll have to find something else. Volumetric rendering sounds pretty good…

Hard Disk

Tuesday, November 28th, 2006

Yeah yeah, long time no write.

A few days ago I finally got around to upgrading the hard disk in my mom’s computer. The old one was 20GB - surprisingly, space was starting to run out. So I put in a new 300GB HDD and got it set up as the primary disk.

What was so surprising to me is how much of a difference it made in the performance of that old computer. Before, the thing would just crawl - something I didn’t really understand, because everything else seemed reasonably good. But it turned out that the HDD was a huge bottleneck for the system.

For normal computer usage, experts tend to say that a faster HDD isn’t going to make that much of a difference. If the “fast” one is only 33% faster than the “slow” one, and you actually use the HDD 20% of the time, you aren’t going to see much overall improvement in your system’s performance. But this seemed to be a special case - the new drive has a much bigger cache, and much faster data transfer rates, so it’s more like 500% faster than the old one.

Now the computer is zippy and my mom is psyched. Hopefully she won’t discover iTunes…

One Jump Ahead

Thursday, October 19th, 2006

I just finished a very interesting book called “One Jump Ahead: Challenging Human Supremacy in Checkers.” It was written by Jonathan Schaeffer, the main force behind the creation of Chinook, one of the absolute best checkers playing programs ever created. (You can even play it, but expect to be beaten!)

(more…)