Skip to content

zfsonlinux and kernel 3.7.5-1-ARCH - up and running

A new kernel was released today for the arch linux. Currently, the zfsonlinux in the aur was not adapted on it. I really won't blame demizer, i just want to inform the users out there. My zfsonlinux automake tool was updated since there was a bugfix. Now everything should be fine :-).
2013-01-30 22:05

Edit Since today, everything is up and running :-).

ant system-full-upgrade
is doing all for you :-D.

bash - enhanced svn diff

Again i want to share a simple bash function for dealing with the svn diff. I was tired to add the file i want to compare multiple times so i wrote a small wrapper function. The syntax is the following. net_bazzline_svn_diff https://svn.mydomain.org/trunk https://svn.mydomain.org/branches/my_branch module/myModule/myFile.foo Enjoy it and be aware that there is no fancy validation logic inside.

#####
# Calles svn diff for two repositories.
# Call $repositoryUrlOne $repositoryUrlTwo $filePath
#
# @author stev leibelt
# @since 2013-01-30
####
function net_bazzline_svn_diff ()
{
  if [ $# -eq 3 ]; then
    svn diff "$1""/""$3" "$2""/""$3"
  else
    echo 'No valid arguments supplied'
  fi
}
Sourceode also available on github.com.

zfsonlinux and kernel 3.7.3-1-ARCH

The new arch kernel 3.7.3.1 has arrived my machines and guess what happens to my zfsonlinux? Pacman told me "error: failed to prepare transaction (could not satisfy dependencies)". But this wasn't an error since i know zfsonlinux has dependencies to a well defined kernel number. All i had to do was switching to my zfsonlinux automake utility and run the following steps:

\* ant uninstall \* pacman -Syu \* ant make \* ant clean
*Bam*, everything is working out of the box and i am really satisfied with this little tool. The effort to keep the system up to date while still having the beloved zfsonlinux working is now a minimal one. And if this is still to much, you can easily fork it and add a "for lazy people" target that is executing the four steps from above - lets see, maybe i will do it :-D.

php utilites lock and shutdown available

While i am dealing with cronjobs inside a private project, i run into some trouble with parallelism of cronjobs. A simple example would clear up this problem. Assume you have cronjob that generates cachefiles (like product descriptions or semi dynamic webcontent like cached rss feeds). You will end up by running a creation cronjob in an interval of x minutes. The problem that could happen is that a cronjob is already running while the next one is ready to go. You can deal with that problem by setting a maximum execution time in you script but this can lead into strange data and side effects. I want to solve this problem with two interfaces you can use. The first interface, called "Lock", is solving the problem with parallelism. If a lock is aquired you are not able to aquire a second one, meaning one cronjob not more. The second interface, called "Shutdown", is solving the problem with an early and controlled termination of a running cronjob. If the cronjob receives a shutdown, the cronjob can terminate itself i a good way. Both interfaces have a file based implementation. Unittests and also examples can be found inside the projects. The next idea I want to realize is an implementation of the Subject-Observer-Pattern. The general idea is that the first call of the cronjob is acting as a observer. The observer itself is chunking the work and split the work by calling (and observing) a number of cronjobs (of its own) as subjects.