January 27th, 2005

internet explorer, ie, computer, perl

While we're on the subject of the CPAN...

A little over a year ago, I wrote a Perl module called List::Part.  The purpose of the module is to divide up ("partition") a list based on some code the user provides.  One of my examples:
    my($lay_off, $give_raise, $keep)=part {
          $_->is_talented  ? 0 
        : $_->is_executive ? 1 
        :                    2
    } @employees;
When I originally uploaded it, I didn't register the module; it really felt a little too small and unimportant to be its own module.

When I was uploading DBIx::Path the other night, it struck me that there really was no reason not to register List::Part.  So I did.  Registrations have to be approved, and in the past they've always taken a couple weeks, so I fired off my request and settled in for a long wait.

Well, it turned out I wouldn't have to wait very long.  Today (yesterday) I got the approval.  I also got an e-mail from brain d foy (yes, it's always written in small caps), editor of The Perl Review, who apparently wants me to write an article about it.

I replied telling him that I was interested and asking if it should be focused on the module specifically or Perl list processing in general.  Once I hear back, I'll write up a proposal and submit it.

Whee.
  • Current Mood
    accomplished accomplished
megatokyo, largo, MT, manga, japanese

D'oh, forgot a title.

Apparently brian wants me to write the article just on List::Part.  Which is alright, though I'm not sure there's enough material for a full article.

The other thing I did yesterday was set up RAID on the server.  For those who haven't had it beaten into their skulls yet, RAID is a way of combining multiple disks into a whole that's faster and more reliable than the sum of its parts.  I'm using RAID-5, which uses "striping" (data is alternated between disks) and "parity" (backup data is stored in such a way that a disk can go bad without losing any data).

To review, Navi has these drives:
hda (60GB)hde (10GB)hdg (10GB)
/boot (32MB), root (1GB), swap (1GB?)
/usr (13GB)
/var (13GB)
/home (13GB)
/tmp (2.5GB)
Empty (5GB)
md0 part one (5GB)md0 part two (5GB)md0 part three (5GB)
md1 part one (5GB)md1 part two (5GB)md1 part three (5GB)
A third of the space on md0 and md1 are used by parity data, so each of them is about 10GB.

Each of md0 and md1 contains one big folder that needs to be kept safe, and one smaller one that does as well.  md0 contains /var/www (all web files, including Filespace) and /var/svn (Subversion version-control files).  md1 contains /var/lib/mysql (MySQL databases) and /var/qmail/queue (the Qmail incoming mail queue, which can't really be backed up because it changes constantly).  Because there are two folders in each md (multi-disk) volume, I can't just mount them directly into the folders; instead, I do this:
/dev/md0        /mnt/md0          ext3  defaults  1 2
/dev/md1        /mnt/md1          ext3  noatime   1 2

/mnt/md0/www    /var/www          none  bind      0 0
/mnt/md0/svn    /var/svn          none  bind      0 0
/mnt/md1/mysql  /var/lib/mysql    none  bind      0 0
/mnt/md1/queue  /var/qmail/queue  none  bind      0 0
This bit of chicanery in my /etc/fstab says "mount md0 and md1 onto /mnt/md0 and /mnt/md1, then bind-mount their subdirectories into place".  Which is interesting, to say the least, but it works quite well.
amused, silly, ha ha only serious

An announcement:

After careful consideration, I've decided I'm done with the Internet.  I'm just sick of dealing with loads of spam, spyware, bad browsers, software bugs, and everything else.

If anyone's interested in an 800 MHz rack-mountable server or an Athlon 64 3000+, please send me a letter.

Thank you, and goodbye.
  • Current Mood
    relieved relieved