Friday, November 28, 2008

Setting up LVM on an already-setup box

I have this box at work that someone else was nice enough to set up with Debian Lenny and a great big honkin' RAID5 array. We've already got the basic filesystem structure set up on the box, but we'd like to add the RAID as well.

I'm going to set up the RAID as its own volume group under LVM. This allows us, should the OS drive fail, to slap another drive with an OS on it into the machine, boot, and remount the RAID. It also allows us to dynamically add storage, say some sort of SAN, to the physical volume, then resize the logical volumes on the fly. It also simplifies things a little by keeping the OS volume group and the file storage volume group separate.

Being an LVM newbie, I'll be referencing A simple introduction to working with LVM and The LVM HOWTO. You can assume that most any LVM-specific command syntax I pulled out of one of those two sources.

Now, the first thing to do is set up a partition on the RAID array, as LVM runs on top of physical partitions. I do this with fdisk, because that's the way I learned it. :) If I were a bit more clever, or if I felt like it, I'd do this with a single call to sfdisk.

Next I create a physical volume for the RAID: pvcreate /dev/sda1, and then a volume group: vgcreate file-storage /dev/sda1. Checking my work with vgscan, I see:

Reading all physical volumes. This may take a while...
Found volume group "os" using metadata type lvm2
Found volume group "file-storage" using metadata type lvm2


Now I want to create a logical volume (LV) that encompasses the entire volume group. I do this by first examining the output of vgdisplay, where I see the line: "Free PE / Size 357375 / 1.36 TB" (I told you it was a big honkin' RAID. Also note here that "PE" means "Physical Extent", the size of one quantum of storage in LVM. One PE is exactly the same size as one LE, so here one LE is about 4 MB). I will thus create an LV of 357375 extents, lvcreate -n files file-storage -l 357375. With this done, it's time to format the LV.

After consulting with my colleagues, I've decided to use ext4 for the filesystem on the RAID. I like what I read about ext4, both on Wikipedia and from IBM, and as this box is slated to become a backup server, it seems like a good place to play with it. Before I begin, though, I'll update the kernel to the latest version in (Debian) testing: 2.6.26-1, so as to have the latest ext4 fixes that have been included in Debian kernels. Even with that, though, I'll want to add "nodealloc" to the line in my fstab for the RAID:

It should be noted that the stock 2.6.26 ext4 has problems with delayed allocation and with filesystems with non-extent based files. So until Debian starts shipping a 2.6.27 based kernel or a 2.6.26 kernel with at least the 2.6.26-ext4-7 patchset, you should mount ext4dev filesystems using -o nodelalloc and only use freshly created filesystems using "mke2fs -t ext4dev". (Without these fixes, if you try to use an ext3 filesystem which was converted using tune2fs -E test_fs -o extents /dev/DEV, you will probably hit a kernel BUG the moment you try to delete or truncate an old non-extent based file.)


At any rate, per the ext4 HOWTO, I'll create an ext4 filesystem on the "files" LV with: mke2fs -t ext4dev /dev/file-storage/files. And wait. And wait. And wait some more, because 1.36 TiB is a lot of space.

From here, the RAID is like any other filesystem. Pick a mount point, make sure to mount it "-o nodelalloc", and off you go.

CORRECTION: Debian kernel 2.6.26-1 does not support the "nodelalloc" mount option. I ended up installing kernel 2.6.27.7 from http://kernel.org/. As the "nodelalloc" option was only recommended for 2.6.26-based kernels, I am no longer mounting the ext4 filesystem with the "nodelalloc" option.

Installing Ubuntu 8.04 on an ASUS F8Va-C1 laptop

As my primary workstation, I just ordered an ASUS F8Va-C1 laptop from Newegg. On the surface, this thing looked slick. 2.53GHz Intel Core2 Duo processor, 4GB of RAM, ATI Radeon 3650 video card with 1G dedicated VRAM, and a 320GB HDD. It came with Vista installed, but I figured I could just resize the Windows partition and install Ubuntu. The best laid plans...

I decided to go with Ubuntu 8.10, Intrepid Ibex. Lacking a CD burner on my current machine, I had one of my colleagues burn a copy for me. I put the CD into my new laptop (after spending a good 15 minutes trying to figure out that F2 was the key to get into the BIOS - serves me right for not RTFMing) and turned it on. Splash screen came up, and eventually I was presented with a white screen and nothing more. No sounds, no cursor, nothing.

Then I tried 8.04, and at least got the LiveCD to boot. I tried doing the install from the LiveCD, but ended up getting SquashFS errors (i.e. bad sectors on the CD). I took the thing home after work, burned an 8.10 CD according to the Coasterless CD burning instructions for Linux (just in case I was having issues caused by a poorly-burned CD), and had the same results. I burned an 8.04 CD using the same instructions and got a little further, but again got SquashFS errors. I booted the CD via an external drive I had laying around, and got even further, but still got SquashFS errors. As it was the night before Thanksgiving, and I had to be up at 0500 to brine the turkey, I decided not to play with it any further.

Today I brought the laptop back into work and installed an Ubuntu 8.04 network install image onto a USB stick using UNetbootn. So far, this is going well. I've been able to set up my disk using LVM (unfortunately, in all the installation attempts I deleted the Vista install, but hey, it's Vista. I'll likely be putting XP Pro on the Windows partition.) I'm keeping my fingers crossed...

Those SquashFS errors, though, have me worried. I suspect that the laptop's internal CD drive is messed up - I need to do some tests to be sure.

Tuesday, November 25, 2008

iPhone vs. BlackBerry Storm

Our company is in the process of deciding on a single phone/PDA platform to standardize on. We've narrowed it down to two choices: iPhone and BlackBerry (I assume the BlackBerry Storm)

First of all, there's a study by SquareTrade that says the iPhone is "less than half as likely to fail" than phones from BlackBerry. In an IT environment that says a lot, because when a device fails, or starts to go south, it adds to IT costs - if nothing else, it's taking time away from IT that they could spend in maintenance and upgrades.

Next, there's a study from J.D. Power and Associates that says iPhone users are more satisfied with their phones than BlackBerry users. In J.D. Power's Business Wireless Smartphone Customer Satisfaction, Apple scored 778 points out of a possible 1000, while RIM (manufacturer of BlackBerry devices) only scored 703.

From here, let's look at individual user experience. Subjective, to be sure, but still important:

Mitchell Ashley Compares the Storm and the iPhone. In his comparison, he finds that he prefers the Storm for phone quality, touch screen (the Storm's touch screen is a "double-click" paradigm, like Windows, while the iPhone, like the Macintosh, is a "single-click" paradigm), keyboard, battery life, and expandable memory. The iPhone wins on multi-touch support, web browsing experience, and application support.

While Mitchell Ashley seemed pretty clearly in favor of the BlackBerry, the San Jose Mercury News wasn't as impressed. Although they also liked the BlackBerry's keyboard and call quality, they found it hard to click on things in the UI: "Sometimes ... I had a hard time clicking on icons I wanted: At times, the browser would zoom in on the icon rather than activating it. Or I'd end up clicking an adjacent link". They also found that the BlackBerry would tend to bog down when trying to do too many things at once, such as looking at photographs while listening to music. And while neither activity is particularly business-related, it's worth noting that these devices will probably end up getting used for a lot of non-business purposes as well. :)

In a NetworkWorld comparison, the reviewers were particularly impressed by the iPhone's WiFi capability. This allows the iPhone to connect to local wireless networks when available to access the Internet, saving on per-minute data fees. On a large download, this cost savings can be quite significant. On the other hand, the reviewers thought that even though the iPhone had gone a long way towards being useful for enterprise users (particularly by supporting Microsoft SharePoint and Cisco IPsec VPN) the BlackBerry was still the de facto standard for enterprise wireless devices. As an IT professional, I particularly like how the BlackBerry allows IT departments to put fine-grained security policies on the devices, going so far as to allow the internal digital camera to be disabled via a security policy. On the other hand, there's the keyboard:



Blackberry keyboard on left.

Now, it's possible that this keyboard can be configured to have one "button" for each key, but as pictured here, that keyboard might just be a deal breaker.

Something that is also useful to consider is the network. In both 2007 and 2008, Verizon have come out ahead of AT&T in terms of call quality. Business users tend to spend a lot of time on the phone, so call quality is very important. Additionally, a 2008 survey found Verizon superior in terms of customer service and reliability.

Let's talk price: $200 after $50 mail-in rebate for the BlackBerry Storm. $199 for the iPhone 3G (8 GB version, $299 for 16GB). Both prices are with two year contract. Note also that these are consumer prices, but I expect business prices to be proportional.

Finally, let's discuss support for Zimbra, the mail server we use here. We're also quite fond of its calendaring and contacts, and it would be awfully nice if those things could be synchronized to the phone, as opposed to just email. I'll begin with the iPhone.

Zimbra's official word on the iPhone states that synchronizing the iPhone's native email, calendar, and contacts with ZCS can be done by means of ActiveSync. This requires Zimbra Network Edition (i.e. the one you pay for, not the free one). There is also a mobile client "built for devices such as the iPhone" called iZimbra.

Zimbra's support for BlackBerry requires the user not only to have Zimbra Network Edition, but also BlackBerry Enterprise Server - a significant price tag. However, with these systems in place, you get:


  • Over-the-air synchronization of mail, address book, calendar in the native BlackBerry UI
  • Sync to all BlackBerry devices
  • Full access to Zimbra GAL
  • Search messages
  • Open / view attachments
  • Manage calendar events; accept / decline meetings
  • Administrators add / provision users directly in the BlackBerry Administration Console


This last bit troubles me a little. I'm used to adding and provisioning users in Zimbra's administration panel, but it looks here like I'd have to switch to doing things in this BlackBerry Administration Console. So maybe this solution is geared more towards organizations who already have a BlackBerry infrastructure in place.

So there you have it. After reading these articles, I'm leaning towards the iPhone. The BlackBerry has some nice things going for it - in particular, I'd love to experience the "tactile keyboard" thing that they're advertising - but overall, I think the iPhone is a more practical choice. It's more reliable, and there's less extra software to be put in place to synchronize it with Zimbra. It's what I'll be recommending.

First post! WOOT!

Welcome to my tech blog. I've just taken a position as a systems administrator for a company in Lawrence, Kansas, and I thought it might be nice to have a place to post all the tech-y stuff I encounter on a daily basis.

Opinions expressed on this blog are strictly my own, and do not necessarily represent those of my employer, who shall remain nameless.