<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>azouhr</title>
	<atom:link href="http://azouhr.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://azouhr.wordpress.com</link>
	<description>Daily Linux Stuff</description>
	<lastBuildDate>Fri, 09 Mar 2012 21:53:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='azouhr.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>azouhr</title>
		<link>http://azouhr.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://azouhr.wordpress.com/osd.xml" title="azouhr" />
	<atom:link rel='hub' href='http://azouhr.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Persistent IUCV Network Devices</title>
		<link>http://azouhr.wordpress.com/2012/03/09/persistent-iucv-network-devices/</link>
		<comments>http://azouhr.wordpress.com/2012/03/09/persistent-iucv-network-devices/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 21:53:30 +0000</pubDate>
		<dc:creator>azouhr</dc:creator>
				<category><![CDATA[Mainframe]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[udev]]></category>
		<category><![CDATA[z Linux]]></category>
		<category><![CDATA[IUCV]]></category>
		<category><![CDATA[SLES]]></category>

		<guid isPermaLink="false">http://azouhr.wordpress.com/?p=170</guid>
		<description><![CDATA[On mainframes, Inter User Communication Vehicle provides a means to exchange data between two guests in z/VM. Some time ago, this has been one of the preferred networking methods between two Users (virtual machines) on z/VM. From a linux perspective, &#8230; <a href="http://azouhr.wordpress.com/2012/03/09/persistent-iucv-network-devices/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=170&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On mainframes, Inter User Communication Vehicle provides a means to exchange data between two guests in z/VM. Some time ago, this has been one of the preferred networking methods between two Users (virtual machines) on z/VM. From a linux perspective, IUCV is not a supported networking method anymore, although it actually still works quite nicely.</p>
<p>Setup as a pointopoint connection, IUCV needs a special machine that is run as a pointopoint partner and routes to the rest of the network if needed. With linux, it is quite easy to setup IUCV interfaces. The problems arise when you have more than one IUCV interface and must make sure that the IP configuration in /etc/sysconfig/network/ifcfg-iucv* is setup for the correct User.</p>
<p>In SLES11 and later, the hardware configuration of IUCV interfaces is done with udev rules. For each available connection, there is an extra file with a ruleset below /etc/udev/rules.d. By default, such a rules file looks like this:</p>
<pre># cat /etc/udev/rules.d/51-iucv-LINUX001.rules
ACTION=="add", SUBSYSTEM=="subsystem", KERNEL=="iucv", RUN+="/sbin/modprobe netiucv"
ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="netiucv", ATTR{connection}="LINUX001"</pre>
<p>The issue is, that during network device setup, all of the devices are simply setup as they are found. This is unfortunately not persistent and commonly results in connecting a User (virtual machine) with the IP address of a completely different machine. In the end, networking is simply broken.</p>
<p>For example, if you look at the  netiucv0 user, the following is found:</p>
<pre># cat /sys/devices/iucv/netiucv0/user
LINUX001</pre>
<p>However the actual device is configured in /etc/sysconfig/network/ifcfg-iucv36. To solve this, a special iucv device below the netiucv device must be configured. This is a task for udev. The above udev rule needs an extra line at the end:</p>
<pre>ACTION=="add", SUBSYSTEM=="subsystem", KERNEL=="iucv", RUN+="/sbin/modprobe netiucv"
ACTION=="add", SUBSYSTEM=="drivers", KERNEL=="netiucv", ATTR{connection}="LINUX001"
ACTION=="add", SUBSYSTEM=="net", KERNEL=="iucv*", SUBSYSTEMS=="iucv", ATTRS{user}=="LINUX001", NAME="iucv36"</pre>
<p>After this, the netiucv0/user is still LINUX001. In this case, an extra iucv36 is configured like this:</p>
<pre># cat /sys/devices/iucv/netiucv0/net/iucv36/device/user
LINUX001</pre>
<p>and now, the iucv36 device, like it is found in /proc/net/dev is the one that is configured with ifcfg-iucv36, really uses LINUX001 as pointopoint partner. For the sake of completeness, here is the configuration as it is found in /etc/sysconfig/network/:</p>
<pre># cat ifcfg-iucv36
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.0.127/24'
MTU=''
NAME=''
NETWORK=''
REMOTE_IPADDR='192.168.0.67'
STARTMODE='auto'
USERCONTROL='no'</pre>
<p>Note, that it is possible to use the same IPADDR for all of the configured IUCV interfaces. Only the pointopoint partners that are configured with REMOTE_IPADDR must have their own unique addresses.</p>
<p>When configuring the partner User, IPADDR and REMOTE_IPADDR are swapped of course.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/azouhr.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/azouhr.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/azouhr.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/azouhr.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/azouhr.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/azouhr.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/azouhr.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/azouhr.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/azouhr.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/azouhr.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/azouhr.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/azouhr.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/azouhr.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/azouhr.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=170&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://azouhr.wordpress.com/2012/03/09/persistent-iucv-network-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a76133e3efafb608f590a3d06daec68c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">azouhr</media:title>
		</media:content>
	</item>
		<item>
		<title>DRBD and Network Restarts</title>
		<link>http://azouhr.wordpress.com/2011/12/20/drbd-and-network-restarts/</link>
		<comments>http://azouhr.wordpress.com/2011/12/20/drbd-and-network-restarts/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 11:30:47 +0000</pubDate>
		<dc:creator>azouhr</dc:creator>
				<category><![CDATA[block devices]]></category>
		<category><![CDATA[DRBD]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[drbd]]></category>

		<guid isPermaLink="false">http://azouhr.wordpress.com/?p=147</guid>
		<description><![CDATA[Using drbd as a simple and reliable alternative to distributed block devices is quite common. Especially in primary/primary mode, it provides the possibility to host block devices for virtual machines on two different hosts. However, there is one annoyance that &#8230; <a href="http://azouhr.wordpress.com/2011/12/20/drbd-and-network-restarts/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=147&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Using drbd as a simple and reliable alternative to distributed block devices is quite common. Especially in primary/primary mode, it provides the possibility to host block devices for virtual machines on two different hosts.</p>
<p>However, there is one annoyance that any active user stumbles over at some point in time. After a network restart, it may happen, that the devices switch to standalone mode and do not even try to reconnect to their peer. The reason for this is, that when doing a network restart, the device is shut down for a short time. DRBD itself has no means to wait for hotplugging devices, and thus just cuts the network connection in that case.</p>
<p>I know of two methods to solve that issue on the operating system side.</p>
<ol>
<li>Create a script in /etc/sysconfig/network/scripts/ifup.d that contains the necessary code to reconnect the drbd device to its peer</li>
<li>The easiest way I know about is to switch the network interface to startmode nfsroot.</li>
</ol>
<p>To accomplish this, edit the configuration file of the device that is used to connect to the peer, like e.g. /etc/sysconfig/network/ifcfg-eth0 and change the line</p>
<pre>STARTMODE='&lt;auto|manual|onboot&gt;'</pre>
<p>to</p>
<pre>STARTMODE='nfsroot'</pre>
<p>This changes the behavior of the networking scripts to not shut down the interface during a network stop or restart event. However, when using this method, I still would recommend monitoring the connection state of drbd in /proc/drbd.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/azouhr.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/azouhr.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/azouhr.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/azouhr.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/azouhr.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/azouhr.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/azouhr.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/azouhr.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/azouhr.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/azouhr.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/azouhr.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/azouhr.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/azouhr.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/azouhr.wordpress.com/147/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=147&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://azouhr.wordpress.com/2011/12/20/drbd-and-network-restarts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a76133e3efafb608f590a3d06daec68c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">azouhr</media:title>
		</media:content>
	</item>
		<item>
		<title>Xen or KVM</title>
		<link>http://azouhr.wordpress.com/2011/12/04/xen-or-kvm/</link>
		<comments>http://azouhr.wordpress.com/2011/12/04/xen-or-kvm/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 12:21:36 +0000</pubDate>
		<dc:creator>azouhr</dc:creator>
				<category><![CDATA[block devices]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://azouhr.wordpress.com/?p=149</guid>
		<description><![CDATA[Since little more than half a year, I am in the process of installing a new virtualization Platform. One of the hardest decisions to make was if we should use Xen or go with KVM. We already have Xen in &#8230; <a href="http://azouhr.wordpress.com/2011/12/04/xen-or-kvm/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=149&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since little more than half a year, I am in the process of installing a new virtualization Platform. One of the hardest decisions to make was if we should use Xen or go with KVM. We already have Xen in production and I know that it works well. From KVM we expect, that it will be growing faster then Xen and be the right thing on the long run.</p>
<p>The machines that I have as hosts are quite powerful. They are 48 Core AMD Opteron with 256 GByte of memory, and FCoE based Storage devices for the guests. We are using a converged network where both, FC and Ethernet, go over the same redundant 10GBit ethernet line. Storage is external FC storage from different devices.</p>
<p>The most important features that we need for such a platform are these:</p>
<ul>
<li>Stability</li>
<li>Performance</li>
<li>Tools</li>
</ul>
<p>After doing a number of tests, it is obvious that both systems are stable. I did not encounter crashes related to the hypervisor technology.</p>
<p>Performance is also an interesting point. Especially the speed of block and network devices is not the best when using virtualized guests. This holds true for both, KVM and Xen. Note, that comparing CPU or Memory performance in standard environments is not very useful. Even if one of the systems performs slightly better, both are very close to hardware speed in terms of CPU and Memory. However outbound connectivity is an issue for both.</p>
<p>One exception is when you invest some more effort and use the new NUMA features provided with the latest Xen. The IO performance of network devices was roughly 4 times the performance without using NUMA.</p>
<p>One of the drawbacks when using NUMA on Xen is, that you have to use the tool &#8220;xl&#8221; instead of &#8220;xm&#8221;. For some unknown reason, you can dump configurations from &#8220;xl&#8221; only in SXP format, but &#8220;xl&#8221; won&#8217;t let you start a guest from such a configuration. This renders the tool quite useless in a production environment.</p>
<p>This brings me to Tools. For me, Xen has the tools that are easier to operate than KVM. Especially life migration syntax is way easier on Xen. On the other hand, both are simple enough to be operated by experienced people. For those that do not like the command line, &#8220;libvirt&#8221; offers a number of graphical tools that can cope with both, Xen and KVM.</p>
<p>One thing to mention is, that with Xen you can enable a locking mechanism that prevents you from running the same guest on different Hosts. I have yet to find similar functionality on KVM.</p>
<p>Now let me add some words about issues I encountered. As I already told, we have Xen running productive and it works quite well. I also found the Xen developers being relatively responsive when some bug occurs. From my other blog entries you can see, that Xen also offers a number of debugging capabilities.</p>
<p>With KVM, there are two major issues I have right now</p>
<ul>
<li>Life migrations are not safe in KVM. I repeatedly encountered block device corruptions when doing life migrations. This also holds true when using &#8220;cache=none&#8221; for the qemu configuration. Simple migrations still work without problems.</li>
<li>The networking inside a 10GBit environment behaves strangely. When connecting a Guest to a remote server I get connection speeds at about 30-40kByte/s. All the connections between the respective hobs in this environment work as expected (Guest -&gt; Host, Host -&gt; Server).</li>
</ul>
<p>Resume:</p>
<p>Both, KVM and Xen are usable if you do not need life migrations. OTOH life migration is an essential feature in a production environment. It enables you to service a Host without taking down the guests. If the life migration feature is not fixed until SLES11-SP2, I will have to return to Xen.</p>
<p>For the moment, KVM is not on par with Xen. However, in the long run I expect that KVM will gain momentum and eventually be the platform of choice. If I had to select a platform in a critical business environment today, I would go with Xen. On the long run, it might be better to go with KVM, but this depends on the further development of KVM.</p>
<p>The major development areas that will influence my decisions in future will be</p>
<ul>
<li>IO Speed</li>
<li>Support of NUMA architectures</li>
<li>Support for HA features like &#8220;Remus&#8221; or &#8220;Kemari&#8221;</li>
</ul>
<p>The race is still open&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/azouhr.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/azouhr.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/azouhr.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/azouhr.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/azouhr.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/azouhr.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/azouhr.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/azouhr.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/azouhr.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/azouhr.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/azouhr.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/azouhr.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/azouhr.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/azouhr.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=149&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://azouhr.wordpress.com/2011/12/04/xen-or-kvm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a76133e3efafb608f590a3d06daec68c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">azouhr</media:title>
		</media:content>
	</item>
		<item>
		<title>Migrating a Xen VM to KVM on openSUSE</title>
		<link>http://azouhr.wordpress.com/2011/10/21/migrating-a-xen-vm-to-kvm-on-opensuse/</link>
		<comments>http://azouhr.wordpress.com/2011/10/21/migrating-a-xen-vm-to-kvm-on-opensuse/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 10:10:30 +0000</pubDate>
		<dc:creator>azouhr</dc:creator>
				<category><![CDATA[KVM]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://azouhr.wordpress.com/?p=135</guid>
		<description><![CDATA[Xen and KVM are the two major virtualization techologies that are freely available on linux. Although they are quite comparable performance wise, it still may be interesting to convert a Xen virtual machine to a KVM virtual machine. Xen and &#8230; <a href="http://azouhr.wordpress.com/2011/10/21/migrating-a-xen-vm-to-kvm-on-opensuse/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=135&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Xen and KVM are the two major virtualization techologies that are freely available on linux. Although they are quite comparable performance wise, it still may be interesting to convert a Xen virtual machine to a KVM virtual machine.</p>
<p>Xen and KVM both use very similar images. However, there are some subtle differences in the setup:</p>
<ol>
<li>Xen block devices use the names &#8220;xvd?&#8221; where KVM uses &#8220;vd?&#8221;.</li>
<li>The serial device in Xen is &#8220;xvc0&#8243; while on KVM it is &#8220;ttyS0&#8243;.</li>
<li>Xen does not use the bootloader from the image but directly accesses the boot directory while KVM really uses the bootmanager.</li>
<li>The modules that are needed for block devices are different.</li>
<li>Although virsh supports both, Xen and KVM, the XML configuration is still somewhat different.</li>
</ol>
<p>The easiest way would be to just install the necessary packages and do the needed modifications on a running Xen guest, however, if you don&#8217;t have your Xen host anymore, you would be busted. Therefore, lets do the migration of an image just on the KVM host.</p>
<p>First, make the image accessible with &#8220;kpartx&#8221;. To do this run the command</p>
<pre>&gt; kpartx -a disk0.raw -v
add map loop0p1 (253:1): 0 319488 linear /dev/loop0 2048
add map loop0p2 (253:2): 0 16435200 linear /dev/loop0 321536</pre>
<p>Now, determine which one is a real file system:</p>
<pre>&gt; lsblk -f /dev/mapper/loop0p?
NAME           FSTYPE LABEL MOUNTPOINT
loop0p1 (dm-1) swap
loop0p2 (dm-2) ext3</pre>
<p>Obviously the device &#8220;/dev/mapper/loop0p2&#8243; is our root file system that we need to access. Lets mount it and add all the needed devices:</p>
<pre>mount /dev/mapper/loop0p2 /mnt
mount -o bind /dev /mnt/dev</pre>
<p>Now, copy the needed kernel to the file system and do a &#8220;chroot&#8221; there:</p>
<pre>cp kernel-default.rpm kernel-default-base.rpm /mnt/tmp
chroot /mnt
mount /sys
mount /proc</pre>
<p>Next, update several configuration files:</p>
<ol>
<li>/etc/inittab : comment the line starting with S0 and containing xvc0</li>
<li>/etc/inittab : uncomment line starting with S0 and containing ttyS0. Change the speed to 115200 if needed.</li>
<li>/etc/securetty : remove xvc0 and add ttyS0</li>
<li>/etc/sysconfig/kernel : remove modules starting with xen from &#8220;INITRD_MODULES&#8221; and add &#8220;virtio_blk virtio&#8221; instead.</li>
<li>/etc/fstab : remove the &#8220;x&#8221; from &#8220;/dev/xvda&#8221; (and possibly more needed block devices)</li>
<li>/boot/grub/device.map : change from &#8220;/dev/xvda&#8221; to &#8220;/dev/vda&#8221;</li>
<li>/boot/grub/menu.lst :  comment line starting with gfxmenu</li>
<li>/boot/grub/menu.lst : change the kernel and initrd lines to contain the kernel starting with &#8220;vmlinuz&#8221; and the default initrd as available in &#8220;/boot&#8221;.</li>
<li>/boot/grub/menu.lst : fix the kernel parameters to contain the right root and console device, similar to: &#8220;root=/dev/vda2 console=ttyS0&#8243;.</li>
</ol>
<p>Now, it is time to install the kernel:</p>
<pre>rpm -Uhv /root/kernel-default.rpm /root/kernel-default-base.rpm</pre>
<p>The only remaining task now is running &#8220;mkinitrd&#8221;. There will show up some error messages about not having the right root device available, which is correct. But the command commonly will work anyway.</p>
<p>To finish the work on the image, only some cleanup is needed:</p>
<ol>
<li>umount /sys</li>
<li>umount /proc</li>
<li>exit</li>
<li>umount /mnt/dev</li>
<li>umount /mnt</li>
<li>kpartx -d disk0.raw</li>
</ol>
<p>To start the image, the easiest way is to use &#8220;vm-install&#8221; and select activating an existing image &#8220;I have a disk or disk image &#8230;&#8221;. If it is just for testing, you can also use a command link this:</p>
<pre>qemu-kvm \
-drive file=/kvm/images/disk0.raw,id=root,if=virtio \
-m 1024M -nographic</pre>
<p>This should bring up your previous Xen image on a KVM machine.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/azouhr.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/azouhr.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/azouhr.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/azouhr.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/azouhr.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/azouhr.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/azouhr.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/azouhr.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/azouhr.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/azouhr.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/azouhr.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/azouhr.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/azouhr.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/azouhr.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=135&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://azouhr.wordpress.com/2011/10/21/migrating-a-xen-vm-to-kvm-on-opensuse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a76133e3efafb608f590a3d06daec68c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">azouhr</media:title>
		</media:content>
	</item>
		<item>
		<title>Xen and serial console over IPMI (SOL)</title>
		<link>http://azouhr.wordpress.com/2011/08/16/xen-and-serial-console-over-ipmi-sol-2/</link>
		<comments>http://azouhr.wordpress.com/2011/08/16/xen-and-serial-console-over-ipmi-sol-2/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 12:00:19 +0000</pubDate>
		<dc:creator>azouhr</dc:creator>
				<category><![CDATA[IPMI]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[SOL]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://azouhr.wordpress.com/?p=125</guid>
		<description><![CDATA[Recently I had to configure a serial over lan (SOL) console on a bigger Supermicro server (2042G-TRF for those who are interested) that should run Xen. This turned out to be not too easy and several issues had to be &#8230; <a href="http://azouhr.wordpress.com/2011/08/16/xen-and-serial-console-over-ipmi-sol-2/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=125&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I had to configure a serial over lan (SOL) console on a bigger Supermicro server (2042G-TRF for those who are interested) that should run Xen. This turned out to be not too easy and several issues had to be resolved.</p>
<p>The first thing I had to do was an upgrade of the BIOS. The original BIOS shared the IPMI IRQ with serial console0. This resulted in scrambled console output, regardless what I tried to do. Current BIOS versions put IPMI on IRQ 5. Before you try anything, make sure that you do not share IRQs between IPMI and a real serial console.</p>
<p>Then I tried to add COM3 to the console list of Xen. Unfortunately, there is no warning that Xen supports only two serial consoles, which are COM1 and COM2. The console just won&#8217;t work. Luckily, there is this nice manual to be found at:</p>
<pre>/usr/share/doc/packackages/xen/pdf/user.pdf</pre>
<p>In there, there are lots of parameters, and also a somewhat sparse description of how to setup the serial console. It turned out, that I had to reconfigure COM2 (likely COM1 would also have worked) to different IO and IRQ. To get the current values of IO-Port and IRQ, either look into the BIOS and write down the values there, or run a default kernel without Xen and run the following command:</p>
<pre>dmesg | grep ttyS2</pre>
<p>The result should look similar to this:</p>
<pre>&lt;6&gt;[   10.232117] 00:09: ttyS2 at I/O 0x3e8 (irq = 5) is a 16550A</pre>
<p>This means, we need to set COM2 to IO-Port 0x3e8 and to IRQ 5. The only thing that is now missing is the serial line speed and mode of the serial connection. In my case, I chose a baud rate of 115200,8n1 for the connection.</p>
<p>Now lets put all of this together. First is the grub configuration. This is twofold. Part one is configuring grub in a way that it is also displayed in the serial console. Commonly, this is done in the global section at the beginning of /boot/grub/menu.lst :</p>
<pre>serial --unit=2 --speed=115200
terminal --timeout=8 serial console</pre>
<p>Unit 2 specifies the third (start counting at 0) serial console.</p>
<p>Part two of the grub configuration affects the Xen section. There, add the console parameters like this:</p>
<pre>kernel (hd0,0)/xen.gz console=vga,com2 com2=115200,8n1,0x3e8,5
module (hd0,0)/vmlinuz-2.6.32.43-0.13-xen root=/dev/md1 console=tty0 console=xvc0,115200</pre>
<p>In my case, we have root on a mirrored raid, you just have to add the console parameters and com2 parameter to the configuration file. Note that the last console that is in the module line is considered the system console by the kernel.</p>
<p>To make all of this permanent and survive the next kernel update, also add the parameters to /etc/sysconfig/bootloader:</p>
<pre>XEN_KERNEL_APPEND="console=tty0 console=xvc0,115200"
XEN_APPEND="console=vga,com2 com2=115200,8n1,0x3e8,5"</pre>
<p>Again, your options may vary.</p>
<p>The last configuration to be made is activating a getty for xvc0. This is accomplished in /etc/inittab. Search for a line starting with &#8216;#S0&#8242;. There add a line like the following:</p>
<pre>S0:12345:respawn:/sbin/agetty -L 115200 xvc0 vt102</pre>
<p>After doing all of this, you are ready to test your SOL console. For me, the following command works nicely:</p>
<pre>ipmitool -I lanplus -H &lt;IPMI-IP-Adress&gt; -U &lt;IPMI-User&gt; sol activate</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/azouhr.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/azouhr.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/azouhr.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/azouhr.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/azouhr.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/azouhr.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/azouhr.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/azouhr.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/azouhr.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/azouhr.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/azouhr.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/azouhr.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/azouhr.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/azouhr.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=125&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://azouhr.wordpress.com/2011/08/16/xen-and-serial-console-over-ipmi-sol-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a76133e3efafb608f590a3d06daec68c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">azouhr</media:title>
		</media:content>
	</item>
		<item>
		<title>iTunes on openSUSE 11.4</title>
		<link>http://azouhr.wordpress.com/2011/03/22/itunes-on-opensuse-11-4/</link>
		<comments>http://azouhr.wordpress.com/2011/03/22/itunes-on-opensuse-11-4/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 14:28:04 +0000</pubDate>
		<dc:creator>azouhr</dc:creator>
				<category><![CDATA[iTunes]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://azouhr.wordpress.com/?p=104</guid>
		<description><![CDATA[In order to use iTunes University, I had to install iTunes on my notebook that is running openSUSE 11.4. It is quite easy to get some old version of iTunes from http://www.oldapps.com/itunes.php but trying to install it on a 64bit &#8230; <a href="http://azouhr.wordpress.com/2011/03/22/itunes-on-opensuse-11-4/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=104&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In order to use iTunes University, I had to install iTunes on my  notebook that is running openSUSE 11.4. It is quite easy to get some old  version of iTunes from <a href="http://www.oldapps.com/itunes.php">http://www.oldapps.com/itunes.php</a> but trying to install it on a 64bit machine with wine always failed.</p>
<p>In the end, I could install a 32bit version by doing the following:</p>
<pre>rm -rf ~/.wine #(don't do this if you have other wine applications installed, it basically kills any previous wine installation)
export WINEARCH=win32
wine ~/Downloads/iTunesSetup1021.exe</pre>
<p>To start iTunes later on, it is sufficient to run the following command:</p>
<pre>wine c:/Program\ Files/iTunes/iTunes.exe</pre>
<p>Unfortunately, with most of the available courses on iTunes University, I get conversion errors. To circumvent this, I just download the respective courses and view them with mplayer:</p>
<pre>cd ~/Music/iTunes/iTunes Media/iTunes U/
mplayer -vo xv &lt;course file&gt;</pre>
<p>This is not too nice, but at least it allows me to view iTunes U courses without the need for an operating system I do not own.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/azouhr.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/azouhr.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/azouhr.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/azouhr.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/azouhr.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/azouhr.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/azouhr.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/azouhr.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/azouhr.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/azouhr.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/azouhr.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/azouhr.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/azouhr.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/azouhr.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=104&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://azouhr.wordpress.com/2011/03/22/itunes-on-opensuse-11-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a76133e3efafb608f590a3d06daec68c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">azouhr</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple udev Manipulations</title>
		<link>http://azouhr.wordpress.com/2011/03/21/simple-udev-manipulations/</link>
		<comments>http://azouhr.wordpress.com/2011/03/21/simple-udev-manipulations/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 07:41:04 +0000</pubDate>
		<dc:creator>azouhr</dc:creator>
				<category><![CDATA[block devices]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[openSUSE]]></category>

		<guid isPermaLink="false">http://azouhr.wordpress.com/?p=53</guid>
		<description><![CDATA[When discovering the /sys file system, one can find quite a number of tunables that look interesting and really have effect on system behavior. Especially when experimenting with different values of read ahead for block devices or e.g. setting the &#8230; <a href="http://azouhr.wordpress.com/2011/03/21/simple-udev-manipulations/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=53&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When discovering the /sys file system, one can find quite a number of tunables that look interesting and really have effect on system behavior. Especially when experimenting with different values of read ahead for block devices or e.g. setting the stripe_cache_size for raid5, the performance for my software raid was improved a lot.</p>
<p>To make that settings permanent, one can try and go for /etc/init.d/boot.local. More elegant however is to add some udev rule that does the necessary changes for you. It turns out, that this is quite easy. For example, the read ahead for block devices is found in /sys/block/*/bdi/read_ahead_kb. To check your current read ahead of /dev/sda, you may use:</p>
<pre>cat /sys/block/sda/bdi/read_ahead_kb</pre>
<p>However you may also want to change that setting. To accomplish that, just echo the desired number into the read ahead:</p>
<pre>echo 4100 &gt; /sys/block/sda/bdi/read_ahead_kb</pre>
<p>To automatically do the setting when the device appears, just add the following file to /etc/udev/rules.d/83-ra.rules:</p>
<pre>cat /etc/udev/rules.d/83-ra.rules
# increase readahead for sd* devices
ACTION=="add", KERNEL=="sd*", ATTR{bdi/read_ahead_kb}="4100"</pre>
<p>When adding a udev rule for this, one just needs to know that &#8220;==&#8221; (two  equal signs) is a check, and &#8220;=&#8221; (one equal sign) is a setting.</p>
<p>Note, that some devices may take the read ahead from the underlying device; noteably when using drbd, setting the read ahead on the underlying device will have the desired effect.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/azouhr.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/azouhr.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/azouhr.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/azouhr.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/azouhr.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/azouhr.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/azouhr.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/azouhr.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/azouhr.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/azouhr.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/azouhr.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/azouhr.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/azouhr.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/azouhr.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=53&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://azouhr.wordpress.com/2011/03/21/simple-udev-manipulations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a76133e3efafb608f590a3d06daec68c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">azouhr</media:title>
		</media:content>
	</item>
		<item>
		<title>Xen &#8211; Removing Virtual Frame Buffer</title>
		<link>http://azouhr.wordpress.com/2011/03/16/xen-removing-virtual-frame-buffer/</link>
		<comments>http://azouhr.wordpress.com/2011/03/16/xen-removing-virtual-frame-buffer/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 10:18:36 +0000</pubDate>
		<dc:creator>azouhr</dc:creator>
				<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://azouhr.wordpress.com/?p=87</guid>
		<description><![CDATA[I recently had to remove the frame buffer device from a Xen guest for debugging purposes. The frame buffer configuration in the sxp file looks like this: (device (vfb (vncunused 1) (uuid ????????-????-????-????-??????????) (keymap en) (location 127.0.0.1:5909) (type vnc) (xauthority &#8230; <a href="http://azouhr.wordpress.com/2011/03/16/xen-removing-virtual-frame-buffer/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=87&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently had to remove the frame buffer device from a Xen guest for debugging purposes. The frame buffer configuration in the sxp file looks like this:</p>
<pre>(device
    (vfb
        (vncunused 1)
        (uuid ????????-????-????-????-??????????)
        (keymap en)
        (location 127.0.0.1:5909)
        (type vnc)
        (xauthority /root/.Xauthority)
    )
)</pre>
<p>However after removing this section from the configuration the guest would not boot anymore. It just hung using 100% CPU and did not come up. Google was not a big help, and I had to experiment a little bit myself. In the end, it turned out, that one also has to remove the virtual keyboard configuration which looks like this:</p>
<pre>(device (vkbd (uuid ????????-????-????-????-??????????) (backend 0)))</pre>
<p>After removing  this section as well, the guest came up again, and I even could still use the serial console with xm console.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/azouhr.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/azouhr.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/azouhr.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/azouhr.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/azouhr.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/azouhr.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/azouhr.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/azouhr.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/azouhr.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/azouhr.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/azouhr.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/azouhr.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/azouhr.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/azouhr.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=87&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://azouhr.wordpress.com/2011/03/16/xen-removing-virtual-frame-buffer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a76133e3efafb608f590a3d06daec68c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">azouhr</media:title>
		</media:content>
	</item>
		<item>
		<title>openSUSE on HPPA</title>
		<link>http://azouhr.wordpress.com/2011/03/10/opensuse-on-hppa/</link>
		<comments>http://azouhr.wordpress.com/2011/03/10/opensuse-on-hppa/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 10:06:20 +0000</pubDate>
		<dc:creator>azouhr</dc:creator>
				<category><![CDATA[Build Service]]></category>
		<category><![CDATA[HPPA]]></category>
		<category><![CDATA[openSUSE]]></category>

		<guid isPermaLink="false">http://azouhr.wordpress.com/?p=81</guid>
		<description><![CDATA[This might be surprising for one or the other, but I do have a big part of openSUSE:Factory built for hppa. What I have is a dedicated build service machine that does nothing but running a hppa build service and &#8230; <a href="http://azouhr.wordpress.com/2011/03/10/opensuse-on-hppa/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=81&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This might be surprising for one or the other, but I do have a big part of openSUSE:Factory built for hppa. What I have is a dedicated build service machine that does nothing but running a hppa build service and also 5 workers that do the build jobs.</p>
<p>The system is setup from the buildservice appliance which runs the machine from a USB stick. Else there is attached some local storage for all the sources and packages built. For more about this appliance, see <a href="http://en.opensuse.org/openSUSE:Build_Service_Appliance">openSUSE:Build Service Appliance</a>.</p>
<p>To setup the system, a source project is needed as well as a base system that enables the different workers to do some work. This looks like the following:</p>
<pre>&lt;project name="HP-Factory"&gt;
  &lt;description&gt;
  &lt;/description&gt;
  &lt;link project="openSUSE.org:openSUSE:Factory"/&gt;
  &lt;person role="maintainer" userid="Admin"/&gt;
  &lt;person role="bugowner" userid="Admin"/&gt;
  &lt;debuginfo&gt;
    &lt;disable/&gt;
  &lt;/debuginfo&gt;
  &lt;build&gt;
    &lt;enable/&gt;
  &lt;/build&gt;
  &lt;publish&gt;
    &lt;disable/&gt;
    &lt;disable repository="standard" arch="hppa"/&gt;
  &lt;/publish&gt;
  &lt;repository rebuild="direct" linkedbuild="all" name="standard"&gt;
    &lt;path repository="standard" project="HP-Base"/&gt;
    &lt;arch&gt;hppa&lt;/arch&gt;
  &lt;/repository&gt;
&lt;/project&gt;</pre>
<p>This means:</p>
<ul>
<li>All the sources are taken from openSUSE.org from the project openSUSE:Factory. In other words, there is no need for me to care about updating packages other than those that I want to have different on my distribution.</li>
<li>Publishing is not needed to run the build service. All the binaries can still be retrieved with osc getbinaries, and they are also found in<br />
/obs/build/HP-Factory/standard/hppa</li>
<li>There is a base project named HP-Base, that is needed to setup the chroot systems on my workers. This is not needed anymore when the packages are available in HP-Factory, but whenever one has to inject a package, this is the place where to accomplish this task.</li>
</ul>
<p>Now I had the problem, that for some reason the package bash did not build correctly, and could not be used by the info package anymore. As you might imagine, this breaks any progress in building for this distribution. The solution to this is:</p>
<ul>
<li>Build bash manually on some worker. I like to keep some chroot system for manual builds with current packages. There one can use rpmbuild -ba to build the package manually.</li>
<li>Copy the resulting package to the buildservice appliance below<br />
/obs /build/HP-Base/standard/hppa/:full</li>
<li>On the build service appliance, run<br />
obs_admin &#8211;rescan-repository HP-Base standard hppa</li>
</ul>
<p>After this, the build service starts its work again. One final note: I do this distribution only as a hobby, and it it is quite likely that this will never be published. If you are interested in this, distribution, I will be happy to give you any packages that I got so far. Please do not expect too much; you might be able to install everything if you can do all of it manually. There is no installation or configuration support by tools in place.</p>
<p>Of course it is also difficult for my view workers to build openSUSE:Factory. Commonly, I would need something like a week without checkins to be able to fully build those packages that can build. However, this does not happen too often.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/azouhr.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/azouhr.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/azouhr.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/azouhr.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/azouhr.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/azouhr.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/azouhr.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/azouhr.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/azouhr.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/azouhr.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/azouhr.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/azouhr.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/azouhr.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/azouhr.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=81&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://azouhr.wordpress.com/2011/03/10/opensuse-on-hppa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a76133e3efafb608f590a3d06daec68c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">azouhr</media:title>
		</media:content>
	</item>
		<item>
		<title>Checking Block IO in Linux</title>
		<link>http://azouhr.wordpress.com/2011/03/04/checking-block-io-in-linux/</link>
		<comments>http://azouhr.wordpress.com/2011/03/04/checking-block-io-in-linux/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 08:22:20 +0000</pubDate>
		<dc:creator>azouhr</dc:creator>
				<category><![CDATA[block devices]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[openSUSE]]></category>

		<guid isPermaLink="false">http://azouhr.wordpress.com/?p=55</guid>
		<description><![CDATA[For many workloads, performance in current systems is most often limited by IO. Be it memory IO as looked at in Linux and Memory or be it file system IO. The file system strongly depends on the underlying block device(s). &#8230; <a href="http://azouhr.wordpress.com/2011/03/04/checking-block-io-in-linux/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=55&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For many workloads, performance in current systems is most often limited by IO. Be it memory IO as looked at in <a href="http://azouhr.wordpress.com/2011/02/15/linux-and-memory/">Linux and Memory</a> or be it file system IO. The file system strongly depends on the underlying block device(s).</p>
<p>Commonly you can choose two of the following  three attributes installing a new storage device: reliability &lt;-&gt; speed &lt;-&gt; prize</p>
<ul>
<li>A reliable and fast device will have a high prize tag</li>
<li>A fast and cheap storage will probably be not as reliable as you would like</li>
<li>And a cheap and reliable device will most likely be not very fast.</li>
</ul>
<p>Whatever solution you choose, there might still be some space left to tune the available bandwidth to the storage. The hardware you buy is of course setting limits, but it does not guarantee speed.</p>
<p>The best benchmark you can use for your installation is running the workload that the system is planned for. However, there are often many different tunables to the complete system that affect each other in one or the other way and trying to find the optimal solution can be quite a task. A number of tunables is found in in the documentation to the <a href="http://www.novell.com/documentation/slerte_11/pdfdoc/slerte_quickstart/slerte_quickstart.pdf">Real Time Extension</a> for SLES. I normally prefer to go for smaller building blocks like memory or block IO or maybe CPU configurations. When running linux, there are several tools that did serve me well when doing IO tests. the following tools are not so much meant as benchmarking but more as a measure of how the system is performing.</p>
<h2>iostat</h2>
<p>One of the tools I like to use when looking at block IO performance is &#8220;iostat&#8221;. For example, on my desktop machine which is setup as raid1 for all of the different partitions, it looks like this:</p>
<pre># iostat -x 2 2
Linux 2.6.37.1-1.2-desktop (example) 	03/04/2011 	_x86_64_	(4 CPU)

Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util
sda               0.55     0.40    0.10    1.06     9.74   125.15   115.93     0.04   35.56   8.47   0.99
sdb               0.77     0.42    0.31    1.05    65.57   125.15   140.29     0.15  108.85   7.29   0.99
md1               0.00     0.00    0.01    0.03     0.06     0.22     8.00     0.00    0.00   0.00   0.00
md2               0.00     0.00    0.16    0.17     9.91     2.86    38.85     0.00    0.00   0.00   0.00
scd0              0.00     0.00    0.00    0.00     0.00     0.00     6.70     0.00   38.38  38.36   0.00
md0               0.00     0.00    0.02    0.00     0.18     0.00     7.49     0.00    0.00   0.00   0.00
md3               0.00     0.00    0.45    0.54    56.39   120.95   180.39     0.00    0.00   0.00   0.00

Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util
sda               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
sdb               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md1               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md2               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
scd0              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md0               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md3               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00</pre>
<p>The command first shows the accumulated stats and when running it with an interval, it then shows the current values. &#8220;-x&#8221; is for extended stats which include utilization of the block device. When running a bonnie in background, it looks a bit different. Depending on the phase that the bonnie just runs, there are more write or more read operations. Here are two examples how this looks:</p>
<pre>Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util
sda               0.00   526.50    3.00  180.50    56.00 170103.00   927.30    34.97  196.19   5.42  99.40
sdb               0.00   531.00    1.00  167.50    20.00 161779.00   960.23   139.02  805.91   5.93 100.00
md1               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md2               0.00     0.00    4.00    0.50    76.00     1.00    17.11     0.00    0.00   0.00   0.00
scd0              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md0               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md3               0.00     0.00    0.00  680.00     0.00 164000.00   241.18     0.00    0.00   0.00   0.00
....................
Device:         rrqm/s   wrqm/s     r/s     w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util
sda               0.00   243.00    0.00  101.00     0.00 82494.50   816.78     6.06   60.06   3.58  36.20
sdb             380.50   259.50  375.50   80.00 96768.00 77898.50   383.46   143.99  276.78   2.20 100.00
md1               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md2               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
scd0              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md0               0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00
md3               0.00     0.00  756.00    0.00 96768.00     0.00   128.00     0.00    0.00   0.00   0.00</pre>
<p>There is quite a number of options to that command, and there is a nicely written manual page available. If you want to run that command continuously, just give it an interval as argument but not the count. &#8220;iostat&#8221; is available in the sysstat package.</p>
<h2>vmstat</h2>
<p>There is a second tool that I found quite interesting, called &#8220;vmstat&#8221;. There you can see more of the internals of the kernel. To look at disk IO, use the command &#8220;vmstat -d&#8221;:</p>
<pre># vmstat -d
disk- ------------reads------------ ------------writes----------- -----IO------
       total merged sectors      ms  total merged sectors      ms    cur    sec
sda   141952 178179 29577018  477693 237884 300621 90710884 44753954      0   2022
sda1    1838  49969  413212    4300    243      0     405    8421      0     10
sda2    1177  30730  255088    3374    904  21316  175002  128632      0     93
sda3   13692   1967  899900  145632  98957   1421  529386 1283316      0   1033
sda4  124979  95338 28005296  324132 137715 277884 90006091 43333084      0   1101
sdb   172348 201881 36728314  678824 235909 302600 90710884 73151033      0   2040
sdb1    1845  50399  417206    4300    243      0     405    9682      0     12
sdb2    1151  29726  246895    3768    890  21330  175002  136778      0    105
sdb3   12190   1387  838756  245109  98955   1423  529386 1388551      0   1092
sdb4  156880 119698 35217839  425346 135752 279847 90006091 71615593      0   1168
md1     1220      0    9754       0  21807      0  174440       0      0      0
md2    29177      0 1738453       0  26124      0  431345       0      0      0
sr0       77     52     516    2955      0      0       0       0      0      2
md0     3508      0   26650       0    101      0     204       0      0      0
md3   496707      0 63222677       0 378971      0 89932831       0      0      0</pre>
<p>This command may also be run in continuous mode with just putting a timing interval after the command. However, for me this becomes confusing quite quickly because of the amount of data generated. To see what happens, I normally do a simple grep to the devices that I am interested in. The following output is done while running a bonnie on the same system:</p>
<pre># vmstat -d 2 | (head -n2; grep -e md3 -e sda4 -e sdb4)
disk- ------------reads------------ ------------writes----------- -----IO------
       total merged sectors      ms  total merged sectors      ms    cur    sec
sda4  124979  95338 28005296  324132 137943 278400 90118575 43341665      0   1103
sdb4  156880 119698 35217839  425346 135982 280362 90119567 71622604      0   1170
md3   496707      0 63222677       0 379699      0 90105057       0      0      0
sda4  124979  95338 28005296  324132 138341 279733 90502993 43483155      0   1105
sdb4  156880 119698 35217839  425346 136349 281695 90473169 71762657      0   1172
md3   496707      0 63222677       0 382386      0 90752849       0      0      0
sda4  124979  95338 28005296  324132 138745 280943 90901549 43699088      0   1107
sdb4  156880 119698 35217839  425346 136763 282905 90882421 72024008      0   1174
md3   496707      0 63222677       0 383780      0 91089049       0      0      0
sda4  124979  95338 28005296  324132 139132 282096 91282987 43927977      0   1109
sdb4  156880 119698 35217839  425346 137115 284058 91228331 72272559      0   1176
md3   496707      0 63222677       0 385346      0 91466262       0      0      0</pre>
<p>In the above example, you can see, that the merged written sectors are increasing rapidly, while nothing happens on the reading side. This is because bonnie was just doing the char write benchmark. The &#8220;vmstat&#8221; command is available from the &#8220;procps&#8221; package.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/azouhr.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/azouhr.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/azouhr.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/azouhr.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/azouhr.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/azouhr.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/azouhr.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/azouhr.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/azouhr.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/azouhr.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/azouhr.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/azouhr.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/azouhr.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/azouhr.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=azouhr.wordpress.com&amp;blog=19585319&amp;post=55&amp;subd=azouhr&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://azouhr.wordpress.com/2011/03/04/checking-block-io-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a76133e3efafb608f590a3d06daec68c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">azouhr</media:title>
		</media:content>
	</item>
	</channel>
</rss>
