Author Archives: admin

Auto-incremented fields in apache’s derby

Unlike MySQL and other SQL dialects, apache derby doesn’t support the AUTO_INCREMENT keyword. To create an auto incremented filed in derby, you can use The value of id is now incremented automagically on every insert. You don’t have to specify it manually in the insert command For instruction on how to create auto incremented fields in other SQL dialects, have… Read more »

Converting an ext3 partition to ext4

      No Comments on Converting an ext3 partition to ext4

Mounting an ext3 partition using ext4 fs drivers will usually speed-up your filesystem without actually changing the on-disk structures. Therefore it’s possible to revert to the ext3 driver without any problem. This allows you to easily benefit from delayed allocation (delalloc) and multi-block allocation (mballoc). Further performance enhancements are possible if you do change the on-disk structure, e.g. by using… Read more »

Bootstrapping a Fedora 15 rootserver

      1 Comment on Bootstrapping a Fedora 15 rootserver

In certain situations where you don’t have physical access to your server it can be quite helpful to know how to install a new os without physical media like CD/DVD/USB or pxe. This brief example shows you, how to bootstrap a rootserver (that of course already has a linux os installed that you can access through ssh) to install Fedora… Read more »

Free reserved space on ext4 partitions (or change reserved block percentage)

By default, 5% of a new ext2/3/4 partition will be reserved for important root processes and for fs performance reasons. However, there may be sound reasons to lower that percentage or even disable it completely (non-root partition, data-only storage, huge files, ext4 etc.). Let me quote Linux filesystem guru Ted Ts’o on this: If you set the reserved block count… Read more »

Starting a minimal X

      No Comments on Starting a minimal X

Just because I always forget and the parameters are somewhat non-trivial, here’s how you start an xterm inside X: Of course, the display name :0 is usually used by default, so you may need to use another one (:1 etc.) if you get an error like “Server is already active for display 0“. You can also select a different virtual… Read more »

Multiple main methods in a single jar archive

A Java archive file usually holds a manifest file that specifies the main class to start when you invoke java -jar jarfile. It’s something similar to this: When you distribute your jar file, a user can simply execute it (possibly even with a double click) without knowing anything about your package structure or location of the main class. But what… Read more »

Shutting down kvm guest on host shutdown

      No Comments on Shutting down kvm guest on host shutdown

Per default, kvm instances are suspended when the host OS shuts down. This is down through an init scripot (libvirt-guests) that comes out of the box with Fedora and RHEL 6. To change the guests’ shutdown behaviour, have a look at /etc/sysconfig/libvirt-guests. If you would like to send an ACPI system_powerdown event to the guest (i.e. a regular shutdown) instead… Read more »

Where are user based crontab entries stored?

      No Comments on Where are user based crontab entries stored?

Well, assumed that the user is either listed in /etc/cron.allow or not listed in /etc/cron.deny, i.e. the user is allowed to create his own cron table, there should be a file for every user that is allowed to and has a crontab in /var/spool/cron/crontabs/. Besides editing (crontab -e) or listing (crontab -l) his own crontab entries, root can also specify… Read more »