Doug’s Blog

Handily dispensing information to .00000001% of the world’s population

Archive for August, 2012

yum install subversion fails with “package is already installed”

Thursday, August 30th, 2012

I have a new CentOS installation in place using utterramblings.repo and got this mesage when doing a “yum install subversion”:

Transaction Check Error:
package apr-1.4.5-1.jason.1.x86_64 (which is newer than apr-1.2.7-11.el5_6.5.i386) is already installed
package apr-util-1.3.12-1.jason.1.x86_64 (which is newer than apr-util-1.2.7-11.el5_5.2.i386) is already installed

Now some posts on the ‘net say to do a “yum downgrade” but that seems just unreasonable! Instead, the solution was to only install the X86_64 version! So the following worked:

yum install subversion.x86_64

Expanding disk space on a KVM virtual machine

Thursday, August 16th, 2012

I use KVM on CentOS 6.2 and had a need to expand the disk space for one of the VMs. In some cases, it makes sense to have the VM’s disk space relatively small before you know how much you are going to need, and then expand it when ready. I hate having a few VMs that are running at 20% disk usage, knowing that I am wasting space. Of course, you could use your VM with auto-expanding space, but I don’t want the trade-off of reduced disk access speed.

So, in a succinct fashion here are the steps I used to get this done! In this example, my vm is called “vm10″ and I’m adding 200G

  • <shutdown your VM if running>
  • <cd into your VM image directory>
  • mv vm10.img vm10.img.bk
  •  qemu-img create -f raw addon.raw 200G
  • cat vm10.img.bak addon.raw >> vm10.img
  • <start the VM>
  • fdisk /dev/vda
  • p
  • d
  • 2
  • p
  • n
  • p
  • 2
  • <enter>
  • <enter>
  • p
  • t
  • 2
  • 8e
  • p
  • w
  • reboot
  • pvdisplay
  • pvresize /dev/vda2
  • lvresize /dev/VolGroup00/LogVol00 -l +100%FREE
  • resize2fs /dev/VolGroup00/LogVol00
  • reboot

And there you go! A newly sized VM.

“containing working copy admin area is missing” in SVN

Thursday, August 9th, 2012

I was recently working with SVN and somehow a directory got fubar’ed and I was getting that message when trying to commit.

The resolution was to do a fresh checkout in a temp directory, then TAR up the .svn folder for my fubar’ed directory and copy it over to my current SVN workspace. I had to make sure I still added any files that were not added in the other .svn folder, but that was no problem and my issue was resolved!