It's a kind of magic.

open-future

open-future

Restore Amanda Backup

I'm writing this blogpost so I can quickly find the needed commands to restore a file from an amanda backup. Below is a procedure on how to extract the LocalSettings.php file. The /data/amanda/tapes is the directory where the virtual tapes are located. The host is backup, amanda org is Daily.

[root@backup backup]# amrecover Daily -s backup -t backup \
-d file:/data/amanda/tapes
AMRECOVER Version 2.5.0p2. Contacting server on backup ...
220 backup AMANDA index server (2.5.0p2) ready.
200 Access OK
Setting restore date to today (2009-12-02)
200 Working date set to 2009-12-02.
Scanning /data/amanda/holding...
200 Config set to Daily.
200 Dump host set to backup.vsco.be.
Trying disk / ...
Trying disk rootfs ...
Can't determine disk and mount point from $CWD '/backup'
amrecover>

Xen attach disk live

I had to resize a lvm-volume with swap on a xen domU without bringing it down. I'm just making a small how-to so I don't forget it in the future.

On the host create a swapfile big enough to get the currently used swap in it.
dd if=/dev/zero of=swapfile bs=1k count=1500000
mkswap swapfile
swapon swapfile
swapoff /dev/xvdb1

On the Dom0 Xen-server:
xm block-detach server01 /dev/xvdb1
lvresize /dev/vg0/server01_swap -L 2G
mkswap /dev/vg0/server01_swap
xm block-attach server01 phy:/dev/vg0/server01_swap /dev/xvdb1 w

Xen with a lot of disks

I got an error yesterday when trying to create a xen virtual machine with a lot of disks.
I had to add 32 disks on the machine, which would be used to backup the hard drives.
The error was Unable to find number for device (sdq1). I had devices up to sdab1, but he already stuck at the sdq1.
How to work around this problem you ask? Really easy it seems: Just use other device "types" for the disks beginning at sdq1. So sdq1 became hda1.
And all went well.
Viva Xen!!

dist-upgrade broke my debian squeeze

As I was doing updates yesterday I ran into some serious problem. How this happened:
Well I did an apt-get upgrade which first of all broke my nvidia driver. I also had messages like: udev: missing sysfs features; please update the kernel or disable the kernel's
CONFIG_SYSFS_DEPRECATED option; udev may fail to work correctly.
So I did a dist-upgrade to fix the nvidia problem and the sysfs message. This upgraded to kernel 2.6.30-2-686 and broke my system.

selinux not giving errors

Sometime you have problems with selinux, but you don't see any error messages in the audit.log. Using the following command will give you more output in the log:

semodule -b /usr/share/selinux/targeted/enableaudit.pp

Sound problems debian squeeze

I upgraded to debian squeeze some time ago. In debian lenny I sometimes had problems with the sound card not being found.
On lenny I used alsaconf to rescan the cards and reload the modules needed for them.
It seems now that the alsaconf script isn't included anymore in the alsa-utils package. At first all seemed ok in squeeze, I always had sound. But today, the sound card wasn't detected.

I have an Intel onboard card:
Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller

So how do we fix this? Not that hard it seems, just force the reload of the sound modules: