Archive for July, 2010

13th July
2010
written by Nick Anderson

IMHO one of the great benefits of virtualization is the ability to properly size your guests. Many times 512M memory and an 8G / is plenty. Increasing memory for a virtual machine is typically pretty straight forward, but there are several options when adding disk space. Mounting the space in the file system and doing something with LVM are likely the most common paths.

Depending on the situation I typically lean toward keeping my small 8G root and mounting extra storage where needed in the file system. I think its the simplest solution for most cases. I don’t like ending up with a bunch of mounts, so in the cases where storage needs are spread across the file system growing the root becomes important. You can add a new virtual disk, partition it, toss it into the Volume Group and then extend your volume and file system. There is absolutely nothing wrong with this approach but having all those virtual hard drives attached just seems a bit hap-hazard and messy. When I need more space at / I think its much cleaner to just extend the partition that is in the VG of my systemroot. Anyway here are my notes. The block devices are specific to Xen but the actions should work on other platforms and on bare metal. My default partitioning scheme is as follows, /dev/xvda 2 partitions, 100M /boot, LVM with / being comprised of the full available space. Swap is on /dev/xvdb. This allows me to keep growing xvda and extending the second partition when I need to add space.

  1. Power vm off
  2. Create snapshot incase things go horribly wrong
  3. Extend virtual drive size
  4. Power vm on
  5. Fdisk device (/dev/xvda)
  6. Delete last partition
  7. Create new partition using default values
  8. Reboot vm
  9. Resize LVM Physical Volume (pvresize /dev/xvda2)
  10. Resize Logical Volume to fill new space (lvresize -l 100%VG /dev/VolGroup00/systemroot)
  11. Resize filesystem (resize2fs /dev/VolGroup00/systemroot)
  12. Reboot for good measure
  13. Delete snapshot
Tags: , , ,
12th July
2010
written by Nick Anderson

No one likes to forget to renew a domain. Its not wholly uncommon though. Microsoft forgot to renew passport.com in 1999, and hotmail.co.uk in 2003. Vivendi Universal forgot to renew its MP3.com in 2003, the Washington Post forgot to renew in 2004, and Foursquare forgot to renew their domain in 2010.

I stumbled on the check_domain nagios plugin this weekend so I figured I would make some quick modifications and roll it into a Zenpack. You can find ZenPacks.community.CheckDomain on my github page. It has a really boreing doomsday graph included. Hope someone finds it useful.

9th July
2010
written by Nick Anderson

Nginx is a great little web server. I have posted previously about using it as a reverse proxy. Weather your using it as a reverse proxy or as a normal webserver you will probably eventually want to know what its doing over time so you can adjust resources as necessary.

The other day I threw together a Zenpack to make it easier to setup monitoring on new Zenoss instances. It contains a command data source “check_nginx_ng” which is a slightly modified version of Chris Kellys check_nginx_ng which in turn was based on check_nginx by Mike Adolphs. So thanks to them for doing the majority of the work! If your interested you can pick it up over on github. ZenPacks.community.NginxStatus

BLOGROLL

ARCHIVE