A Visit to the UNM Center for Advanced Research Computing

One of my students hooked up our class with a visit to UNM CARC. (Thanks Hector!) CARC is the UNM Center for Advanced Research Computing. Most people pronounce it “Car-See,” which leads all too quickly to “the Car Center,” which is a poke at the fact that the center operates in the old Galles Chevrolet building.

Despite the building’s provenance, CARC is home to some serious supercomputer horsepower. Check out their website at http://www.hpc.unm.edu, and their available local firepower at http://www.hpc.unm.edu/systems-table.

What makes this operation really crackle is its gateway to Encanto, the Intel supercomputer housed at Intel’s Rio Rancho plant. (See http://newmexicosupercomputer.com/encanto.html.) The Encanto gateway project will bring 33 gateways to locations across New Mexico, which offers the fascinating prospect of supercomputer access for the common person. Or at least the common person with “embarrassingly parallel” computing requirements.

Encanto is aimed squarely at business uses. One of the obvious ones, demonstrated to us by Tim Thomas and center director Dr. Susan Atlas, is graphical rendering. They showed us 3D videos from several projects, which are in fact a blast to watch with the Active 3D glasses.

But the center is also active seeking UNM departments, faculty and graduate students who can put their clusters to work. They’re primarily focusing on C, C++ or Java code that can fork endless threads, but my interest is piqued by the opportunities this could offer my BRINM associates at the Mind Research Network.

This group melds MRI and MEG images using a monstrous MatLab process, resulting in video of the brain’s electronic workings. You can bet this is not simple stuff. But MatLab is a single-threaded application, so I’m thinking about code to parse the two sets of images (MRI and MEG) into zones, submit multiple simultaneous jobs, and render outputs that could be stitched back together. Or something like that.

In the mean time, if you’ve got the least excuse, I suggest you arrange for a visit to CARC. The people are nice, and the hardware is ridiculously awesome.

iPad-controlled Helicopter!

“iPad-controlled helicopter hits shelves in September”: is the shiver I feel panic or anticipation?

Open another tab in your browser by clicking this: http://tinyurl.com/3yh6un4. Click past the annoying ad.

There, now what’s that sensation you’re feeling, after reading that? I feel like the little cartoon Devil has appeared on one shoulder, the Angel on the other. Sort of. The Devil is wearing spectacles and carries a BackTrack DVD; the Angel is actually a kid, gleefully examining his wings.

“Every IT department should have one, no?” asks the wizened hacker on my left. “Send it in remotely to reboot the servers, answer alarms. It’s great! Two cameras!”

“Well, yes,” I admit, “but -“

“But nothing! That damn thing’s a hacker’s dream! If I can get it inside your perimeter you’re screwed! Hell, it may only have to get in wireless range….”

“I want to fly it,” says the kid on my right shoulder. “Can I get between the racks?” He flaps his wings eagerly. “Can I reboot the servers? Maybe just one?”

“Oh good lord,” I mutter. Just you watch: companies will be sending us those things, free. All you have to do is let it hover around you all day and show you advertisements. Everyone will always know where you are, what you’re doing, what color panties I bought my wife last time. I walk past Victoria’s Secret and an ad flies out at me screaming: “Glenn! Glenn! How’d you like those panties? Do you need some more?”

Have you seen “The Minority Report”? Oh. My. God. It’s coming true.

Removing a disk from a Logical Volume set

Has your favorite Linux distribution changed its default partitioning scheme to a logical volume layout? Why did they do this, and what does it mean?

Put simply, logical volumes let you grow a filesystem by making multiple physical partitions look like a single logical partition. Cool, huh? If you keep filling up /var, you can splice some more space into it! But if you lose one of the disks of your volume set, you’ll be thinking differently about this method of storage.

Pros and cons aside, one task I don’t find well documented is the job of “deconstructing” a volume group after a default installation creates one. If you’re only using one disk, it’s not much of an issue, but if you end up with a volume group spread across two disks and really wish you could handle those disks separately, you’ve got a tricky process to deal with.

Let me give this a shot:

Step 1: Moving Data
You’re going to need to move data from the logical volume so you can shrink it. I have to leave it to you how you want to do this. In my case, workstations were set up with an 80 GB drive originally, and a 750 GB drive was added later, unfortunately in a volume group configuration. I say unfortunately because damage to one disk results in pretty much total loss of data, and the researchers I support only had to experience it once to insist that volume groups be gone, or at least dependant disks.

So in my case I removed the contents of /home, which was the largest mass of data.

Run a df command once you’ve reduced your data to be sure it will fit:
df –h

Once I had less than 80 GB of data total, I knew it would fit on the original disk. Adjust your goals as necessary.

Step 2: Resize the filesystem
If you’re using ext2/ext3, this is a snap. In fact, you can grow (not shrink) ext filesystems while they are live (an impressive trick). But we’re shrinking the filesystem, so it’ll have to be offline.

I’m working on CentOS in this case, so I booted to the live DVD and at the boot prompt entered:
linux rescue

When it asks to scan the filesystems, click “Skip”.

If you’re not familiar with resizing ext filesystems, take a look at this great article on HowToForge: “How To Resize ext3 Partitions Without Losing Data”, http://www.howtoforge.com/linux_resizing_ext3_partitions.

Or for a quicker set of instructions, go to “System Recovery Week: Using LVM In Rescue Mode”, at http://dailypackage.fedorabook.com/index.php?/archives/159-System-Recovery-Week-Using-LVM-In-Rescue-Mode.html.

One critical thing to note is that while you’re in rescue mode, you’ll have to preface the usual commands (vgscan, lvcreate, etc.) with their actual binary name, lvm.

The short version: run these commands:

lvm vgscan  
# to find VGs

lvm vgchange –ay 
# to activate VGs

lvm lvs
# to list logical volumes

e2fsck -f /dev/VolGroup00/LogVol00
# you have to run a filesystem check first

resize2fs /dev/VolGroup00/LogVol00 75G
# to shrink the filesystem down to a size that will fit on your disk, in my case 80 GB

lvm lvresize VolGroup00/LogVol00 –size 76G
# to shrink the logical volume; note the slightly larger size

resize2fs /dev/VolGroup00/LogVol00
# to grow the filesystem to fit the logical volume space; note not size specified

lvm pvmove /dev/sdb1
# to remove sdb1 from the logical volume; note this may be a partition, or a whole disk, e.g. sdb

vgreduce VolGroup00 /dev/sdb1
# to remove sdb1 from the entire volume group

See this discussion for a review of removing disks from an LVM at The Linux Documentation Project: http://tldp.org/HOWTO/LVM-HOWTO/removeadisk.html.

At this stage, the volume group was entirely contained on my 80 GB drive, leaving the 750 GB drive to be fdisked with a single partition.
I moved my backed-up data from /home onto this new partition, mounted it as /home, and changed /etc/fstab to make it permanent.

Now my researchers can take their own data disk from any machine, should that machine die, and be able to access their data by putting that drive in any other machine. This is less high-tech than using volume management – and a whole lot less fragile!