Index ¦ Archives ¦ RSS > Tag: en

tgt is now available as a package

Estimated read time: 1 minutes

Today I packaged tgt an iSCSI target (server). The upstream package provides a large number of examples, though I thought it’s a good idea to note what I used for testing:

# egrep -v '#|^$' /etc/tgt/targets.conf
default-driver iscsi
<target iqn.2010-11.local.test:storage>
    backing-store /dev/sdb
</target>

Something offtopic: a rejourn patch accepted and a LibreOffice bug fixed today.


Handy Latex bookmarks

Estimated read time: 1 minutes

Today I had some Hungarian mathematical logic notes to type in Latex, and again I had to dig up the various references to get the proper symbols I needed.

I used the following pages:


QtSql vs. SQLite

Estimated read time: 1 minutes

The problem was the following: I had this example code and the size() method just gave me insane result all the time, while just changing the driver to QMYSQL made the code work properly. After asking on #qt, I have been pointed out that the SQLite backend of QtSql does not support the size() method. :/

So - for now - I’ll just use MySql for my unit tests, even if that means I have to manually truncate the contents of each table. Worths checking a bit later again, though - since I already used in-memory SQLite for my unit tests when I had a project in PHP with Doctrine, and it was working just fine.


A song mentioning Frugalware!

Estimated read time: 1 minutes

chee on #frugalware linked a song and its lyrics, mentioning Frugalware. Please don’t compare it to an OpenBSD professional release song, then you’ll like it! :)


Rejourn

Estimated read time: 2 minutes

The story is old, it was exactly 3 years ago when last time I switched the engine under my blog. That time I switched from my custom php/mysql blog to b2evolution, and I hoped that using that engine it’ll require less time to manage it. Actually this wasn’t true:

  • When the php-5.3 upgrade came, I had to manually fix stuff.

  • I got a lot of spam, even if the captcha provided by the ready-to-use b2evo plugin was enabled.

  • The last thing: It turned out that it created the SQL schema in latin2, so utf8 comments had problems.

At that point I had enough trouble to think about migrating away from b2evo. And then I found rejourn, which is quite close to what I think is ideal to me. I just changed it a bit:

  • Added asciidoc support next to markdown.

  • Added RSS support, as my blog is part of the Frugalware and the LibreOffice planet, and I didn’t want to lose those readers.

  • Added support for tags, so that I can have a feed with a given tag only (to avoid OT posts on planets).

Before you ask: yes, I plan to submit back these feature to rejourn, if Ram accepts them. ;)

And finally, some more benefits:

  • the whole blog is now static HTML, generated by a single Makefile (so it’s faster + the server load is lower)

  • I can blog while I’m offline then later just git push the result.

  • I no longer have to use WYSIWYG editors or write HTML manually, I can use asciidoc. :)

Update: I forgot to mention:

  • I put up a simple b2evo → rejourn conversion script.

  • I just discovered that when I get email about new comments, I can reply via email as well - that’s really cool! :)


Slides of my GSoC 2010 Presentation

Estimated read time: 1 minutes

As requested, the slides of my presentation, titled "GSoC project: Improving RTF Export - Presentation of a Go-OO student" are available here.

openSUSE Conference 2010

Estimated read time: 1 minutes

So I have been invited to this year's openSUSE conference in Nurnberg to give a short presentation about my GSoC work (the RTF export rewrite in LibreOffice).

As I expected, the really interesting part was to meet people I never had the ability to meet in person previously - and of course to learn other new stuff. :)

So some of the items I really liked:

  • We actually did some hacking, see here (thanks Cedric for pointing out the issue for me).
  • I learned about trigraphs - thanks Fridrich!
  • I now heard about flat ODF from Muthusuba.
  • Nice jokes by Tor about old UNIX systems where the default installation added a login for Kernighan and Ritchie by default. :)
  • Met great people from the LibreOffice team (Kohei, Noel, Muthu, Cedric, Tor, Fridrich, Petr, Lubos), and outside: Stephan Kulow (coolo, the ex-kde-master) and others.

To sum up: thank you for the invitation, I enjoyed it! :)


LibreOffice: even on ppc

Estimated read time: 1 minutes

You probably have read that ooo-build has been renamed to LibreOffice (technically it's just a rename).

Test packages for i686 available here if you want to test it on Frugalware.

Aaand this time, as a very special gift, ppc packages are available as well! :)

I just built it, but Bouleetbil was kind enough to provide a screenshot when he tested it.


gammu-1.28 issue

Estimated read time: 1 minutes

I recently upgraded gammu from 1.27 to 1.28 in -current and I noticed that the backup of my phone is now way slower than before. The fix was trivial (already backported to the Frugalware package as well) for the maintainer so it's now fine again.

Well done, mcihar! :)


Playing with libvirt

Estimated read time: 4 minutes

I've been playing with libvirt in the last two days. My motivation was that I saw:

  1. plain kvm is not that fast
  2. there is this virtio framework which aims to make it faster
  3. using virtio directly is hard, better not reinventing the wheel and just try libvirt

So if you want to try it yourself, you need to pacman -S libvirt, service libvirtd start. Check /var/log/syslog for error messages, in case it can't find some commands (bridge-utils, dnsmasq, etc.), install them.

If you want to create a new virtual machine, you need pacman -S virtinst. Then you can use something like:

virt-install --name=syncpkgcd-helicon --arch=x86_64 --vcpus=1 --ram=1024 --os-type=linux --os-variant=virtio26 --connect=qemu:///system --network network=default --cdrom=/virt/iso/frugalware-1.3-i686-net.iso --disk path=/virt/syncpkgcd/syncpkgcd.img,size=40 --accelerate --vnc --noautoconsole --keymap=us

See man virt-isntall for more info about the meaning of the switches. One trick: kvm can't handle the gfxmenu in our grub on the install cd, so you need to disable that. One way to do it is to use vim -b frugalware-1.3-i686-net.iso, search for "menu /boot", and change "gfx" to "#fx". Then you can run virt-install. It'll start the install in the background. The easiest way (for me) to connect to the console is to create an ssh tunnel to the server running the kvm machine (for example ssh -L 5900:localhost:5900 server), then run krdc localhost:0 on my own machine.

Next trick is that you need kernel support to boot from virtio disks (/dev/vda), that's enabled in frugalware-current.git but there were no rebuild yet, so you need to build it yourself for now.

Once the installation finished, the machine will be shut down. You can use virsh to start it. Here is a great summary about virsh subcommands. Something not to forget: if you want to automatically start the machine after the host booted, use virsh autostart $name.

(You can also do a service libvirt-guests add, that way all guests will be automatically suspended/resumed on shutdown/boot. Just to be clear: if you want the "resume if it was a proper shutdown, start if there was a power cut" feature: you need both init scripts because libvirtd will always start/resume autostart guests, but it will never suspend them on shutdown.)

If grub hangs after reboot, try creating a small (I used 32MB) separate /boot partition first, that should fix the issue.

virsh shutdown $machine won't work if you don't install acpid and enable it as well, so it's a good idea to do so.

The last trick: if you want to use the virt-manager gui from your local machine to manage a remote host, it isn't trivial to do so. First, it would try to login via ssh as root, and that's disabled by default. (And why would you enable it?). Also, even if you allow that, it would try to use nc -U which is supported by the openbsd nc only, the gnu nc does not have such a switch. Instead, we can use socat to connect to unix sockets. So I created a wrapper script under ~/bin with the following contents:

#!/bin/sh
if [ "$1" == "-U" ]; then
        sudo socat - unix-client:$2
else
        /usr/bin/netcat $@
fi

Don't forget to add PATH=what_you_want line to ~/.ssh/environment, and include the full path of ~/bin there. This way you can keep using gnu nc and you can also login as a user to manage your machines, as long as you set up nopasswd sudo for your user for socat.

Finally a mini-benchmark:

The SBU of yugo (i686 buildserver, a bit old HW) is 645 seconds, SBU of an i686 guest on helicon (c2q machine with 8g ram) is 264, SBU of the host build on helicon is 76.

I would call this usable (not right now, but once we sort out the kernel part). Finally something that is free software and is comparable to VMware ESX. :)

Update: I recently did the same install with 1.4pre1 (which installs -current, so the kernel is 2.6.36), the list of tricks you still need:

  • separate /boot (haven't tried without)
  • edit iso image to get rid of gfxboot (tried, still fails without)
  • some problem with grub, you need to manually add "(hd0) /dev/vda" to /boot/grub/device.map, then run grub-install /dev/vda

So no more custom kernel, boot from virtio works by default! :)

© Miklos Vajna. Built using Pelican. Theme by Giulio Fidente on github.