<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/4.1.4" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>CoolZero in a Nuttshell</title>
		<link>http://blog.coolzero.info/blogs/index.php?blog=5</link>
		<atom:link rel="self" type="application/rss+xml" href="http://blog.coolzero.info/blogs/index.php?blog=5&#38;tempskin=_rss2" />
		<description>This is the website of CoolZero and friends. Enjoy your stay. Powered by www.coolzero.info!</description>
		<language>en-EU</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=4.1.4"/>
		<ttl>60</ttl>
				<item>
			<title>Howto HA Cluster Wowza Servers with CRM / Pacemaker / Corosync and RHEL 6.x</title>
			<link>http://blog.coolzero.info/blogs/index.php/ha-cluster-wowza-servers-with-crm-pacemaker-corosync-and-rhel-6x?blog=5</link>
			<pubDate>Wed, 18 Apr 2012 12:24:00 +0000</pubDate>			<dc:creator>coolzero</dc:creator>
			<category domain="main">Just a story...</category>			<guid isPermaLink="false">53@http://blog.coolzero.info/blogs/</guid>
						<description>&lt;p&gt;This howto explains how to setup a High Availability Cluster with Wowza and Redhat Enterprise Linux 6.x. In our setup we have a cluster of 2 origin servers. We are using the following details below with the ip settings in the complete document. We have 2 servers, and are going to use one VIP (Virtual IP Address) address for the Cluster.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;11.11.11.11 = s100&lt;br /&gt;
22.22.22.22 = s101&lt;br /&gt;
99.99.99.99 = vip&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Before we start you should know the following points.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;1. You need a RedHat Account at &lt;a href=&quot;https://rhn.redhat.com&quot;&gt;https://rhn.redhat.com&lt;/a&gt; and have a copy of RHEL 6.x and the High Availability Add-On.&lt;br /&gt;
2. If you don&#039;t have RedHat, use CentOS 6.x or Scientificlinux 6.x and their repositories for getting the files.&lt;br /&gt;
3. You know network basics.&lt;br /&gt;
4. You know unix basics.&lt;br /&gt;
5. You know how to look at log files (very important when you are debugging).&lt;br /&gt;
6. You know RHEL 6.x / CentOS / Scientificlinux basics.&lt;br /&gt;
7. You know how Wowza configuration works.&lt;br /&gt;
8. Everything explained below assumes that you do all actions on both hosts. The only thing that&#039;s not executed on both hosts are the crm tool or cibadmin.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;All checked? Let&#039;s start!&lt;/p&gt;

&lt;p&gt;First, in your /etc/hosts file add the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;11.11.11.11 s100&lt;br /&gt;
22.22.22.22 s101&lt;br /&gt;
99.99.99.99 vip&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is needed because when you have DNS outage, the names are still resolvable. &lt;/p&gt;

&lt;p&gt;After this execute the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;yum install -y corosync pacemaker&lt;br /&gt;
chkconfig pacemaker on&lt;br /&gt;
chkconfig corosync on&lt;br /&gt;
chown -R hacluster /var/log/cluster&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After doing this, create a new file at /etc/corosync/corosync.conf and paste:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;# Please read the corosync.conf.5 manual page&lt;br /&gt;
compatibility: whitetank&lt;/p&gt;

&lt;p&gt;totem {&lt;br /&gt;
        version: 2&lt;br /&gt;
        secauth: off&lt;br /&gt;
        threads: 0&lt;br /&gt;
        interface {&lt;br /&gt;
                ringnumber: 0&lt;br /&gt;
                bindnetaddr: 11.11.11.11 &lt;br /&gt;
                mcastaddr: 226.94.1.1&lt;br /&gt;
                mcastport: 5405&lt;br /&gt;
        }&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;logging {&lt;br /&gt;
        fileline: off&lt;br /&gt;
        to_stderr: no&lt;br /&gt;
        to_logfile: yes&lt;br /&gt;
        to_syslog: yes&lt;br /&gt;
        logfile: /var/log/cluster/corosync.log&lt;br /&gt;
        debug: off&lt;br /&gt;
        timestamp: on&lt;br /&gt;
        logger_subsys {&lt;br /&gt;
                subsys: AMF&lt;br /&gt;
                debug: off&lt;br /&gt;
        }&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;amf {&lt;br /&gt;
        mode: disabled&lt;br /&gt;
}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The only thing you need to change are:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;bindnetaddr: 11.11.11.11&lt;br /&gt;
mcastaddr: 226.94.1.1&lt;br /&gt;
mcastport: 5405&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now we are doing two nodes, so you need to do this on the second node:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;bindnetaddr: 22.22.22.22&lt;br /&gt;
mcastaddr: 226.94.1.1&lt;br /&gt;
mcastport: 5405&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When done, you need to create another file /etc/corosync/service.d/pcmk and paste:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;service {&lt;br /&gt;
        # Load the Pacemaker Cluster Resource Manager&lt;br /&gt;
        name: pacemaker&lt;br /&gt;
        ver: 1&lt;br /&gt;
}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After these actions, please first check if you are running IPTables on your machine. If you do, you need the following rules to allow access between the hosts to communicate.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;iptables -A INPUT -m udp -p udp -s 11.11.11.11 --dport 5405 -j ACCEPT&lt;br /&gt;
iptables -A INPUT -m udp -p udp -s 22.22.22.22 --dport 5405 -j ACCEPT&lt;br /&gt;
iptables -A INPUT -m udp -p udp -s 226.94.1.1 --dport 5405 -j ACCEPT&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Of course if you are a experienced IPTables user, simply adjust the rules how you see fit. The important thing to know is that UDP port 5405 is able to communicate to both hosts + the multicast address. Also this needs to be done on BOTH hosts.&lt;/p&gt;

&lt;p&gt;After setting up iptables or simply disabling it, start the corosync process and pacemaker. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;service corosync start&lt;br /&gt;
service pacemaker start&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You should be able to logging in /var/log/messages or /var/log/cluster/corosync.log. The interesting thing in these logs is to look if you have no big errors. You should be seeing the error:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ERROR: unpack_resources: Resource start-up disabled since no STONITH resources have been defined&lt;br /&gt;
ERROR: unpack_resources: Either configure some or disable STONITH with the stonith-enabled option&lt;br /&gt;
ERROR: unpack_resources: NOTE: Clusters with shared data need STONITH to ensure data integrity&lt;br /&gt;
notice: process_pe_message: Configuration ERRORs found during PE processing.  Please run &quot;crm_verify -L&quot; to identify issues.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is correct, because we have not setup the crm config file yet! The basics are ready, now we are going to install Wowza Server itself and Java. That&#039;s quite easy (again on both nodes). &lt;/p&gt;

&lt;p&gt;Download Java from &lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/index.html&quot;&gt;http://www.oracle.com/technetwork/java/javase/downloads/index.html&lt;/a&gt; and pick the Java 7 JDK package. Why JDK? Well you could also choose JRE but with Wowza some functions will not work out. After downloaded the right java package install it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;yum localinstall jdk-7u3-linux-x64.rpm&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Next is Wowza.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;wget &lt;a href=&quot;http://www.wowza.com/downloads/WowzaMediaServer-3-1-0/WowzaMediaServer-3.1.0.rpm.bin&quot;&gt;http://www.wowza.com/downloads/WowzaMediaServer-3-1-0/WowzaMediaServer-3.1.0.rpm.bin&lt;/a&gt;&lt;br /&gt;
chmod 755 WowzaMediaServer-3.1.0.rpm.bin&lt;br /&gt;
./WowzaMediaServer-3.1.0.rpm.bin (and say yes)&lt;br /&gt;
/usr/local/WowzaMediaServer/bin/startup.sh (and enter serial key and CTRL+C after startup)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now Wowza is installed, setup the /usr/local/WowzaMediaServer/conf/VHost.xml file that it only binds to the VIP address. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As example, in the VHost.xml file you can search on IpAddress. There you should add the VIP address, which is 99.99.99.99 in this case.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After Wowza is installed, you will get a startup script from Wowza in /etc/init.d/WowzaMediaServer. This script is unfortunately not LSB compliant. I have made one small adjustment in this startup script. Just execute the following.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;vi /etc/init.d/WowzaMediaServer&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When in edit mode, search for:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;localstatus() {&lt;br /&gt;
if [ -f $WMSLOCK_FILE ]; then&lt;br /&gt;
        echo &quot;$WMSBASE_NAME started&quot;&lt;br /&gt;
else&lt;br /&gt;
        echo &quot;$WMSBASE_NAME stopped&quot;&lt;br /&gt;
fi&lt;br /&gt;
RETVAL=0&lt;br /&gt;
}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And change it to this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;localstatus() {&lt;br /&gt;
if [ -f $WMSLOCK_FILE ]; then&lt;br /&gt;
        echo &quot;$WMSBASE_NAME started&quot;&lt;br /&gt;
        RETVAL=0&lt;br /&gt;
else&lt;br /&gt;
        echo &quot;$WMSBASE_NAME stopped&quot;&lt;br /&gt;
        RETVAL=3&lt;br /&gt;
fi&lt;br /&gt;
}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After editing these lines, we make another script called /etc/init.d/WowzaMediaServer2 and put this piece of code in the script:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# WowzaMediaServer2        Startup script for Wowza &lt;br /&gt;
#&lt;br /&gt;
# chkconfig: - 85 15&lt;br /&gt;
# description: Wowza Streaming Server &lt;br /&gt;
# processname: WowzaMediaServerd&lt;br /&gt;
#&lt;br /&gt;
### BEGIN INIT INFO&lt;br /&gt;
# Provides: WowzaMediaServerd&lt;br /&gt;
# Required-Start: $local_fs $remote_fs $network $named&lt;br /&gt;
# Required-Stop: $local_fs $remote_fs $network&lt;br /&gt;
# Should-Start: distcache&lt;br /&gt;
# Short-Description: start and stop Wowza &lt;br /&gt;
# Description: Wowza Streaming Server &lt;br /&gt;
### END INIT INFO&lt;/p&gt;

&lt;p&gt;# Source function library.&lt;br /&gt;
. /etc/rc.d/init.d/functions&lt;/p&gt;

&lt;p&gt;prog=WowzaMediaServer&lt;br /&gt;
pidfile=${PIDFILE-/var/run/wowza/wowza.pid}&lt;br /&gt;
lockfile=${LOCKFILE-/var/lock/subsys/wowza}&lt;br /&gt;
RETVAL=0&lt;br /&gt;
STOP_TIMEOUT=${STOP_TIMEOUT-10}&lt;/p&gt;

&lt;p&gt;start() {&lt;br /&gt;
        echo -n $&quot;Starting $prog: &quot;&lt;br /&gt;
	/etc/init.d/WowzaMediaServer start&lt;br /&gt;
        RETVAL=$?&lt;br /&gt;
        echo&lt;br /&gt;
        [ $RETVAL = 0 ] &amp;amp;&amp;amp; touch ${lockfile}&lt;br /&gt;
        return $RETVAL&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;stop() {&lt;br /&gt;
	echo -n $&quot;Stopping $prog: &quot;&lt;br /&gt;
	/etc/init.d/WowzaMediaServer stop&lt;br /&gt;
	RETVAL=$?&lt;br /&gt;
	echo&lt;br /&gt;
	[ $RETVAL = 0 ] &amp;amp;&amp;amp; rm -f ${lockfile} ${pidfile}&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;# See how we were called.&lt;br /&gt;
case &quot;$1&quot; in&lt;br /&gt;
  start)&lt;br /&gt;
	start&lt;br /&gt;
	;;&lt;br /&gt;
  stop)&lt;br /&gt;
	stop&lt;br /&gt;
	;;&lt;br /&gt;
  status)&lt;br /&gt;
	/etc/init.d/WowzaMediaServer status&lt;br /&gt;
	RETVAL=$?&lt;br /&gt;
	;;&lt;br /&gt;
  restart)&lt;br /&gt;
	stop&lt;br /&gt;
	start&lt;br /&gt;
	;;&lt;br /&gt;
  *)&lt;br /&gt;
	echo $&quot;Usage: $prog {start|stop|restart|status}&quot;&lt;br /&gt;
	RETVAL=2&lt;br /&gt;
esac&lt;/p&gt;

&lt;p&gt;exit $RETVAL&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This script will ensure everything is working correctly with the LSB standards, but still using the /etc/init.d/WowzaMediaServer script. This is needed for crm because if the script is not LSB compliant, you get strange errors and situations with failover. Next we are going to edit the CRM configuration.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;crm configure edit&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You will get the standard editor in front of you (in my case vi but could be nano as well), and paste the following (When you do edit, some things are already configured. Just leave those entries what they are, and add the extra&#039;s described below.). Please notice that you replace the 99.99.99.99 with your VIP address.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;node s100 \&lt;br /&gt;
	attributes standby=&quot;off&quot;&lt;br /&gt;
node s101 \&lt;br /&gt;
	attributes standby=&quot;off&quot;&lt;br /&gt;
primitive VIP ocf:heartbeat:IPaddr \&lt;br /&gt;
	params ip=&quot;99.99.99.99&quot; \&lt;br /&gt;
	op monitor interval=&quot;10s&quot;&lt;br /&gt;
primitive WOWZA lsb:WowzaMediaServer2 \&lt;br /&gt;
	op monitor interval=&quot;10s&quot;&lt;br /&gt;
group StreamingCluster VIP WOWZA&lt;br /&gt;
colocation vip_with_wowza inf: VIP WOWZA&lt;br /&gt;
order wowza_after_vip inf: VIP WOWZA&lt;br /&gt;
property $id=&quot;cib-bootstrap-options&quot; \&lt;br /&gt;
	dc-version=&quot;1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558&quot; \&lt;br /&gt;
	cluster-infrastructure=&quot;openais&quot; \&lt;br /&gt;
	expected-quorum-votes=&quot;2&quot; \&lt;br /&gt;
	stonith-enabled=&quot;false&quot; \&lt;br /&gt;
	no-quorum-policy=&quot;ignore&quot;&lt;br /&gt;
rsc_defaults $id=&quot;rsc-options&quot; \&lt;br /&gt;
	resource-stickiness=&quot;100&quot;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you edited the configuration correctly, you should see no error when saving the document. To check if everything is correctly saved in the configuration, you execute:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;crm configure show&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now you need to verify if everything is working correctly. First, check the CRM monitor, to verify if you&#039;re cluster is working properly.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;crm_mon -1&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You should be seeing something simular like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;============&lt;br /&gt;
Last updated: Wed Apr 18 13:44:51 2012&lt;br /&gt;
Last change: Thu Apr 12 11:12:36 2012 via crm_attribute on s100&lt;br /&gt;
Stack: openais&lt;br /&gt;
Current DC: s101 - partition with quorum&lt;br /&gt;
Version: 1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558&lt;br /&gt;
2 Nodes configured, 2 expected votes&lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;/p&gt;

&lt;p&gt;Online: [ s100 s101 ]&lt;/p&gt;

&lt;p&gt; Resource Group: StreamingCluster&lt;br /&gt;
     VIP	(ocf::heartbeat:IPaddr):	Started s100&lt;br /&gt;
     WOWZA	(lsb:WowzaMediaServer2):	Started s100&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What you see here is that the s100 host is doing all the heavy lifting right now for Wowza Services. So let&#039;s simulate a failover. That&#039;s quite easy achieved by doing the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;crm node standby s100&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When failover is working correctly, you should be seeing this output.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;crm_mon -1&lt;br /&gt;
============&lt;br /&gt;
Last updated: Wed Apr 18 13:48:45 2012&lt;br /&gt;
Last change: Wed Apr 18 13:48:40 2012 via crm_attribute on s100&lt;br /&gt;
Stack: openais&lt;br /&gt;
Current DC: s101 - partition with quorum&lt;br /&gt;
Version: 1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558&lt;br /&gt;
2 Nodes configured, 2 expected votes&lt;br /&gt;
2 Resources configured.&lt;br /&gt;
============&lt;/p&gt;

&lt;p&gt;Node s100: standby&lt;br /&gt;
Online: [ s101 ]&lt;/p&gt;

&lt;p&gt; Resource Group: StreamingCluster&lt;br /&gt;
     VIP	(ocf::heartbeat:IPaddr):	Started s101&lt;br /&gt;
     WOWZA	(lsb:WowzaMediaServer2):	Started s101&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Congratualations, you have successfully made a failover to the other node, taking over the Wowza Services + VIP address. Now you can take the first node online again.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;crm node online s100&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After this you will see that it&#039;s started, but not taking over the services from s101. This is correct! This setup prevents failing back to the first node. This is on purpose. Because in a worst case scenario it can happen that you have a flapping network card on s100. Then the cluster would be making a failover every time it flaps. That&#039;s not what we want of course. In case you want to failover again to s100, you simply move the resource back. Example below:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;crm resource move StreamingCluster s100&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It&#039;s now running again on s100 instead of s101. &lt;/p&gt;

&lt;p&gt;Now in case the above crm configurations is giving errors, you could start all over again. This can be achieved by executing the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;cibadmin -E --force&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;NOTICE, this will delete the complete CRM setup. So be careful when executing this command. Below we have some handy commands which can be very handy.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;cibadmin -Q : List the xml configuration of the cluster&lt;br /&gt;
cibadmin -Q &gt; cib-backup.xml : Save the configuration of the cluster in the given file&lt;br /&gt;
crm_verifiy -LV : Check the xml for errors or orphaned resources&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is the end of the Howto. Many things above are found be just using Google, and wrapping this up. Most stuff I have used are listed below:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;http://www.clusterlabs.org/wiki/Documentation&quot;&gt;http://www.clusterlabs.org/wiki/Documentation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.coolzero.info/blogs/index.php/ha-cluster-wowza-servers-with-crm-pacemaker-corosync-and-rhel-6x?blog=5&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>This howto explains how to setup a High Availability Cluster with Wowza and Redhat Enterprise Linux 6.x. In our setup we have a cluster of 2 origin servers. We are using the following details below with the ip settings in the complete document. We have 2 servers, and are going to use one VIP (Virtual IP Address) address for the Cluster.</p>

<blockquote>
<p>11.11.11.11 = s100<br />
22.22.22.22 = s101<br />
99.99.99.99 = vip</p>
</blockquote>

<p>Before we start you should know the following points.</p>

<blockquote>
<p>1. You need a RedHat Account at <a href="https://rhn.redhat.com">https://rhn.redhat.com</a> and have a copy of RHEL 6.x and the High Availability Add-On.<br />
2. If you don't have RedHat, use CentOS 6.x or Scientificlinux 6.x and their repositories for getting the files.<br />
3. You know network basics.<br />
4. You know unix basics.<br />
5. You know how to look at log files (very important when you are debugging).<br />
6. You know RHEL 6.x / CentOS / Scientificlinux basics.<br />
7. You know how Wowza configuration works.<br />
8. Everything explained below assumes that you do all actions on both hosts. The only thing that's not executed on both hosts are the crm tool or cibadmin.</p>
</blockquote>

<p>All checked? Let's start!</p>

<p>First, in your /etc/hosts file add the following:</p>

<blockquote>
<p>11.11.11.11 s100<br />
22.22.22.22 s101<br />
99.99.99.99 vip</p>
</blockquote>

<p>This is needed because when you have DNS outage, the names are still resolvable. </p>

<p>After this execute the following:</p>

<blockquote>
<p>yum install -y corosync pacemaker<br />
chkconfig pacemaker on<br />
chkconfig corosync on<br />
chown -R hacluster /var/log/cluster</p>
</blockquote>

<p>After doing this, create a new file at /etc/corosync/corosync.conf and paste:</p>

<blockquote>
<p># Please read the corosync.conf.5 manual page<br />
compatibility: whitetank</p>

<p>totem {<br />
        version: 2<br />
        secauth: off<br />
        threads: 0<br />
        interface {<br />
                ringnumber: 0<br />
                bindnetaddr: 11.11.11.11 <br />
                mcastaddr: 226.94.1.1<br />
                mcastport: 5405<br />
        }<br />
}</p>

<p>logging {<br />
        fileline: off<br />
        to_stderr: no<br />
        to_logfile: yes<br />
        to_syslog: yes<br />
        logfile: /var/log/cluster/corosync.log<br />
        debug: off<br />
        timestamp: on<br />
        logger_subsys {<br />
                subsys: AMF<br />
                debug: off<br />
        }<br />
}</p>

<p>amf {<br />
        mode: disabled<br />
}</p>
</blockquote>

<p>The only thing you need to change are:</p>

<blockquote>
<p>bindnetaddr: 11.11.11.11<br />
mcastaddr: 226.94.1.1<br />
mcastport: 5405</p>
</blockquote>

<p>Now we are doing two nodes, so you need to do this on the second node:</p>

<blockquote>
<p>bindnetaddr: 22.22.22.22<br />
mcastaddr: 226.94.1.1<br />
mcastport: 5405</p>
</blockquote>

<p>When done, you need to create another file /etc/corosync/service.d/pcmk and paste:</p>

<blockquote>
<p>service {<br />
        # Load the Pacemaker Cluster Resource Manager<br />
        name: pacemaker<br />
        ver: 1<br />
}</p>
</blockquote>

<p>After these actions, please first check if you are running IPTables on your machine. If you do, you need the following rules to allow access between the hosts to communicate.</p>

<blockquote>
<p>iptables -A INPUT -m udp -p udp -s 11.11.11.11 --dport 5405 -j ACCEPT<br />
iptables -A INPUT -m udp -p udp -s 22.22.22.22 --dport 5405 -j ACCEPT<br />
iptables -A INPUT -m udp -p udp -s 226.94.1.1 --dport 5405 -j ACCEPT</p>
</blockquote>

<p>Of course if you are a experienced IPTables user, simply adjust the rules how you see fit. The important thing to know is that UDP port 5405 is able to communicate to both hosts + the multicast address. Also this needs to be done on BOTH hosts.</p>

<p>After setting up iptables or simply disabling it, start the corosync process and pacemaker. </p>

<blockquote>
<p>service corosync start<br />
service pacemaker start</p>
</blockquote>

<p>You should be able to logging in /var/log/messages or /var/log/cluster/corosync.log. The interesting thing in these logs is to look if you have no big errors. You should be seeing the error:</p>

<blockquote>
<p>ERROR: unpack_resources: Resource start-up disabled since no STONITH resources have been defined<br />
ERROR: unpack_resources: Either configure some or disable STONITH with the stonith-enabled option<br />
ERROR: unpack_resources: NOTE: Clusters with shared data need STONITH to ensure data integrity<br />
notice: process_pe_message: Configuration ERRORs found during PE processing.  Please run "crm_verify -L" to identify issues.</p>
</blockquote>

<p>This is correct, because we have not setup the crm config file yet! The basics are ready, now we are going to install Wowza Server itself and Java. That's quite easy (again on both nodes). </p>

<p>Download Java from <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a> and pick the Java 7 JDK package. Why JDK? Well you could also choose JRE but with Wowza some functions will not work out. After downloaded the right java package install it.</p>

<blockquote>
<p>yum localinstall jdk-7u3-linux-x64.rpm</p>
</blockquote>

<p>Next is Wowza.</p>

<blockquote>
<p>wget <a href="http://www.wowza.com/downloads/WowzaMediaServer-3-1-0/WowzaMediaServer-3.1.0.rpm.bin">http://www.wowza.com/downloads/WowzaMediaServer-3-1-0/WowzaMediaServer-3.1.0.rpm.bin</a><br />
chmod 755 WowzaMediaServer-3.1.0.rpm.bin<br />
./WowzaMediaServer-3.1.0.rpm.bin (and say yes)<br />
/usr/local/WowzaMediaServer/bin/startup.sh (and enter serial key and CTRL+C after startup)</p>
</blockquote>

<p>Now Wowza is installed, setup the /usr/local/WowzaMediaServer/conf/VHost.xml file that it only binds to the VIP address. </p>

<blockquote>
<p>As example, in the VHost.xml file you can search on IpAddress. There you should add the VIP address, which is 99.99.99.99 in this case.</p>
</blockquote>

<p>After Wowza is installed, you will get a startup script from Wowza in /etc/init.d/WowzaMediaServer. This script is unfortunately not LSB compliant. I have made one small adjustment in this startup script. Just execute the following.</p>

<blockquote>
<p>vi /etc/init.d/WowzaMediaServer</p>
</blockquote>

<p>When in edit mode, search for:</p>

<blockquote>
<p>localstatus() {<br />
if [ -f $WMSLOCK_FILE ]; then<br />
        echo "$WMSBASE_NAME started"<br />
else<br />
        echo "$WMSBASE_NAME stopped"<br />
fi<br />
RETVAL=0<br />
}</p>
</blockquote>

<p>And change it to this:</p>

<blockquote>
<p>localstatus() {<br />
if [ -f $WMSLOCK_FILE ]; then<br />
        echo "$WMSBASE_NAME started"<br />
        RETVAL=0<br />
else<br />
        echo "$WMSBASE_NAME stopped"<br />
        RETVAL=3<br />
fi<br />
}</p>
</blockquote>

<p>After editing these lines, we make another script called /etc/init.d/WowzaMediaServer2 and put this piece of code in the script:</p>

<blockquote>
<p>#!/bin/bash<br />
#<br />
# WowzaMediaServer2        Startup script for Wowza <br />
#<br />
# chkconfig: - 85 15<br />
# description: Wowza Streaming Server <br />
# processname: WowzaMediaServerd<br />
#<br />
### BEGIN INIT INFO<br />
# Provides: WowzaMediaServerd<br />
# Required-Start: $local_fs $remote_fs $network $named<br />
# Required-Stop: $local_fs $remote_fs $network<br />
# Should-Start: distcache<br />
# Short-Description: start and stop Wowza <br />
# Description: Wowza Streaming Server <br />
### END INIT INFO</p>

<p># Source function library.<br />
. /etc/rc.d/init.d/functions</p>

<p>prog=WowzaMediaServer<br />
pidfile=${PIDFILE-/var/run/wowza/wowza.pid}<br />
lockfile=${LOCKFILE-/var/lock/subsys/wowza}<br />
RETVAL=0<br />
STOP_TIMEOUT=${STOP_TIMEOUT-10}</p>

<p>start() {<br />
        echo -n $"Starting $prog: "<br />
	/etc/init.d/WowzaMediaServer start<br />
        RETVAL=$?<br />
        echo<br />
        [ $RETVAL = 0 ] &amp;&amp; touch ${lockfile}<br />
        return $RETVAL<br />
}</p>

<p>stop() {<br />
	echo -n $"Stopping $prog: "<br />
	/etc/init.d/WowzaMediaServer stop<br />
	RETVAL=$?<br />
	echo<br />
	[ $RETVAL = 0 ] &amp;&amp; rm -f ${lockfile} ${pidfile}<br />
}</p>

<p># See how we were called.<br />
case "$1" in<br />
  start)<br />
	start<br />
	;;<br />
  stop)<br />
	stop<br />
	;;<br />
  status)<br />
	/etc/init.d/WowzaMediaServer status<br />
	RETVAL=$?<br />
	;;<br />
  restart)<br />
	stop<br />
	start<br />
	;;<br />
  *)<br />
	echo $"Usage: $prog {start|stop|restart|status}"<br />
	RETVAL=2<br />
esac</p>

<p>exit $RETVAL</p>
</blockquote>

<p>This script will ensure everything is working correctly with the LSB standards, but still using the /etc/init.d/WowzaMediaServer script. This is needed for crm because if the script is not LSB compliant, you get strange errors and situations with failover. Next we are going to edit the CRM configuration.</p>

<blockquote>
<p>crm configure edit</p>
</blockquote>

<p>You will get the standard editor in front of you (in my case vi but could be nano as well), and paste the following (When you do edit, some things are already configured. Just leave those entries what they are, and add the extra's described below.). Please notice that you replace the 99.99.99.99 with your VIP address.</p>

<blockquote>
<p>node s100 \<br />
	attributes standby="off"<br />
node s101 \<br />
	attributes standby="off"<br />
primitive VIP ocf:heartbeat:IPaddr \<br />
	params ip="99.99.99.99" \<br />
	op monitor interval="10s"<br />
primitive WOWZA lsb:WowzaMediaServer2 \<br />
	op monitor interval="10s"<br />
group StreamingCluster VIP WOWZA<br />
colocation vip_with_wowza inf: VIP WOWZA<br />
order wowza_after_vip inf: VIP WOWZA<br />
property $id="cib-bootstrap-options" \<br />
	dc-version="1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558" \<br />
	cluster-infrastructure="openais" \<br />
	expected-quorum-votes="2" \<br />
	stonith-enabled="false" \<br />
	no-quorum-policy="ignore"<br />
rsc_defaults $id="rsc-options" \<br />
	resource-stickiness="100"</p>
</blockquote>

<p>If you edited the configuration correctly, you should see no error when saving the document. To check if everything is correctly saved in the configuration, you execute:</p>

<blockquote>
<p>crm configure show</p>
</blockquote>

<p>Now you need to verify if everything is working correctly. First, check the CRM monitor, to verify if you're cluster is working properly.</p>

<blockquote>
<p>crm_mon -1</p>
</blockquote>

<p>You should be seeing something simular like this:</p>

<blockquote>
<p>============<br />
Last updated: Wed Apr 18 13:44:51 2012<br />
Last change: Thu Apr 12 11:12:36 2012 via crm_attribute on s100<br />
Stack: openais<br />
Current DC: s101 - partition with quorum<br />
Version: 1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558<br />
2 Nodes configured, 2 expected votes<br />
2 Resources configured.<br />
============</p>

<p>Online: [ s100 s101 ]</p>

<p> Resource Group: StreamingCluster<br />
     VIP	(ocf::heartbeat:IPaddr):	Started s100<br />
     WOWZA	(lsb:WowzaMediaServer2):	Started s100</p>
</blockquote>

<p>What you see here is that the s100 host is doing all the heavy lifting right now for Wowza Services. So let's simulate a failover. That's quite easy achieved by doing the following:</p>

<blockquote>
<p>crm node standby s100</p>
</blockquote>

<p>When failover is working correctly, you should be seeing this output.</p>

<blockquote>
<p>crm_mon -1<br />
============<br />
Last updated: Wed Apr 18 13:48:45 2012<br />
Last change: Wed Apr 18 13:48:40 2012 via crm_attribute on s100<br />
Stack: openais<br />
Current DC: s101 - partition with quorum<br />
Version: 1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558<br />
2 Nodes configured, 2 expected votes<br />
2 Resources configured.<br />
============</p>

<p>Node s100: standby<br />
Online: [ s101 ]</p>

<p> Resource Group: StreamingCluster<br />
     VIP	(ocf::heartbeat:IPaddr):	Started s101<br />
     WOWZA	(lsb:WowzaMediaServer2):	Started s101</p>
</blockquote>

<p>Congratualations, you have successfully made a failover to the other node, taking over the Wowza Services + VIP address. Now you can take the first node online again.</p>

<blockquote>
<p>crm node online s100</p>
</blockquote>

<p>After this you will see that it's started, but not taking over the services from s101. This is correct! This setup prevents failing back to the first node. This is on purpose. Because in a worst case scenario it can happen that you have a flapping network card on s100. Then the cluster would be making a failover every time it flaps. That's not what we want of course. In case you want to failover again to s100, you simply move the resource back. Example below:</p>

<blockquote>
<p>crm resource move StreamingCluster s100</p>
</blockquote>

<p>It's now running again on s100 instead of s101. </p>

<p>Now in case the above crm configurations is giving errors, you could start all over again. This can be achieved by executing the following:</p>

<blockquote>
<p>cibadmin -E --force</p>
</blockquote>

<p>NOTICE, this will delete the complete CRM setup. So be careful when executing this command. Below we have some handy commands which can be very handy.</p>

<blockquote>
<p>cibadmin -Q : List the xml configuration of the cluster<br />
cibadmin -Q > cib-backup.xml : Save the configuration of the cluster in the given file<br />
crm_verifiy -LV : Check the xml for errors or orphaned resources</p>
</blockquote>

<p>This is the end of the Howto. Many things above are found be just using Google, and wrapping this up. Most stuff I have used are listed below:</p>

<blockquote>
<p><a href="http://www.clusterlabs.org/wiki/Documentation">http://www.clusterlabs.org/wiki/Documentation</a></p>
</blockquote><div class="item_footer"><p><small><a href="http://blog.coolzero.info/blogs/index.php/ha-cluster-wowza-servers-with-crm-pacemaker-corosync-and-rhel-6x?blog=5">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blog.coolzero.info/blogs/index.php/ha-cluster-wowza-servers-with-crm-pacemaker-corosync-and-rhel-6x?blog=5#comments</comments>
			<wfw:commentRss>http://blog.coolzero.info/blogs/index.php?blog=5&#38;tempskin=_rss2&#38;disp=comments&#38;p=53</wfw:commentRss>
		</item>
				<item>
			<title>Howto use Grub, Raid0, LVM2 and Fake Raid / dmraid (Silicon Image, Inc. SiI 3114) under Fedora, Redhat and Linux in general.</title>
			<link>http://blog.coolzero.info/blogs/index.php/howto-use-grub-and-fake-raid-silicon-image-inc-sii-3114-under-linux?blog=5</link>
			<pubDate>Tue, 03 Nov 2009 14:22:48 +0000</pubDate>			<dc:creator>coolzero</dc:creator>
			<category domain="main">Just a story...</category>			<guid isPermaLink="false">52@http://blog.coolzero.info/blogs/</guid>
						<description>&lt;p&gt;Hi there,&lt;br /&gt;
I know I haven&#039;t been posting alot lately, but I came accross some weird problem with fake raid on my Silicon Image 3114 controller. I was trying to reinstall the mbr with grub, because I had installed Windows on the machine as well, on another partition. Normally, when using grub via the cli, you get something like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[me@somehost ~]$ grub&lt;br /&gt;
Probing devices to guess BIOS drives. This may take a long time.&lt;/p&gt;


&lt;p&gt;    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)&lt;/p&gt;

&lt;p&gt; [ Minimal BASH-like line editing is supported.  For the first word, TAB&lt;br /&gt;
   lists possible command completions.  Anywhere else TAB lists the possible&lt;br /&gt;
   completions of a device/filename.]&lt;br /&gt;
grub&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now normally you could do this when using some kind of rescue cd.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;grub&gt; root (hd0,1)&lt;br /&gt;
grub&gt; setup (hd0)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But unfortunately this simply does not work with fake raid, because when using something like RAID 0, it gives errors that it cannot find the partition. I was really searching for two hours long why it couldn&#039;t find my disk layout. Everything was ok, even the device.map. It looked like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(hd0)     /dev/mapper/sil_agababbifhbg&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So how did I fix this problem? The solution lies within grub and pointing out that you give the right geometry of the harddisk layout of your raid 0 setup. It sounds weird, but it worked just great. Just do this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cfdisk /dev/mapper/sil_agababbifhbg&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In my case the output was like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Disk Drive: /dev/mapper/sil_agababbifhbg&lt;br /&gt;
Size: 148709441536 bytes, 148.7 GB&lt;br /&gt;
Heads: 255   Sectors per Track: 63   Cylinders: 18079&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As you can see, my heads are 255, sectors are 63, and cylinders are 18079. These are just the settings I need to get around the problem. Now let&#039;s get grub going.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[me@somehost ~]$ grub&lt;br /&gt;
Probing devices to guess BIOS drives. This may take a long time.&lt;/p&gt;


&lt;p&gt;    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)&lt;/p&gt;

&lt;p&gt; [ Minimal BASH-like line editing is supported.  For the first word, TAB&lt;br /&gt;
   lists possible command completions.  Anywhere else TAB lists the possible&lt;br /&gt;
   completions of a device/filename.]&lt;br /&gt;
grub&gt; grub --device-map=/dev/null&lt;br /&gt;
grub&gt; device (hd0) /dev/mapper/sil_agababbifhbg&lt;br /&gt;
grub&gt; geometry (hd0) 18079 255 63&lt;br /&gt;
grub&gt; root (hd0,1)&lt;br /&gt;
grub&gt; setup (hd0,1)&lt;br /&gt;
grub&gt; setup (hd0)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And voila! It worked! It&#039;s more a bug this problem, which I also found online, with many people having the same issues.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=489148#c33&quot;&gt;Look at this post for instance!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anyway, I hope that the search engines are going to archive this correctly, so many people can be helped with this problem. Any comments are welcome of course!&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.coolzero.info/blogs/index.php/howto-use-grub-and-fake-raid-silicon-image-inc-sii-3114-under-linux?blog=5&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Hi there,<br />
I know I haven't been posting alot lately, but I came accross some weird problem with fake raid on my Silicon Image 3114 controller. I was trying to reinstall the mbr with grub, because I had installed Windows on the machine as well, on another partition. Normally, when using grub via the cli, you get something like this:</p>
<blockquote>
<p>[me@somehost ~]$ grub<br />
Probing devices to guess BIOS drives. This may take a long time.</p>


<p>    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)</p>

<p> [ Minimal BASH-like line editing is supported.  For the first word, TAB<br />
   lists possible command completions.  Anywhere else TAB lists the possible<br />
   completions of a device/filename.]<br />
grub></p>
</blockquote>
<p>Now normally you could do this when using some kind of rescue cd.</p>
<blockquote>
<p>grub> root (hd0,1)<br />
grub> setup (hd0)</p>
</blockquote>
<p>But unfortunately this simply does not work with fake raid, because when using something like RAID 0, it gives errors that it cannot find the partition. I was really searching for two hours long why it couldn't find my disk layout. Everything was ok, even the device.map. It looked like this:</p>
<blockquote>
<p>(hd0)     /dev/mapper/sil_agababbifhbg</p>
</blockquote>
<p>So how did I fix this problem? The solution lies within grub and pointing out that you give the right geometry of the harddisk layout of your raid 0 setup. It sounds weird, but it worked just great. Just do this:</p>
<blockquote>
<p>cfdisk /dev/mapper/sil_agababbifhbg</p>
</blockquote>
<p>In my case the output was like this:</p>
<blockquote>
<p>Disk Drive: /dev/mapper/sil_agababbifhbg<br />
Size: 148709441536 bytes, 148.7 GB<br />
Heads: 255   Sectors per Track: 63   Cylinders: 18079</p>
</blockquote>
<p>As you can see, my heads are 255, sectors are 63, and cylinders are 18079. These are just the settings I need to get around the problem. Now let's get grub going.</p>
<blockquote>
<p>[me@somehost ~]$ grub<br />
Probing devices to guess BIOS drives. This may take a long time.</p>


<p>    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)</p>

<p> [ Minimal BASH-like line editing is supported.  For the first word, TAB<br />
   lists possible command completions.  Anywhere else TAB lists the possible<br />
   completions of a device/filename.]<br />
grub> grub --device-map=/dev/null<br />
grub> device (hd0) /dev/mapper/sil_agababbifhbg<br />
grub> geometry (hd0) 18079 255 63<br />
grub> root (hd0,1)<br />
grub> setup (hd0,1)<br />
grub> setup (hd0)</p>
</blockquote>
<p>And voila! It worked! It's more a bug this problem, which I also found online, with many people having the same issues.</p>

<p><a href="https://bugzilla.redhat.com/show_bug.cgi?id=489148#c33">Look at this post for instance!</a></p>

<p>Anyway, I hope that the search engines are going to archive this correctly, so many people can be helped with this problem. Any comments are welcome of course!</p><div class="item_footer"><p><small><a href="http://blog.coolzero.info/blogs/index.php/howto-use-grub-and-fake-raid-silicon-image-inc-sii-3114-under-linux?blog=5">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blog.coolzero.info/blogs/index.php/howto-use-grub-and-fake-raid-silicon-image-inc-sii-3114-under-linux?blog=5#comments</comments>
			<wfw:commentRss>http://blog.coolzero.info/blogs/index.php?blog=5&#38;tempskin=_rss2&#38;disp=comments&#38;p=52</wfw:commentRss>
		</item>
				<item>
			<title>Imtek the Pimptek</title>
			<link>http://blog.coolzero.info/blogs/index.php/imtek-the-pimptek?blog=5</link>
			<pubDate>Tue, 04 Nov 2008 14:30:48 +0000</pubDate>			<dc:creator>coolzero</dc:creator>
			<category domain="main">Links</category>			<guid isPermaLink="false">51@http://blog.coolzero.info/blogs/</guid>
						<description>&lt;p&gt;This site is of a friend of mine. Cool dude, with nice *nix skills.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.imtek.nl/&quot; target=&quot;_blank&quot;&gt;http://www.imtek.nl/&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.coolzero.info/blogs/index.php/imtek-the-pimptek?blog=5&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>This site is of a friend of mine. Cool dude, with nice *nix skills.</p>

<p><a href="http://www.imtek.nl/" target="_blank">http://www.imtek.nl/</a></p><div class="item_footer"><p><small><a href="http://blog.coolzero.info/blogs/index.php/imtek-the-pimptek?blog=5">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blog.coolzero.info/blogs/index.php/imtek-the-pimptek?blog=5#comments</comments>
			<wfw:commentRss>http://blog.coolzero.info/blogs/index.php?blog=5&#38;tempskin=_rss2&#38;disp=comments&#38;p=51</wfw:commentRss>
		</item>
				<item>
			<title>RHEL 5.2 (CentOS) and the LSI / Symbios Logic SAS1068E Checking RAID Status</title>
			<link>http://blog.coolzero.info/blogs/index.php/dell-2950-and-the-lsi-symbios-logic-sas1?blog=5</link>
			<pubDate>Thu, 05 Jun 2008 13:53:16 +0000</pubDate>			<dc:creator>coolzero</dc:creator>
			<category domain="main">Just a story...</category>			<guid isPermaLink="false">50@http://blog.coolzero.info/blogs/</guid>
						<description>&lt;p&gt;Well, today, I just wanted to know if there was another and also a much smaller utility for monitoring the raid status of my Dell 2950 server. Normally with the tools of Dell with OpenManage you can do it also. But that&#039;s a big package, and I wanted a light package cli for this. &lt;/p&gt;

&lt;p&gt;Fortunately, somebody made that package. And best of all, it&#039;s open source! So this is the deal with Redhat Enterprise 5.2 (CentOS). &lt;/p&gt;

&lt;p&gt;First, we install the kernel sources, that are needed to compile the package.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;rpm -ivh kernel-2.6.18-92.1.1.el5.src.rpm&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Than we need to unpack the packages of the kernel and make it ready to unpack the sources.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;rpmbuild -bp --target=$(uname -m) \&lt;br /&gt;
/usr/src/redhat/SPECS/kernel-2.6.spec&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After waiting you must make a symbolic link like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ln -s /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64 linux&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now we need to download the package of the CLI and unpack it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;wget &lt;a href=&quot;http://www.drugphish.ch/~ratz/mpt-status/mpt-status-1.2.0.tar.gz&quot;&gt;http://www.drugphish.ch/~ratz/mpt-status/mpt-status-1.2.0.tar.gz&lt;/a&gt;&lt;br /&gt;
tar -zxf mpt-status-1.2.0.tar.gz&lt;br /&gt;
cd mpt-status-1.2.0&lt;br /&gt;
vi mpt-status.h&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now in VI you need to change the following line:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;#include linux/compiler.h&lt;br /&gt;
to&lt;br /&gt;
#include /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64 \&lt;br /&gt;
/include/linux/compiler.h&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Next compile the program:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;make&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And with no errors, you got a working mpt-status in this directory. Now let&#039;s check it out if it works!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;./mpt-status &lt;br /&gt;
ioc0 vol_id 0 type IM, 2 phy, 231 GB, state OPTIMAL, flags ENABLED&lt;br /&gt;
ioc0 phy 3 scsi_id 9 ATA      WDC WD2500YS-18S 6C07, 232 GB, state ONLINE, flags NONE&lt;br /&gt;
ioc0 phy 2 scsi_id 1 ATA      WDC WD2500YS-18S 6C07, 232 GB, state ONLINE, flags NONE&lt;/p&gt;

&lt;p&gt;./mpt-status -n -s&lt;br /&gt;
vol_id:0 OPTIMAL&lt;br /&gt;
phys_id:3 ONLINE&lt;br /&gt;
phys_id:2 ONLINE&lt;br /&gt;
spare_id:0 ONLINE&lt;br /&gt;
spare_id:1 ONLINE&lt;br /&gt;
scsi_id:3 100%&lt;br /&gt;
scsi_id:2 100%&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It works! These two examples are simple. The first one is just showing what&#039;s running, the other one is showing what is running, but also shows hot-spares and even more. If you do not use the &quot;-s&quot; you will see everything what&#039;s needed.&lt;/p&gt;

&lt;p&gt;I hope I help some souls with this example! Good luck!&lt;/p&gt;

&lt;p&gt;-CoolZero&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.coolzero.info/blogs/index.php/dell-2950-and-the-lsi-symbios-logic-sas1?blog=5&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Well, today, I just wanted to know if there was another and also a much smaller utility for monitoring the raid status of my Dell 2950 server. Normally with the tools of Dell with OpenManage you can do it also. But that's a big package, and I wanted a light package cli for this. </p>

<p>Fortunately, somebody made that package. And best of all, it's open source! So this is the deal with Redhat Enterprise 5.2 (CentOS). </p>

<p>First, we install the kernel sources, that are needed to compile the package.</p>

<blockquote>
<p>rpm -ivh kernel-2.6.18-92.1.1.el5.src.rpm</p>
</blockquote>

<p>Than we need to unpack the packages of the kernel and make it ready to unpack the sources.</p>

<blockquote>
<p>rpmbuild -bp --target=$(uname -m) \<br />
/usr/src/redhat/SPECS/kernel-2.6.spec</p>
</blockquote>

<p>After waiting you must make a symbolic link like this:</p>

<blockquote>
<p>ln -s /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64 linux</p>
</blockquote>

<p>Now we need to download the package of the CLI and unpack it.</p>

<blockquote>
<p>wget <a href="http://www.drugphish.ch/~ratz/mpt-status/mpt-status-1.2.0.tar.gz">http://www.drugphish.ch/~ratz/mpt-status/mpt-status-1.2.0.tar.gz</a><br />
tar -zxf mpt-status-1.2.0.tar.gz<br />
cd mpt-status-1.2.0<br />
vi mpt-status.h</p>
</blockquote>

<p>Now in VI you need to change the following line:</p>

<blockquote>
<p>#include linux/compiler.h<br />
to<br />
#include /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64 \<br />
/include/linux/compiler.h</p>
</blockquote>

<p>Next compile the program:</p>

<blockquote>
<p>make</p>
</blockquote>

<p>And with no errors, you got a working mpt-status in this directory. Now let's check it out if it works!</p>

<blockquote>
<p>./mpt-status <br />
ioc0 vol_id 0 type IM, 2 phy, 231 GB, state OPTIMAL, flags ENABLED<br />
ioc0 phy 3 scsi_id 9 ATA      WDC WD2500YS-18S 6C07, 232 GB, state ONLINE, flags NONE<br />
ioc0 phy 2 scsi_id 1 ATA      WDC WD2500YS-18S 6C07, 232 GB, state ONLINE, flags NONE</p>

<p>./mpt-status -n -s<br />
vol_id:0 OPTIMAL<br />
phys_id:3 ONLINE<br />
phys_id:2 ONLINE<br />
spare_id:0 ONLINE<br />
spare_id:1 ONLINE<br />
scsi_id:3 100%<br />
scsi_id:2 100%</p>
</blockquote>

<p>It works! These two examples are simple. The first one is just showing what's running, the other one is showing what is running, but also shows hot-spares and even more. If you do not use the "-s" you will see everything what's needed.</p>

<p>I hope I help some souls with this example! Good luck!</p>

<p>-CoolZero</p><div class="item_footer"><p><small><a href="http://blog.coolzero.info/blogs/index.php/dell-2950-and-the-lsi-symbios-logic-sas1?blog=5">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blog.coolzero.info/blogs/index.php/dell-2950-and-the-lsi-symbios-logic-sas1?blog=5#comments</comments>
			<wfw:commentRss>http://blog.coolzero.info/blogs/index.php?blog=5&#38;tempskin=_rss2&#38;disp=comments&#38;p=50</wfw:commentRss>
		</item>
				<item>
			<title>Drac 5 / RHEL 5.2 (CentOS) Xen based and Serial Console Redirection</title>
			<link>http://blog.coolzero.info/blogs/index.php/drac-5-rhel-5-2-centos-xen-based-and-ser?blog=5</link>
			<pubDate>Wed, 04 Jun 2008 13:07:08 +0000</pubDate>			<dc:creator>coolzero</dc:creator>
			<category domain="main">Just a story...</category>			<guid isPermaLink="false">49@http://blog.coolzero.info/blogs/</guid>
						<description>&lt;p&gt;So, it&#039;s Sunday, it also is a rainy day, and you think, hell, let&#039;s get to work with a nice Dell 2950 server with Drac 5 in it&#039;s system. Now I would like to make a simple console redirection, for the simplicity of remote administration of the machine. &lt;/p&gt;

&lt;p&gt;Now you think, hell, that&#039;s a easy job, and normally, it really is! But I have spend almost for 2 hours to get this working. So let&#039;s see what steps I have taken to get the darn thing moving.&lt;/p&gt;

&lt;p&gt;First, install on the server Dell&#039;s Openmanage, or just do like I did, just some setup in the bios. With Dell&#039;s Openmanage you can do this very easy, just type in the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;omconfig chassis biossetup attribute=extserial setting=rad&lt;br /&gt;
omconfig chassis biossetup attribute=fbr setting=57600&lt;br /&gt;
omconfig chassis biossetup attribute=serialcom setting=com2&lt;br /&gt;
omconfig chassis biossetup attribute=crab setting=enabled&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In your bios setup, just get to the console redirection options, and use the values like here:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;BIOS:&lt;br /&gt;
on with console redirection via com2&lt;br /&gt;
remote access device&lt;br /&gt;
57600&lt;br /&gt;
vt100/vt220&lt;br /&gt;
enabled &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Alright, second, get in your Drac 5 and set it up so it can do ssh. When done, connect with ssh, and type in the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;racadm config -g cfgSerial -o cfgSerialBaudRate 57600&lt;br /&gt;
racadm config -g cfgSerial -o cfgSerialConsoleEnable 1&lt;br /&gt;
racadm config -g cfgSerial -o cfgSerialHistorySize 2000&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These command&#039;s simply set the right speed + history size of the console redirection. This was really the easy part. Now the part where I got stuck. I saw everything booting in the serial redirection console, but when the operating system started, it simply did not show anything anymore. The problem was that Xen has a own startup line to get the console going. To get everything working we need to edit the following files:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;/boot/grub/grub.conf&lt;br /&gt;
/etc/inittab&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In grub.conf it looks like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;serial --unit=0 --speed=57600&lt;br /&gt;
terminal --timeout=10 console serial &lt;br /&gt;
default=0&lt;br /&gt;
timeout=5&lt;br /&gt;
title Red Hat Enterprise Linux Server (2.6.18-92.el5xen)&lt;br /&gt;
        root (hd0,0)&lt;br /&gt;
        kernel /xen.gz-2.6.18-92.el5 console=tty0 console=com2 \ com2=57600,8n1 &lt;br /&gt;
        module /vmlinuz-2.6.18-92.el5xen ro root=LABEL=/1 xencons=ttyS1 \ console=ttyS1&lt;br /&gt;
        module /initrd-2.6.18-92.el5xen.img&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And in inittab the following line needs to be added:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;# Run gettys in standard runlevels&lt;br /&gt;
s1:2345:respawn:/sbin/agetty ttyS1 57600&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now we have everything to get the serial console redirection working. Now let&#039;s test it. Get to ssh of your Drac 5, and type in the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;connect com2&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To disconnect use &quot;[CTRL]+[\]&quot; (Press the Control key and the backslash key together to disconnect cleanly from the connection.)&lt;/p&gt;

&lt;p&gt;If it says the port is in use by another user that probably means the connection was not cleanly terminated. Best way to clear that up is to reset the drac card with the following command:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;racadm racreset &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You should see something in your screen. To be sure this is working at all, reboot your server, you really should get the starting up on your screen. If not, then you got already something wrong at your bios setup! If you see your system starting but you don&#039;t see your booting process of the os, you need to check the settings of grub.conf, and maybe inittab if you see the booting, but no login screen. &lt;/p&gt;

&lt;p&gt;I hope I help some people who are experiencing the same problems I had. For comments, you can mail me at jim (the monkey tale) coolzero dot info.&lt;/p&gt;

&lt;p&gt;-CoolZero&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.coolzero.info/blogs/index.php/drac-5-rhel-5-2-centos-xen-based-and-ser?blog=5&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>So, it's Sunday, it also is a rainy day, and you think, hell, let's get to work with a nice Dell 2950 server with Drac 5 in it's system. Now I would like to make a simple console redirection, for the simplicity of remote administration of the machine. </p>

<p>Now you think, hell, that's a easy job, and normally, it really is! But I have spend almost for 2 hours to get this working. So let's see what steps I have taken to get the darn thing moving.</p>

<p>First, install on the server Dell's Openmanage, or just do like I did, just some setup in the bios. With Dell's Openmanage you can do this very easy, just type in the following:</p>

<blockquote>
<p>omconfig chassis biossetup attribute=extserial setting=rad<br />
omconfig chassis biossetup attribute=fbr setting=57600<br />
omconfig chassis biossetup attribute=serialcom setting=com2<br />
omconfig chassis biossetup attribute=crab setting=enabled</p>
</blockquote>

<p>In your bios setup, just get to the console redirection options, and use the values like here:</p>

<blockquote>
<p>BIOS:<br />
on with console redirection via com2<br />
remote access device<br />
57600<br />
vt100/vt220<br />
enabled </p>
</blockquote>

<p>Alright, second, get in your Drac 5 and set it up so it can do ssh. When done, connect with ssh, and type in the following:</p>

<blockquote>
<p>racadm config -g cfgSerial -o cfgSerialBaudRate 57600<br />
racadm config -g cfgSerial -o cfgSerialConsoleEnable 1<br />
racadm config -g cfgSerial -o cfgSerialHistorySize 2000</p>
</blockquote>

<p>These command's simply set the right speed + history size of the console redirection. This was really the easy part. Now the part where I got stuck. I saw everything booting in the serial redirection console, but when the operating system started, it simply did not show anything anymore. The problem was that Xen has a own startup line to get the console going. To get everything working we need to edit the following files:</p>

<blockquote>
<p>/boot/grub/grub.conf<br />
/etc/inittab</p>
</blockquote>

<p>In grub.conf it looks like this:</p>

<blockquote>
<p>serial --unit=0 --speed=57600<br />
terminal --timeout=10 console serial <br />
default=0<br />
timeout=5<br />
title Red Hat Enterprise Linux Server (2.6.18-92.el5xen)<br />
        root (hd0,0)<br />
        kernel /xen.gz-2.6.18-92.el5 console=tty0 console=com2 \ com2=57600,8n1 <br />
        module /vmlinuz-2.6.18-92.el5xen ro root=LABEL=/1 xencons=ttyS1 \ console=ttyS1<br />
        module /initrd-2.6.18-92.el5xen.img</p>
</blockquote>

<p>And in inittab the following line needs to be added:</p>

<blockquote>
<p># Run gettys in standard runlevels<br />
s1:2345:respawn:/sbin/agetty ttyS1 57600</p>
</blockquote>

<p>Now we have everything to get the serial console redirection working. Now let's test it. Get to ssh of your Drac 5, and type in the following:</p>

<blockquote>
<p>connect com2</p>
</blockquote>

<p>To disconnect use "[CTRL]+[\]" (Press the Control key and the backslash key together to disconnect cleanly from the connection.)</p>

<p>If it says the port is in use by another user that probably means the connection was not cleanly terminated. Best way to clear that up is to reset the drac card with the following command:</p>

<blockquote>
<p>racadm racreset </p>
</blockquote>

<p>You should see something in your screen. To be sure this is working at all, reboot your server, you really should get the starting up on your screen. If not, then you got already something wrong at your bios setup! If you see your system starting but you don't see your booting process of the os, you need to check the settings of grub.conf, and maybe inittab if you see the booting, but no login screen. </p>

<p>I hope I help some people who are experiencing the same problems I had. For comments, you can mail me at jim (the monkey tale) coolzero dot info.</p>

<p>-CoolZero</p><div class="item_footer"><p><small><a href="http://blog.coolzero.info/blogs/index.php/drac-5-rhel-5-2-centos-xen-based-and-ser?blog=5">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blog.coolzero.info/blogs/index.php/drac-5-rhel-5-2-centos-xen-based-and-ser?blog=5#comments</comments>
			<wfw:commentRss>http://blog.coolzero.info/blogs/index.php?blog=5&#38;tempskin=_rss2&#38;disp=comments&#38;p=49</wfw:commentRss>
		</item>
				<item>
			<title>DragonFlyBSD and Vkernel howto!</title>
			<link>http://blog.coolzero.info/blogs/index.php/dragenflybsd_and_vkernel_howto?blog=5</link>
			<pubDate>Fri, 31 Aug 2007 08:38:46 +0000</pubDate>			<dc:creator>coolzero</dc:creator>
			<category domain="main">Just a story...</category>			<guid isPermaLink="false">48@http://blog.coolzero.info/blogs/</guid>
						<description>&lt;p&gt;Hi there all,&lt;/p&gt;

&lt;p&gt;Well, today I was busy looking at vkernel of DragonFlyBSD. When I got it rolling it was really nice to see how easy it was to use, but unfortunately the manual on their own site is a little outdated and not complete. So I decided to write a small quick reference for myself if I want to do this again!&lt;/p&gt;

&lt;p&gt;I&#039;m using currently DragonFlyBSD 1.10.1. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;First download the iso image:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://chlamydia.fs.ei.tum.de/pub/DragonFly/iso-images/dfly-1.10.1_REL.iso.gz&quot; target=&quot;_blank&quot;&gt;http://chlamydia.fs.ei.tum.de/pub/DragonFly/iso-images/dfly-1.10.1_REL.iso.gz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Unpack:&lt;/b&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;gunzip dfly-1.10.1_REL.iso.gz &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And burn it on a cd. Now it&#039;s time for the installation.&lt;/p&gt;

&lt;p&gt;Just hit the ENTER key when asking which choice to make at boot time. Alright, now it&#039;s booting to the prompt. Enter as username installer. Then choose as language default then Install DragonFlyBSD and again Install DragonFlyBSD. WARNING for this, it will whipe out the whole hard drive, so if you need multi boot, check the manuals @ the DragonFly website. You will see a list of drives, choose the right hard drive. And then choose Use Entire Disk and then OK and again OK. Alright, you can now fill out the partitioning, just do that your way, you can choose the defaults if you like. When you hit OK, and all is formatted, you get the screen to begin the installation. Just hit ENTER. Again after this you can just hit enter. Works normally, if not, check only the drive you need where the bootmanager can be on. Now you can configure the system, just fill in what you need, and the reboot the computer. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Now log in as root and do the following (and yes ROOT is evil!):&lt;/b&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;cp /usr/share/examples/cvsup/DragonFly-release1_10-supfile /root&lt;br /&gt;
cvsup /root/DragonFly-release1_10-supfile&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;b&gt;Because the process of making a new kernel + world really takes a load of time use screen, download it like here:&lt;/b&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;cd /usr/&lt;br /&gt;
cvs -d anoncvs@anoncvs.us.netbsd.org:/cvsroot co pkgsrc&lt;br /&gt;
cd /usr/pkgsrc/misc/screen&lt;br /&gt;
bmake install clean&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;b&gt;Now build the new world / kernel:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;If you have a custom kernel config file in /usr/src/sys/i386/conf, replace make buildkernel and make installkernel with make buildkernel KERNCONF=KERNELNAME and make installkernel KERNCONF=KERNELNAME, where KERNELNAME is the name of that configuration file.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cd /usr/src &amp;amp;&amp;amp; make buildworld &amp;amp;&amp;amp; make buildkernel&lt;br /&gt;
make installkernel &amp;amp;&amp;amp; make installworld &amp;amp;&amp;amp; make upgrade&lt;br /&gt;
reboot&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Alright, you have now a fresh kernel and made a build world. You need to do this because you need to install the build world in the vkernel file later. Now do the following steps.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Making symlinks because var directory is normally small:&lt;/b&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;mkdir /home/var.vkernel&lt;br /&gt;
ln -s /home/var.vkernel /var/vkernel&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;b&gt;Making the vkernel file:&lt;/b&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;dd if=/dev/zero of=/var/vkernel/rootimg.01 bs=1m count=10240&lt;br /&gt;
vnconfig -c -s labels vn0 /var/vkernel/rootimg.01&lt;br /&gt;
disklabel -r -w vn0s0 auto&lt;br /&gt;
disklabel -e vn0s0&lt;/p&gt;

&lt;p&gt;Add the following:&lt;br /&gt;
a:   20971520          0    4.2BSD    #   10240.000M&lt;/p&gt;

&lt;p&gt;newfs /dev/vn0s0a&lt;br /&gt;
mount /dev/vn0s0a /mnt&lt;br /&gt;
cd /usr/src&lt;br /&gt;
make installworld DESTDIR=/mnt&lt;br /&gt;
cd etc&lt;br /&gt;
make distribution DESTDIR=/mnt&lt;br /&gt;
echo &#039;/dev/vkd0s0a / ufs rw 1 1&#039; &gt;/mnt/etc/fstab&lt;/p&gt;

&lt;p&gt;echo &#039;console &quot;/usr/libexec/getty Pc&quot; cons25 on secure&#039; \&lt;br /&gt;
 &gt;/mnt/etc/ttys&lt;/p&gt;

&lt;p&gt;umount /mnt&lt;br /&gt;
vnconfig -u vn0s0a&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;b&gt;Compiling the virtual kernel:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;In order to compile a virtual kernel use the VKERNEL kernel configuration file residing in /usr/src/sys/config (or a configuration file derived thereof):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cd /usr/src&lt;br /&gt;
make -DNO_MODULES buildkernel KERNCONF=VKERNEL&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;b&gt;Enabling virtual kernel operation:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;A special sysctl, vm.vkernel_enable, must be set to enable vkernel operation:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sysctl vm.vkernel_enable=1&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;b&gt;Configuring the network on the host system:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;In order to access a network interface of the host system from the vkernel, you must add the interface to a bridge device which will then be passed to the -I option. Also a little notice, the line where rl0 is used should be your ethernet alias. You can find that by doing ifconfig:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;kldload if_bridge.ko&lt;br /&gt;
kldload if_tap.ko&lt;br /&gt;
ifconfig bridge0 create&lt;br /&gt;
ifconfig bridge0 addm rl0&lt;br /&gt;
ifconfig bridge0 up&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;b&gt;Running the kernel:&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Finally, the virtual kernel can be run:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cd /usr/obj/usr/src/sys/VKERNEL&lt;br /&gt;
./kernel.debug -m 64m -r /var/vkernel/rootimg.01 -I auto:bridge0&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Alright, well now you have your vkernel running under DragonFlyBSD. Hope this helps some people having trouble configurating the vkernel. Or at least help some people who want to just hit and run! If you have further questions, just e-mail me. That&#039;s jim (themonkeytale) coolzero dot info.&lt;/p&gt;

&lt;p&gt;-CoolZero&lt;/p&gt;

&lt;div class=&quot;image_block&quot;&gt;&lt;a href=&quot;http://www.dragonflybsd.org&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://blog.coolzero.info/blogs/media/blogs/CoolZero/logodragonflybsd.jpg&quot; alt=&quot;&quot; title=&quot;&quot; width=&quot;300&quot; height=&quot;184&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.coolzero.info/blogs/index.php/dragenflybsd_and_vkernel_howto?blog=5&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Hi there all,</p>

<p>Well, today I was busy looking at vkernel of DragonFlyBSD. When I got it rolling it was really nice to see how easy it was to use, but unfortunately the manual on their own site is a little outdated and not complete. So I decided to write a small quick reference for myself if I want to do this again!</p>

<p>I'm using currently DragonFlyBSD 1.10.1. </p>

<p><b>First download the iso image:</b></p>

<p><a href="http://chlamydia.fs.ei.tum.de/pub/DragonFly/iso-images/dfly-1.10.1_REL.iso.gz" target="_blank">http://chlamydia.fs.ei.tum.de/pub/DragonFly/iso-images/dfly-1.10.1_REL.iso.gz</a></p>

<p><b>Unpack:</b></p>

<blockquote>
<p>gunzip dfly-1.10.1_REL.iso.gz </p>
</blockquote>

<p>And burn it on a cd. Now it's time for the installation.</p>

<p>Just hit the ENTER key when asking which choice to make at boot time. Alright, now it's booting to the prompt. Enter as username installer. Then choose as language default then Install DragonFlyBSD and again Install DragonFlyBSD. WARNING for this, it will whipe out the whole hard drive, so if you need multi boot, check the manuals @ the DragonFly website. You will see a list of drives, choose the right hard drive. And then choose Use Entire Disk and then OK and again OK. Alright, you can now fill out the partitioning, just do that your way, you can choose the defaults if you like. When you hit OK, and all is formatted, you get the screen to begin the installation. Just hit ENTER. Again after this you can just hit enter. Works normally, if not, check only the drive you need where the bootmanager can be on. Now you can configure the system, just fill in what you need, and the reboot the computer. </p>

<p><b>Now log in as root and do the following (and yes ROOT is evil!):</b></p>

<blockquote>
<p>cp /usr/share/examples/cvsup/DragonFly-release1_10-supfile /root<br />
cvsup /root/DragonFly-release1_10-supfile</p>
</blockquote>

<p><b>Because the process of making a new kernel + world really takes a load of time use screen, download it like here:</b></p>

<blockquote>
<p>cd /usr/<br />
cvs -d anoncvs@anoncvs.us.netbsd.org:/cvsroot co pkgsrc<br />
cd /usr/pkgsrc/misc/screen<br />
bmake install clean</p>
</blockquote>

<p><b>Now build the new world / kernel:</b></p>

<p>If you have a custom kernel config file in /usr/src/sys/i386/conf, replace make buildkernel and make installkernel with make buildkernel KERNCONF=KERNELNAME and make installkernel KERNCONF=KERNELNAME, where KERNELNAME is the name of that configuration file.</p>
<blockquote>
<p>cd /usr/src &amp;&amp; make buildworld &amp;&amp; make buildkernel<br />
make installkernel &amp;&amp; make installworld &amp;&amp; make upgrade<br />
reboot</p>
</blockquote>

<p>Alright, you have now a fresh kernel and made a build world. You need to do this because you need to install the build world in the vkernel file later. Now do the following steps.</p>

<p><b>Making symlinks because var directory is normally small:</b></p>

<blockquote>
<p>mkdir /home/var.vkernel<br />
ln -s /home/var.vkernel /var/vkernel</p>
</blockquote>

<p><b>Making the vkernel file:</b></p>

<blockquote>
<p>dd if=/dev/zero of=/var/vkernel/rootimg.01 bs=1m count=10240<br />
vnconfig -c -s labels vn0 /var/vkernel/rootimg.01<br />
disklabel -r -w vn0s0 auto<br />
disklabel -e vn0s0</p>

<p>Add the following:<br />
a:   20971520          0    4.2BSD    #   10240.000M</p>

<p>newfs /dev/vn0s0a<br />
mount /dev/vn0s0a /mnt<br />
cd /usr/src<br />
make installworld DESTDIR=/mnt<br />
cd etc<br />
make distribution DESTDIR=/mnt<br />
echo '/dev/vkd0s0a / ufs rw 1 1' >/mnt/etc/fstab</p>

<p>echo 'console "/usr/libexec/getty Pc" cons25 on secure' \<br />
 >/mnt/etc/ttys</p>

<p>umount /mnt<br />
vnconfig -u vn0s0a</p>
</blockquote>

<p><b>Compiling the virtual kernel:</b></p>

<p>In order to compile a virtual kernel use the VKERNEL kernel configuration file residing in /usr/src/sys/config (or a configuration file derived thereof):</p>
<blockquote>
<p>cd /usr/src<br />
make -DNO_MODULES buildkernel KERNCONF=VKERNEL</p>
</blockquote>

<p><b>Enabling virtual kernel operation:</b></p>

<p>A special sysctl, vm.vkernel_enable, must be set to enable vkernel operation:</p>
<blockquote>
<p>sysctl vm.vkernel_enable=1</p>
</blockquote>

<p><b>Configuring the network on the host system:</b></p>

<p>In order to access a network interface of the host system from the vkernel, you must add the interface to a bridge device which will then be passed to the -I option. Also a little notice, the line where rl0 is used should be your ethernet alias. You can find that by doing ifconfig:</p>
<blockquote>
<p>kldload if_bridge.ko<br />
kldload if_tap.ko<br />
ifconfig bridge0 create<br />
ifconfig bridge0 addm rl0<br />
ifconfig bridge0 up</p>
</blockquote>

<p><b>Running the kernel:</b></p>

<p>Finally, the virtual kernel can be run:</p>
<blockquote>
<p>cd /usr/obj/usr/src/sys/VKERNEL<br />
./kernel.debug -m 64m -r /var/vkernel/rootimg.01 -I auto:bridge0</p>
</blockquote>

<p>Alright, well now you have your vkernel running under DragonFlyBSD. Hope this helps some people having trouble configurating the vkernel. Or at least help some people who want to just hit and run! If you have further questions, just e-mail me. That's jim (themonkeytale) coolzero dot info.</p>

<p>-CoolZero</p>

<div class="image_block"><a href="http://www.dragonflybsd.org" target="_blank"><img src="http://blog.coolzero.info/blogs/media/blogs/CoolZero/logodragonflybsd.jpg" alt="" title="" width="300" height="184" /></a></div><div class="item_footer"><p><small><a href="http://blog.coolzero.info/blogs/index.php/dragenflybsd_and_vkernel_howto?blog=5">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blog.coolzero.info/blogs/index.php/dragenflybsd_and_vkernel_howto?blog=5#comments</comments>
			<wfw:commentRss>http://blog.coolzero.info/blogs/index.php?blog=5&#38;tempskin=_rss2&#38;disp=comments&#38;p=48</wfw:commentRss>
		</item>
				<item>
			<title>A nice tip about resizing!</title>
			<link>http://blog.coolzero.info/blogs/index.php/a_nice_tip_about_resizing?blog=5</link>
			<pubDate>Fri, 03 Aug 2007 09:29:03 +0000</pubDate>			<dc:creator>coolzero</dc:creator>
			<category domain="main">Just a story...</category>			<guid isPermaLink="false">47@http://blog.coolzero.info/blogs/</guid>
						<description>&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;Here a small but very effective tip about resizing your photo images in Linux. You need Image Magick for this. Just do this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;cd /directory ;&lt;br /&gt;
for k in $(ls *.jpg); do convert $k -resize 1024 -quality 85 -crop 1024x768+0+0 /directory/$k; done ;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Explanation:&lt;/p&gt;

&lt;p&gt;We create a simple loop, then do a listing with ls, searching for jpg files, then do command convert, resize the image to 1024, quality of the images should be 85 and cropping the image to 1024x768. Well, hope this helps you too if you are searching for a solution for resizing.&lt;/p&gt;

&lt;p&gt;-CoolZero&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.coolzero.info/blogs/index.php/a_nice_tip_about_resizing?blog=5&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Hi there,</p>

<p>Here a small but very effective tip about resizing your photo images in Linux. You need Image Magick for this. Just do this:</p>

<blockquote>
<p>cd /directory ;<br />
for k in $(ls *.jpg); do convert $k -resize 1024 -quality 85 -crop 1024x768+0+0 /directory/$k; done ;</p>
</blockquote>

<p>Explanation:</p>

<p>We create a simple loop, then do a listing with ls, searching for jpg files, then do command convert, resize the image to 1024, quality of the images should be 85 and cropping the image to 1024x768. Well, hope this helps you too if you are searching for a solution for resizing.</p>

<p>-CoolZero</p><div class="item_footer"><p><small><a href="http://blog.coolzero.info/blogs/index.php/a_nice_tip_about_resizing?blog=5">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blog.coolzero.info/blogs/index.php/a_nice_tip_about_resizing?blog=5#comments</comments>
			<wfw:commentRss>http://blog.coolzero.info/blogs/index.php?blog=5&#38;tempskin=_rss2&#38;disp=comments&#38;p=47</wfw:commentRss>
		</item>
				<item>
			<title>Calculate your Body Mass Index (BMI)</title>
			<link>http://blog.coolzero.info/blogs/index.php/calculate_your_body_mass_index_bmi?blog=5</link>
			<pubDate>Wed, 01 Aug 2007 14:12:50 +0000</pubDate>			<dc:creator>coolzero</dc:creator>
			<category domain="main">BMI</category>			<guid isPermaLink="false">46@http://blog.coolzero.info/blogs/</guid>
						<description>&lt;p&gt;Hi there all,&lt;/p&gt;

&lt;p&gt;Well, I have made a simple little script called a Body Mass Index calculator. This is a simple program to see if you are living a healthy life or a not healthy one ;).&lt;/p&gt;

&lt;p&gt;Anyway, this is made dutch, so only people who can read that will like this very much. &lt;/p&gt;

&lt;p&gt;To calculate your BMI go to:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://scripts.coolzero.info/bmi.php&quot; target=&quot;_blank&quot;&gt;http://scripts.coolzero.info/bmi.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, this week or next week I will post some new pictures of the Vacation @ Blanes. It was fun, and the pictures are even more funnier!&lt;/p&gt;

&lt;p&gt;I&#039;ll keep you updated!&lt;/p&gt;

&lt;p&gt;-CoolZero&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blog.coolzero.info/blogs/index.php/calculate_your_body_mass_index_bmi?blog=5&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Hi there all,</p>

<p>Well, I have made a simple little script called a Body Mass Index calculator. This is a simple program to see if you are living a healthy life or a not healthy one ;).</p>

<p>Anyway, this is made dutch, so only people who can read that will like this very much. </p>

<p>To calculate your BMI go to:</p>

<p><a href="http://scripts.coolzero.info/bmi.php" target="_blank">http://scripts.coolzero.info/bmi.php</a></p>

<p>Also, this week or next week I will post some new pictures of the Vacation @ Blanes. It was fun, and the pictures are even more funnier!</p>

<p>I'll keep you updated!</p>

<p>-CoolZero</p><div class="item_footer"><p><small><a href="http://blog.coolzero.info/blogs/index.php/calculate_your_body_mass_index_bmi?blog=5">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blog.coolzero.info/blogs/index.php/calculate_your_body_mass_index_bmi?blog=5#comments</comments>
			<wfw:commentRss>http://blog.coolzero.info/blogs/index.php?blog=5&#38;tempskin=_rss2&#38;disp=comments&#38;p=46</wfw:commentRss>
		</item>
			</channel>
</rss>

