Why didn’t I use LVM on everything?

Due to a series of historical accidents, I have the following disk space layout:

Partition Size Use
Disk 1 – 250Gb
/dev/hda1 2Gb dom0 root
/dev/hda2 2Gb dom0 swap
/dev/hda3 Rest part of vg “xen-space”
Disk 2 – 250Gb
/dev/hdc1 2Gb formerly dom0 root – unused
/dev/hdc2 1Gb formerly dom0 swap – unused
/dev/hdc3 Rest part of vg “xen-space”
Disk 3 – 400Gb
/dev/hde1 300Gb mounted as /dev/hdb on a domU
/dev/hde2 Rest part of vg “xen-space”

The root partitions of the three domUs are all lvs on vg “xen-space”. There is over 250Gb free on the vg.

What I would like to do is clean up the second drive to get rid of the extraneous partitions, and to grow the partition on /dev/hde1 to the full disk. So what I’m thinking of doing is the following:

  1. Migrate the content of /dev/hdc3 off using “pvmove” and “vgreduce”.
  2. Delete all three partitions on /dev/hdc3 and add it back to the vg using “pvcreate /dev/hdc; vgextend xen-space /dev/hdc”.
  3. Migrate the content of /dev/hde2 off using “pvmove” and “vgreduce”.
  4. Delete the /dev/hde2 partition and increase the disk of /dev/hde1 to fill up the drive, and use resize2fs to make /dev/hde1 use the whole partition.

The problem is that I don’t know if I can do this stuff without shutting down the domUs. And for the physical partition /dev/hde1, which is mapped to the /dev/hdb on one of my domUs, I don’t know if I have to shut down the domU or just umount it within the domU and remount it afterwards.

That was relatively painless

The box is up. It was only offline for about 20 minutes, tops. Everything seems to be working. Fingers crossed.

I officially love LVM. And I wish my big binary file archive was on LVM, because it’s getting nearly full and I want to expand it. Of course, any changes in it will probably require shutting down because of the way the file system is mounted through Xen.

Moment of truth

Tomorrow morning, I go out to the colo box and replace the existing one with my spiffy “new” Yellow Menace. I’ve tested the hell out of this one and it can handle all three domUs and the dom0 all doing dd’s from /dev/zero to the hard disk over and over again, which will be a nice change from the existing one freezing up throwing ext3 errors whenever I’m doing something disk intensive.

My plan is to pull out the old one, move the disks to the new one, boot it up, make sure I can log into the dom0 from home, and then go home to tinker with it. If things go as I expect, the services that live on here, like this blog, my mailing lists, my photo gallery, the Rochester Flying Club web site and others should only be off the air for an hour or so.

Then I’ll test the hell out of the old box when I get it home to see if I can reproduce the problem, and then see if I can fix the problem somehow, maybe with a new IDE cable. Then I’ll know how to advertise it on eBay – either as a working box, or a box with a suspect IDE controller but a probably fine SCSI controller.

And the productivity hits just keep on coming

Evidently it’s company policy that working at home must be requested 24 hours in advance, in writing. So if I find myself unable to come into work for some reason, they want me to stay home and do something else rather than doing useful work on our project. Well, I’ll miss the money, but I think they’re going to miss the work more.

Ice day

When this morning’s alarm clock went off, the radio was saying that Vicki’s place of work was closed because of an overnight ice storm. I looked outside and there was a good half-inch of clear ice on the trees, roads, and my car. And the local news web sites said that the state police were telling people not to drive if they could avoid it.

So I thought about what I’d be doing if I went to work, and it was just working on design documents. I have most of the documents I needed at home, so I thought “screw it” and decided to stay home.

I wanted to email people to tell them that I was going to do that, and I only had a few of their addresses. So I emailed the ones I had, and one of them emailed my new official direct supervisor (even though I really get my job assignments and direct supervision from somebody else, but she signs my time sheets).

She wrote me back. She’s evidently mad that I didn’t follow her new procedure, and phoned her for permission *before* I decided to stay home. In the past, I’ve always been trusted to work at home if I had work that could be done at home, so this seems like a real lack of trust on her part. But then again she’s new to the project and doesn’t know any of us that well – plus she has little to no day-to-day contact with us developers, so maybe she doesn’t know us well enough to know who to trust.

So instead of having a nice day at home where I could work productively but in a relaxed environment, I had to struggle to produce work while worrying if I’d just jeopardized my job.

Just for the record, I got more work done than I would have if I’d been at work.