<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" version="pto" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gal="http://norman.walsh.name/rdf/gallery#">
<info>
    
    
    
    
    
    
    
    
<title>The Upgrade Story</title><biblioid class="uri">http://norman.walsh.name/2005/03/09/upgrade</biblioid>
<volumenum>8</volumenum>
<issuenum>39</issuenum>
<pubdate>2005-03-09T17:26:06-05:00</pubdate>
<date>$Date: 2006-08-22 11:26:24 -0400 (Tue, 22 Aug 2006) $</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2005</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>A short story about upgrading the boot disk.</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#Gadgets"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#SelfReference"/>
</info>

<epigraph>
<para xml:id="p0">Linux. Because rebooting is for hardware upgrades.</para>
</epigraph>

<para xml:id="p1">As I said, the main server in our house
(“<systemitem class="systemname">hera</systemitem>”, in case you're curious)
was <link xlink:href="../07/goingDown">going down</link>. The problem
was an aging disk. Not yet dead, but making more noise than some
jet engines. Actually, I have a small stack of drives in that state
now; I must be the victim of a
<link xlink:href="http://en.wikipedia.org/wiki/Poisson_distribution">Poisson
distribution</link> over the 
<link xlink:href="http://en.wikipedia.org/wiki/MTBF">MTBF</link>.
Or something. </para>

<para xml:id="p2">Anyway, it was going to have to be replaced, but I
wasn't sure when until I saw 80Gb drives on sale for well under a buck
a gigabyte. I guess that's not news, but it still looks pretty
remarkable to me.</para>

<para xml:id="p3">The next problem was, how do I get all the data off the
old disk and onto the new disk? I could open
up the machine, install the new drive as a second drive, do the copy,
then open the machine up again and swap. Except, (1) it's tedious to get
the machine out of the closet, (2) I want to minimize downtime, and
(3) there aren't any spare drive bays in it.</para>

<para xml:id="p4">Well, one of the other dying drives is my
external Firewire drive. Its main problem is disk errors and one of them
occurs at an inopportune moment in the boot cycle: it hangs the IEEE1394
driver in the laptop
when I attempt to access it. Ok, here's a plan: let's rip open the
external enclosure, put the new drive in there, hang it off the laptop,
<command>rsync</command> the data, then swap the new drive into
<systemitem class="systemname">hera</systemitem>. Works for you? Works
for me.</para>

<para xml:id="p5">Pop off the plastic clips that hold the drive
case together.</para>

<gal:image rdf:resource="images/20050308-165242"/>

<para xml:id="p6">Open up the drive.</para>

<gal:image rdf:resource="images/20050308-165445"/>

<para xml:id="p7">And discover that it's held together
<emphasis>with tape</emphasis>.</para>

<gal:image rdf:resource="images/20050308-165517"/>

<para xml:id="p8">Rip all the tape off and discover…it's held together with
<emphasis>four perfectly good mounting screws</emphasis>. What the heck was
all that tape for?</para>

<gal:image rdf:resource="images/20050308-165816"/>

<para xml:id="p9">Pull the drive off.</para>

<gal:image rdf:resource="images/20050308-170033"/>

<para xml:id="p10">Swap in the new one and perform the steps in reverse.
Except for the tape, of course.</para>

<para xml:id="p11">Next step, partition the new disk. I wanted to make
the partitions on the new disk the same as the partitions on the old
disk so that all the mounts and stuff in the init process would work
without any fiddling. To do that, I compared the old partition table to
the new one…and discovered that the new disk is <emphasis>eight
times</emphasis> larger than the old one. And twice as large as the
second drive in there. The new disk is going to replace <emphasis>both
of them</emphasis>, with room to spare.</para>

<para xml:id="p12">The <command>rsync</command>s run overnight. Time to
swap drives.</para>

<para xml:id="p18">Pull the drive out of the external enclosure,
pull <systemitem class="systemname">hera</systemitem> out of the closet,
open it up, swap. Done.</para>

<para xml:id="p13">Almost. See, while I got the partitions right and
made the right partition bootable, I didn't actually
<emphasis>install</emphasis> any sort of boot record. Did I
remember to make a boot floppy first, like I reminded myself to do
before I ripped the old disk out? Of course not. Time to wack the old
disk back in for a minute to make a boot disk.</para>

<gal:image rdf:resource="images/20050309-160025"/>

<para xml:id="p14">There. Close it up, put it back in the closet, reboot,
and…it all just works. Sweet. Even better, my big external drive with the
disk errors doesn't cause any problems as the second IDE drive in
<systemitem class="systemname">hera</systemitem>. It still has disk errors,
of course, but now I'll be able to copy the data off it before it becomes
a paperweight.
</para>

<para xml:id="p15">Now what do I do with three hard drives that all sound
like jet engines taking off? A grand total of 70Gb, worth about fifty bucks
if they were brand new. I'll think of something, I suppose. Temporary storage
for the data on the disk with errors, for a start.</para>

<para xml:id="p16">By the way, check out the “light tubes” used
to direct the light from the LEDs in the back of the enclosure to
where the end user can actually see them on the front.
</para>

<gal:image rdf:resource="images/20050309-170634"/>

<para xml:id="p17">Cool.</para>

</essay>

