Moving LVM volumes to a different volume group
by Sander MarechalI recently ordered a brand new PowerEdge T105 server from Dell because my current home server, a HP ProLiant G3, is much too power hungry for my liking. It consumes about 300 Watt round the clock, increasing my power bill by nearly € 50 a month. The T105 consumer about a third of that, usually less. The new server came with an 80 GB hard disk. I partitioned it with LVM, installed Debian Lenny and moved over the bulk of my things from the old server to the new server. I did that manually over the course of two weeks because it was a good time to restructure and upgrade many other things in the process.
When I was done only one thing remained: my media collection, which is stored on a 500 GB RAID1 array on the old server. That RAID1 array is also partitioned using LVM in a single 500 GB volume group. I took the two drives out of the old server, put them in the new server, copied over /etc/mdadm/mdadm.conf from the old server and all was well. Nearly. My media collection only uses a small part of the 500 GB volume group, so I wanted to move the OS volumes from the 80 GB volume group to the 500 GB volume group. That way I could take out the 80 GB disk and save some power. Problem: There is no obvious way to move a logical volume from one volume group to another. Additional problem: I can’t run the OS from the 80 GB volume group when I am migrating them. Cue SytemRescueCD.
Package Management Sudoku
Russell Coker recently wrote a post entitled “Ownership of the Local SE Linux Policy”. This post has nothing to do with the substance of his post, which is a discussion of how distributions should configure SELinux by default. I know nothing about SELinux, but something that Russell said in passing caught my attention:
I am not aware of the Debian package dependencies (or those of any other distribution) being about to represent that the postfix package depends on selinux-policy-default-postfix if and only if the selinux-policy-default package is installed. Please note that I am not suggesting that we add support for such things, a package management system that can solve Sudoku based on package dependency rules is not something that I think would be useful or worth having.
As it happens, a little-known fact about the Debian packaging system is that you can, in fact, describe Sudoku puzzles in it!
From: Daniel Burrows’ Blog.
Ubuntu package repositories removed
The package repository at http://packages.jejik.com is no more. I created it way back in 2006 to host packages for gnome-hearts for Ubuntu Dapper Drake because the initial gnome-hearts release came too late to get into the universe repository at that time. Starting with Ubuntu Edgy gnome-hearts has always been in the Universe repositories for Ubuntu. It␂s been over two years since Dapper Drake so it’ time to retire the old repositories.
In the unlikely case that you are still running Dapper Drake or use a machine that was upgraded from Dapper Drake, please remove http://packages.jejik.com from your apt sources list.
Subversion repositories relocated
by Sander MarechalI recently bought a new server because my current server sucks almost as much power as the average 4 person household :-) Bugzilla, the subversion repositories and the Subversion webinterface have been moved to the new server.
Because I was moving anyway I have taken the opportunity to move the Subversion server from the svnserve protocol to Apache with SSL. That means that the Subversion URLs now start with https:// instead of svn://. The paths themselves remain unchanged.
The SugarCRM cache directory demystified
by Sander MarechalUpdated 2009-01-07. One of the projects I am working on at the moment at my day job is customizing SugarCRM. We want to start managing all changes to SugarCRM using subversion, so we need to know which bits should be under version control and which bits should not. During my analysis I came across the ill‐named and infamous cache directory.
SugarCRM’s cache is anything but that. I already knew that uploaded files and e-mails were also stored in the cache directory, but I needed to know exactly what was in the cache so I can make some informed decision on what to put under version control and what bits of a production system should be backed up. I found my answer, after a whole lot of searching, reading the SugarCRM source code and asking around. It turns out that the cache directory contains a hodgepodge of user data files, configuration files and—oh yes, there are some real cache files in there as well.
If there is one thing to take away from this article it’s “Don’t mess with the cache unless you know what you’re doing”. That bears repeating:
“Don’t mess with the cache unless you know what you’re doing”
With that firmly burned into the back of your eyeballs, here’s an overview what the cache directory contains.
Easily develop and deploy web applications from subversion
by Sander MarechalUpdated 2008-28-10. Proper version control is a must for everyone who programs more than a few lines of code. Even if you develop your applications all by yourself it is very handy to be able to branch and merge your code, be able to roll back to previous versions or undo changes you made in the past. It works great for regular applications, but managing web applications or websites is a tad harder for two reason: You need a webserver to get your application going and you usually have to manage database revisions as well.
Keeping database revisions in sync with your code revisions is a complex subject that I will leave until another time. In this article I will show you how you can configure your own computer or development server in such a way that checking out or deploying a web application is just as easy as any other piece of code.
First I will show you how to configure Apache on your development server so that it picks up your checked out working copies as separate subdomains. Using this, you can simply make a checkout of your project and it will automagically be up and running. No need to touch the Apache configuration. After that I will show you how to use dnsmasq so you can achieve the same effect on your own development machine. That way you can develop your web applications locally and you won't need a central development server. In my examples I will be assuming you use subversion for your version control, but it works virtually the same with other version control packages, such as git or bazaar.
Webserver relocation
Update: The server move was successful!
On August 8th from 23:00 to 00:00 GMT our main webserver will be down. The machine be moved to a new location inside our hosting provider's datacenter. That means that the main website will be down. All services running on subdomains (like the mailinglists, subversion and bugzilla) will keep working during that time.
Note that e-mail is handled by our main server as well. That means that any e-mail you send during the downtime will not be received!