Xen: extend lvm of virtual machine

First: Make sure to shut down the virtual machine or to unmount the disk inside it. Once finished you can start to extend the logical volume on the hypervisor: lvextend -L+400G /dev/vg0/disk e2fsck -f /dev/vg0/disk resize2fs /dev/vg0/disk There might be a chance you need kpartx, growpart (provided by cloud-guest-utils) followed by resize2fs to grow the mounted partition. In case you shut down the virtual machine you may start it again with...

April 4, 2014 · 1 min

git: add manually removed files to index

If you ever manually remove files from a git repository you have to tell git they have been removed and add the files to the index to commit the changes afterwards: for FILE in $(git ls-files --deleted);do git rm $FILE;done

February 24, 2014 · 1 min

prevent TeamViewer from running on system startup

By default TeamViewer 9 starts its daemon on system startup, even if you won’t use TeamViewer in your current session. You can disable the daemon with the following command: sudo teamviewer --daemon disable In case you need TeamViewer the command teamviewer --daemon start will start the daemon.

January 20, 2014 · 1 min

Exclude LaTeX files from syncing with Seafile

If you’re working with LaTeX and store you tex-Files in a Seafile repository you might end up with tons of files which are generated by the LaTeX compiler. Since they don’t need to be tracked by Seafile I came up with the following solution. Place a file called seafile-ignore.txt in the root of your library and fill it with this: ## exclude LaTeX compile files from syncing *latex*/*.acn *latex*/*.acr *latex*/*.alg *latex*/*....

November 16, 2013 · 1 min

php5-mcrypt not working after upgrade to Ubuntu 13.10

If you are using the php5-mcrypt library in your projects you might experience that it’s no longer working after you have upgraded Ubuntu to 13.10. You can fix this with the following three commands I have found on stackoverflow [1]: sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available sudo php5enmod mcrypt sudo service apache2 restart [1] http://stackoverflow.com/questions/19446679/mcrypt-not-present-after-ubuntu-upgrade-to-13-10

October 21, 2013 · 1 min

USB-Keyboard not working to enter passphrase for encrypted LVM on Ubuntu 13.10

Ubuntu 13.10 was released a few days ago and I upgraded one of my machines. Everything went fine until I had to reboot. Choosing entries in the grub menu worked flawlessly but as soon as I had to enter my passphrase to unlock my encrypted partitions my keyboard (USB) no longer was working – it was dead. As I don’t have the option to use a PS/2-Keyboard (not owning such a keyboard, machine has no PS/2 port) I was locked out of my system....

October 21, 2013 · 1 min

backup your ownCloud contacts via cron

If you ever wondered if there is a way to automatically backup your ownCloud contacts via cron here is the solution: <?php date_default_timezone_set('Europe/Berlin'); error_reporting(E_ALL); $date = date('Y-m-d-h-i-s'); $user = 'your_owncloud_username'; $password = 'your_owncloud_password'; $cmd = "wget --no-check-certificate --user=".$user." --password=".$password." -O ".$date."_contacts_".$user.".vcf https://your.owncloud.tld/remote.php/carddav/addressbooks/".$user."/contacts?export"; $dump = exec(escapeshellcmd($cmd)); ?> You just need to fill in your credentials and modify the path to your ownCloud installation.

August 7, 2013 · 1 min

set up your own sync server for Mozilla Firefox using FSyncMS on Debian

Recent versions of Firefox include the ability to sync your bookmarks, passwords, preferences, etc. with a remote server. You can choose between a server provided by Mozilla or a custom server. There seem to be two solutions to deploy a custom server: Firefox Sync Server http://docs.services.mozilla.com/howtos/run-sync.html FSyncMS https://github.com/balu-/FSyncMS/ Firefox Sync Server requires Python 2.6 and Virtualenv. Since there are no packages for Debian you will have to use make and install some libraries to get it running....

August 2, 2013 · 2 min

Virtualmin: Enable Sieve for Dovecot and Procmail

aptitude install dovecot-sieve dovecot-managesieved /etc/dovecot/conf.d/15-lda.conf # Address to use when sending rejection mails. # Default is postmaster@<your domain>. postmaster_address = mail@domain.tld protocol lda { # Space separated list of plugins to load (default is global mail_plugins). mail_plugins = $mail_plugins sieve } /etc/dovecot/conf.d/20-managesieve.conf service managesieve-login { inet_listener sieve { port = 4190 } } Edit /etc/procmailrc and fill in the DELIVER parts. I’ts important to make continued use of procmail because spam filtering is done there....

July 15, 2013 · 1 min

exchanging a defective drive in a software RAID

setup: server with configured software RAID1 and LVM. If you have configured mdadm monitoring correctly you might receive an email like the following one day: A Fail event had been detected on md device /dev/md/0. It could be related to component device /dev/sda1. This requires immediate action because one of your hard disks is possibly broken. # cat /proc/mdstat Personalities : [raid1] md1 : active raid1 sda2[0](F) sdb2[1] 2929739071 blocks super 1....

June 30, 2013 · 3 min