<?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/"
	>

<channel>
	<title>/root.eu</title>
	<atom:link href="http://slashroot.eu/feed/" rel="self" type="application/rss+xml" />
	<link>http://slashroot.eu</link>
	<description>Notepad of geeky sysadmin</description>
	<lastBuildDate>Thu, 10 May 2012 16:41:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Road to RHCA: 4 exams passed, 1 to go</title>
		<link>http://slashroot.eu/2012/03/12/road-to-rhca-4-exams-passed-1-to-go/</link>
		<comments>http://slashroot.eu/2012/03/12/road-to-rhca-4-exams-passed-1-to-go/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 18:49:47 +0000</pubDate>
		<dc:creator>root</dc:creator>
				<category><![CDATA[rhca]]></category>
		<category><![CDATA[ex333]]></category>
		<category><![CDATA[ex401]]></category>
		<category><![CDATA[ex423]]></category>
		<category><![CDATA[ex436]]></category>

		<guid isPermaLink="false">http://slashroot.eu/?p=275</guid>
		<description><![CDATA[It`s been a while since my last update on RHCA progress. I must admit that last couple of month were quite busy for me &#8211; I took four exams from RHCA path without attending . Let me write a few &#8230; <a href="http://slashroot.eu/2012/03/12/road-to-rhca-4-exams-passed-1-to-go/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It`s been a while since my last update on RHCA progress. I must admit that last couple of month were quite busy for me &#8211; I took four exams from RHCA path without attending . Let me write a few tips and my impressions on each of them.</p>
<p><strong>Chapter 1: It`s probably as easy as RHCE&#8230; No it isn`t!</strong></p>
<p>The first one was EX333. It is a two part exam and I think it&#8217;s the most tiring. It lasts 6 hours and requires you to solve many tasks<strong>. </strong>Of course I can&#8217;t tell you what kind of tasks &#8211; just look at prep guide available at Red Hat website<strong>.<br />
</strong>My tip for those learning for this exam is trivial &#8211; be thorough and patient. Read tasks few times and read it as a whole. Of course check result not twice, but at least three times. I caught myself on finding small typo which could lead to a fail. And a final tip as always for all Red Hat exams &#8211; reboot your systems before final checking. Don&#8217;t trust yourself &#8211; &#8220;it should work&#8221; is not a way to go.</p>
<p><strong>Chapter 2: Clusters are fun</strong></p>
<p>Yes, they are. And so is my second exam &#8211; EX436. I was having fun playing with Red Hat Cluster Suite. It&#8217;s a really nice product and if correctly configured can work like a charm. Learning GFS was also a pleasure. Generally I find EX436 as my favourite exam from RHCA path.<br />
And my tip &#8211; have fun and experiment with your clusters as I did. They are neat feature and is recognized as a solid rock piece of software.<strong></strong></p>
<p><strong>Chapter 3: LDAP administration has never been so easy</strong></p>
<p>I&#8217;ve been using ldap from couple of years, but Red Hat Directory Server and EX423 showed me how easy administration of ldap structure can be<strong>. </strong>Especially when it comes to high availability solutions like mulit-master replication &#8211; it can be configured from gui or cli if you like (choose the former for exam).<br />
Tip for EX423<strong>: </strong>for me it was very similar to EX436, as it focuses on Red Hat product &#8211; in this case it&#8217;s Red Hat Directory Server. So tips are the same &#8211; play and expertiment.</p>
<p><strong>Chapter 4: <em>Can I have my own satellite please? If not I&#8217;m gonna have a spacewalk on my own then</em>&#8230;</strong></p>
<p>EX401 was my fourth exam. Prep guide shows it&#8217;s not hard and in common opinion is recognized as the easiest one (from RHCA path). But there&#8217;s a tricky part included &#8211; everything is based on Red Hat Network Satellite Server which is not freely available. It is only for registered clients/partners and if you want to test it`s all features you have to request evaluation certificate directly from Red Hat. It is annoying, especially for people like me who doesn&#8217;t attend RH401 classes. So if you do not succeed in getting RHN Satellite iso there&#8217;s an alternative &#8211; it&#8217;s Spacewalk. This project is aim to be the same as Fedora is to RHEL &#8211; a development field for new features before they become stable and are put into RHN Satellite. And that&#8217;s not all &#8211; when using spacewalk you can play only with your custom distros (centos and fedora) and not Red Hat Channels among other things that are available on RHN Satellite only and are a part of EX401 exam objectives.<br />
My tip is simple &#8211; get yourself your own RHN Satellite. Probably the best way of doing it is to contact Red Hat representative or sales partner and ask for an evaluation version.</p>
<p><strong>Chapter 5: Finall battle</strong></p>
<p>My last exam is EX442. Yes, I&#8217;m aware it&#8217;s the most difficult and challenging one and that&#8217;s why I&#8217;m preparing for it longer and more thoroughly than to any previous one. I find EX442 objectives most advanced and practical. It is an essential skill for system administrator to diagnose, monitor, troubleshoot and perform tuning of his systems. I&#8217;m taking an opportunity to deep into linux internals &#8211; kernel scheduling, IO schedulers, network performance and using whole bunch of available statistics I&#8217;ve never used before. It&#8217;s most fascinating part of my work on becoming RHCA.</p>
<p>I see the light in the tunnel or maybe it&#8217;s a train that&#8217;s gonna crush me? <img src='http://slashroot.eu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://slashroot.eu/2012/03/12/road-to-rhca-4-exams-passed-1-to-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My tips and impression on RHCSA and RHCE exams</title>
		<link>http://slashroot.eu/2011/06/23/my-tips-and-impression-on-rhcsa-and-rhce-exams/</link>
		<comments>http://slashroot.eu/2011/06/23/my-tips-and-impression-on-rhcsa-and-rhce-exams/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 13:03:22 +0000</pubDate>
		<dc:creator>root</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[exam]]></category>
		<category><![CDATA[rhca]]></category>
		<category><![CDATA[rhce]]></category>
		<category><![CDATA[rhcsa]]></category>
		<category><![CDATA[rhel6]]></category>

		<guid isPermaLink="false">http://slashroot.eu/?p=258</guid>
		<description><![CDATA[Last friday I took two exams &#8211; EX200 and EX300.  I didn`t take any courses as I was preparing by myself at home. I must say that it was more challenging that 4 years earlier when I had taken my &#8230; <a href="http://slashroot.eu/2011/06/23/my-tips-and-impression-on-rhcsa-and-rhce-exams/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last friday I took two exams &#8211; EX200 and EX300.  I didn`t take any courses as I was preparing by myself at home. I must say that it was more challenging that 4 years earlier when I had taken my previous RHCE exam. First of all <strong>RHEL6</strong> gained new features compared to<strong> RHEL4</strong>. Second thing is that they added pretty much more tasks and objectives in exam requirements. You can find them in prep guides available <a href="http://www.europe.redhat.com/training/course/guide/EX200">here</a> (for RHCSA) and <a href="http://www.europe.redhat.com/training/course/guide/EX300">here</a> (for RHCE).</p>
<p>And this is my first tip &#8211; use these guides and follow all of objectives. For example if there`s a task about iSCSI initiator then learn and make some exercises. You have to follow <strong>all</strong> of these objectives. It`s especially important to people like me who didn`t take any course before, because it`s harder to make yourself some excercises. I was using two virtual machines for this purpose &#8211; one of them was a server with some services (nfs, ldap, iscsi target, etc..) and one was a client.</p>
<p>Second thing &#8211; don`t forget about <strong>SELinux</strong>. All of services must be SELinux enabled. Do <strong>not</strong> turn this off during your study. If you`re not familiar with SELinux then read <a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/index.html">this</a> documentation &#8211; it`s really good and helpful. I recommend reading it at least twice and check all of described commands/tools.</p>
<p>Documentation. I think that Red Hat guys did a really good job creating a bunch of nice docs available on their <a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/">site</a>.  I recommend reading all of them as they describe most of exam objectives with nice examples. Unfortunately it`s not available during the exam and you must also know how to use manual pages (e.g. <em>man httpd_selinux</em> &#8211; describes options on selinux configuration of httpd service) and use it. Also config examples in <strong>/usr/shared/doc/*</strong> are pretty useful. That`s a very nice thing in Red Hat exams &#8211; when you forgot some detail you can always use built-in documentation. They don`t require you to remember all of options although you must know how particular services work. So my tip is this &#8211; learn how to find info on something using documentation available in you system rather than just ask google like you (probably) always do <img src='http://slashroot.eu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>And last but not least tip &#8211; get yourself a good sleep night before exam. I didn`t take any notes nor my laptop &#8211; try to relax and think positive. If you learn  and practice then everything will go smoothly.</p>
<p>Of course I have passed both exams and got both RHCSA and RHCE certificates <img src='http://slashroot.eu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  In my personal opinion I consider RHCSA to be more challenging than RHCE &#8211; just look at exam objectives. RHCE adds SElinux and some basic configuration of network services while RHCSA covers a lot of other things. I recommend taking two exams on one day &#8211; it`s not that scary as you think.</p>
<p>Good luck to all of you preparing and studying! I`m starting preparation for <strong>RHCA</strong> exams. I`ll try to write some tips on them too. Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashroot.eu/2011/06/23/my-tips-and-impression-on-rhcsa-and-rhce-exams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RHEL6 and ldap server with ssl</title>
		<link>http://slashroot.eu/2011/06/13/rhel6-and-ldap-server-with-ssl/</link>
		<comments>http://slashroot.eu/2011/06/13/rhel6-and-ldap-server-with-ssl/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 12:03:51 +0000</pubDate>
		<dc:creator>root</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[rhel6]]></category>
		<category><![CDATA[slapd]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://slashroot.eu/?p=252</guid>
		<description><![CDATA[During my preparation for RHCSA+RHCE exams (I have to recertificate as I passed my previous RHCE on RHEL4) I encountered some serious problems with ssl and openldap (slapd) server. I created self-signed certificate: openssl req -new -x509 -nodes -out /etc/pki/tls/certs/slapd.crt &#8230; <a href="http://slashroot.eu/2011/06/13/rhel6-and-ldap-server-with-ssl/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>During my preparation for RHCSA+RHCE exams (I have to recertificate as I passed my previous RHCE on RHEL4) I encountered some <em>serious</em> problems with ssl and openldap (slapd) server.</p>
<p>I created self-signed certificate:</p>
<pre>openssl req -new -x509 -nodes -out /etc/pki/tls/certs/slapd.crt -keyout /etc/pki/tls/certs/slapd.key -days 365</pre>
<p>and added following lines to <strong>/etc/openldap/slapd.d/cn=config/olcDatabase={1}bdb.ldif</strong></p>
<pre>olcTLSCACertificateFile: /etc/pki/tls/certs/slapd.crt
olcTLSCertificateKeyFile: /etc/pki/tls/certs/slapd.key</pre>
<p>Everything seemed to work fine, but I couldn`t query ldap using ldaps uri &#8211; I got the following error message:</p>
<pre>ldapsearch -x  -H ldaps://localhost -b 'dc=example,dc=com'
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)</pre>
<p>After short and intensive investigation, reading dozens of howto pages I founded the cause &#8211; it turned out that in RHEL6 you <strong>can`t</strong> use self-signed certificates. Well, maybe it`s not that they forbid you to do this, but it`s not as simple as it was in previous versions. Now you have to explicitly add your certificate so that is no longer unknown. There`s even more &#8211; you have to configure your <strong>Common Name</strong> field of the certificate so it matches exactly your server`s name.</p>
<p>So eventually to solve this issue I had to confgure ldap tools/clients and add path to server`s certificate to <strong>/etc/openldap/ldap.conf</strong>:</p>
<pre>TLS_CACERT /etc/pki/tls/certs/slapd.crt</pre>
<p>So nothing is the same now &#8211; RHEL6 brings new features, new tools and new problems <img src='http://slashroot.eu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  It`s time to learn and adapt.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashroot.eu/2011/06/13/rhel6-and-ldap-server-with-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problem with grub &#8211; can`t find stage1</title>
		<link>http://slashroot.eu/2011/04/07/problem-with-grub-cant-find-stage1/</link>
		<comments>http://slashroot.eu/2011/04/07/problem-with-grub-cant-find-stage1/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 06:21:48 +0000</pubDate>
		<dc:creator>root</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ext3]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[stage1]]></category>

		<guid isPermaLink="false">http://slashroot.eu/?p=245</guid>
		<description><![CDATA[If you were moving system from one machine to another (e.g. physical to virtual machine) and you stuck on installing grub to mbr: root (hd0,0) setup (hd0) Checking if "/boot/grub/stage1" exists... no Checking if "/grub/stage1" exists... no then I have &#8230; <a href="http://slashroot.eu/2011/04/07/problem-with-grub-cant-find-stage1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you were moving system from one machine to another (e.g. physical to virtual machine) and you stuck on installing grub to mbr:</p>
<pre>root (hd0,0)
setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... no</pre>
<p>then I have a solution for you. If you checked dozens of pages (like I did) that say there`s a problem with your grub files and you checked them hundred times that everything is fine (files were there, you can still install grub on the source system using exactly the same set of files) then do not loose hope <img src='http://slashroot.eu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  You might want to check if your grub is able to read your filesystem. Maybe you created fs using newer tools. I was moving Fedora Core 3 using sysrescuecd. I created partition and filesystem using tools available on that system. It seems that probably there were minor changes between ext3 fs created on FC3 and sysrecurecd and therefore after chrooting to FC3 environment I couldn`t install grub.</p>
<p>The solution is quite simple &#8211; do it <strong>outside</strong> chroot environment!</p>
<p>Once you have mounted your root partition with /boot install mbr using grub from your livecd environment. In my case I had it mounted on <strong>/mnt/custom</strong> so I had to enter the following command to install grub on <strong>/dev/sda</strong>:</p>
<pre>grub-install --root-directory=/mnt/custom /dev/sda</pre>
<p>I didn`t find a way to do this using grub command line, but using grub-install I was able to boot my system and that was what I needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashroot.eu/2011/04/07/problem-with-grub-cant-find-stage1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List installed dpkg and rpm packages with their size</title>
		<link>http://slashroot.eu/2010/11/03/list-installed-dpkg-and-rpm-packages-with-their-size/</link>
		<comments>http://slashroot.eu/2010/11/03/list-installed-dpkg-and-rpm-packages-with-their-size/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 11:54:04 +0000</pubDate>
		<dc:creator>root</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[oneliners]]></category>
		<category><![CDATA[dpkg]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://slashroot.eu/?p=217</guid>
		<description><![CDATA[Some time ago I found a small script dpkg-du used to list dpkg packages and size of files that belongs to them. Unfortunately I couldn`t find it now when I needed it, but few minutes with manual brought me to &#8230; <a href="http://slashroot.eu/2010/11/03/list-installed-dpkg-and-rpm-packages-with-their-size/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Some time ago I found a small script <strong>dpkg-du</strong> used to list dpkg packages and size of files that belongs to them. Unfortunately I couldn`t find it now when I needed it, but few minutes with manual brought me to this trivial oneliner: </p>
<p><code>dpkg-query -W -f='${Installed-Size} ${Package}\n'</code></p>
<p>And here`s a rpm version:</p>
<p><code>rpm -qa --queryformat '%{SIZE} %{NAME}\n'</code></p>
]]></content:encoded>
			<wfw:commentRss>http://slashroot.eu/2010/11/03/list-installed-dpkg-and-rpm-packages-with-their-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Permission denied when mounting nfs share</title>
		<link>http://slashroot.eu/2010/06/10/permission-denied-when-mounting-nfs-share/</link>
		<comments>http://slashroot.eu/2010/06/10/permission-denied-when-mounting-nfs-share/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 08:40:26 +0000</pubDate>
		<dc:creator>root</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[nfs]]></category>

		<guid isPermaLink="false">http://slashroot.eu/?p=205</guid>
		<description><![CDATA[I had a problem with nfs share today. I couldn`t mount it on remote server. It failed with the following error: mount: xxx:/yyy failed, reason given by server: Permission denied I checked the configuration dozens of times &#8211; it was &#8230; <a href="http://slashroot.eu/2010/06/10/permission-denied-when-mounting-nfs-share/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I had a problem with nfs share today. I couldn`t mount it on remote server. It failed with the following error:</p>
<p><code><br />
mount: xxx:/yyy failed, reason given by server: Permission denied<br />
</code></p>
<p>I checked the configuration dozens of times &#8211; it was good, and the nfs server granted access to the share. The following info appeared in logs:</p>
<p><code><br />
.. authenticated mount request from 1.1.1.1 for /yyy<br />
</code></p>
<p>So everything looked ok, but it didn`t work. The problem was a pseudo filesystem <b>nfsd</b> which should be mounted in <b>/proc/fs/nfsd</b>, but for some reason it wasn`t. I`ve added the following entry to <b>/etc/fstab</b></p>
<p><code><br />
none                    /proc/fs/nfsd           nfsd    defaults        0 0<br />
</code></p>
<p></br></p>
<p>and mounted it:</p>
<p><code><br />
mount /proc/fs/nfsd<br />
</code></p>
<p>After that I was able to mount the nfs share. It took me some time to figure it out and I think that there should be more specific error messages, because the one with <i>permission denied</i> is quite confusing.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashroot.eu/2010/06/10/permission-denied-when-mounting-nfs-share/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loading mysql database from compressed dump</title>
		<link>http://slashroot.eu/2010/04/09/loading-mysql-database-from-compressed-dump/</link>
		<comments>http://slashroot.eu/2010/04/09/loading-mysql-database-from-compressed-dump/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 09:25:08 +0000</pubDate>
		<dc:creator>root</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oneliners]]></category>

		<guid isPermaLink="false">http://slashroot.eu/?p=193</guid>
		<description><![CDATA[Today I had to load database on mysql. There`s nothing new or exciting about it, but I encountered few problems. First one is that dump was quite big (few gigabytes) and it was compressed with gzip. (G)Unzipping it simply to &#8230; <a href="http://slashroot.eu/2010/04/09/loading-mysql-database-from-compressed-dump/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I had to load database on mysql. There`s nothing new or exciting about it, but I encountered few problems. First one is that dump was quite big (few gigabytes) and it was compressed with gzip. (G)Unzipping it simply to a file would take some time, waste space on disk and it wasn`t the right way <img src='http://slashroot.eu/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  So here how I managed to decompress it and load it at the same time:</p>
<pre>gunzip -c mydbdump.sql.gz|mysql -umyuser -pmypass mydb
</pre>
<p>But then I found another problem &#8211; in my dump there was hardcoded database name. I wasn`t recovering that database, but just wanted to load it to a diffrent one. Names weren`t the same so it failed to load. I looked at the begining of that file using <strong>head </strong>command, as opening so huge file in vi(m) would probably kill the server. I found that there was two sql commands that creates database itself and use it (sql <em>use</em> command). So with a little help of <strong>sed</strong> I managed to modify my command so it looked like this:</p>
<pre>
gunzip -c mydbdump.sql.gz| sed -e '1,30s/old_dbname/mydb/'| mysql -umyuser -pmypass mydb
</pre>
<p>I limited sed`s search&amp;replace to first 30 lines, because database name was at the start of the dump file and I didn`t want to mess with the rest of the file <img src='http://slashroot.eu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://slashroot.eu/2010/04/09/loading-mysql-database-from-compressed-dump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advantages of software raid</title>
		<link>http://slashroot.eu/2010/04/02/advantages-of-software-raid/</link>
		<comments>http://slashroot.eu/2010/04/02/advantages-of-software-raid/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 08:07:55 +0000</pubDate>
		<dc:creator>root</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[linux raid backup]]></category>

		<guid isPermaLink="false">http://slashroot.eu/?p=184</guid>
		<description><![CDATA[Why using software raid when there are plenty hardware raid controllers with dedicated processors for checksum calculations, dedicated memory, cache and bbu? Well there is one major advantage of software raid solutions &#8211; hardware independence. Recently we had a simultaneously &#8230; <a href="http://slashroot.eu/2010/04/02/advantages-of-software-raid/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Why using software raid when there are plenty hardware raid controllers with dedicated processors for checksum calculations, dedicated memory, cache and bbu? Well there is one major advantage of software raid solutions &#8211; hardware independence.<br />
Recently we had a simultaneously crash of two disks in <strong>raid5</strong> on <strong>3ware 9550-sxu</strong> controller. That`s a real bad luck :-&gt; Of course we recovered data from backups, but before that we tried to rebuild array. We discovered that one dik had crashed, but the other had just few bad sectors. As an experiment we cloned that disk without these few sectors and tried to rebuild the array. Unfortunatelly controller didn`t recognize that disk as a member of the array. It turned out that <strong>3ware</strong> controller appends serial numbers of all members of array at the end of disks with a checksum (we tried to replace serial number of cloned disk with no luck).<br />
So how would it look on software raid? Much easier. Linux for example writes only array identificator (UUID) so disk cloning is possible. Furthermore disks can be transfered to another hardware. With 3ware controller in case of its failure we would have to find another 3ware controller (probably the same model).<br />
So a lesson has been taught &#8211; don`t rely on hardware raid, use <strong>raid6</strong> when possible and keep your backups safe because they may save your ass someday <img src='http://slashroot.eu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://slashroot.eu/2010/04/02/advantages-of-software-raid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO Massive virtual hosting on tomcat</title>
		<link>http://slashroot.eu/2010/01/07/howto-massive-virtual-hosting-on-tomcat/</link>
		<comments>http://slashroot.eu/2010/01/07/howto-massive-virtual-hosting-on-tomcat/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 07:33:54 +0000</pubDate>
		<dc:creator>root</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://slashroot.eu/?p=148</guid>
		<description><![CDATA[I found out today that tomcat virtual hosts are pretty lame. I thought that these all java based tomcat`s fancy plugins are much more powerful than old, simpleapache httpd. Well they aren`t. I wasn`t able to configure massive virtual hosting &#8230; <a href="http://slashroot.eu/2010/01/07/howto-massive-virtual-hosting-on-tomcat/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I found out today that tomcat virtual hosts are pretty lame. I thought that these all java based tomcat`s fancy plugins are much more powerful than old, <em>simple</em>apache httpd. Well they aren`t. I wasn`t able to configure massive virtual hosting for servlets. I wanted to run diffrent web application based on domain name that comes in URL. For example <code>myapp1.example.com</code> would run application <code>myapp1</code>, <code>myapp2.example.com</code> would run <code>myapp2</code>, etc. And there could be hundreds of them so I didn`t want to add hundreds of entries in <code>server.xml</code> config file. I`m a lazy person <img src='http://slashroot.eu/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>In order to configure virtual hosting based on above assumptions I used apache http server as a proxy to tomcat.<br />
First you need to add wildcard records to your domain (<code>example.com</code>) so that records of all its subdomains can be resolved to IP address of your server. Following record should be added to your bind server zone config:</p>
<pre>
*   IN   A   1.2.3.4
</pre>
<p>where <code>1.2.3.4</code> is IP address of your server.</p>
<p>Next you need to configure httpd server. Please make sure that you have ajp proxy module installed on your server, as connections to tomcat are based on AJP protocol. On CentOS/RHEL 5 this module is included in standard httpd package (see <code>/etc/httpd/conf.d/proxy_ajp.conf</code>).<br />
Now you need to create configuration for your virual hosts. I created a new file <code>/etc/httpd/conf.d/tomcat-vhosting.conf</code>:</p>
<pre>
UseCanonicalName Off
RewriteEngine On

# vhost map using perl script
RewriteMap vhost prg:/usr/local/bin/apache-getvhost.pl

# do no rewrite restricted names
RewriteCond %{SERVER_NAME} !^docs\.
RewriteCond %{SERVER_NAME} !^examples\.
RewriteCond %{SERVER_NAME} !^host-manager\.
RewriteCond %{SERVER_NAME} !^ROOT\.

# rewrite it
RewriteRule ^/(.*)$ ajp://localhost:8009/${vhost:%{SERVER_NAME}}/$1 [P]
</pre>
<p>Quite simple and cool, isn`t it? <img src='http://slashroot.eu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I`m sure that you probably expected <code>VirtualHost</code> directives, but all you need is a powerfull rewriting feature of apache. This configuration allows to access myapp application located in tomcat`s webapps directory via <code>http://myapp.example.com</code>.<br />
I used custom rewrite map which is a simple perl script. All it does is extract subdomain from server name based on URL.</p>
<p>Put the following in <code>/usr/local/bin/apache-getvhost.pl</code></p>
<pre>
#!/usr/bin/perl

$| = 1;

while (&lt;STDIN&gt;) {
  if (/(.*?)\.example\.com/)      {
      print $1."\n";
  } else {
      print $_."\n";
  }
}
</pre>
<p>and make it executable</p>
<pre>
chmod +x /usr/local/bin/apache-getvhost.pl
</pre>
<p>Now all you need to do is provide some applications to tomcat.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashroot.eu/2010/01/07/howto-massive-virtual-hosting-on-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Booting Xen paravirtualized vm in rescue mode</title>
		<link>http://slashroot.eu/2009/12/22/booting-xen-paravirtualized-vm-in-rescue-mode/</link>
		<comments>http://slashroot.eu/2009/12/22/booting-xen-paravirtualized-vm-in-rescue-mode/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 13:33:45 +0000</pubDate>
		<dc:creator>root</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://slashroot.eu/?p=136</guid>
		<description><![CDATA[This is my first post in english. I am sorry if there are some mistakes &#8211; it is not my native language Recently I had to rename volume group in one of my virtual machines. It is based on CentOS &#8230; <a href="http://slashroot.eu/2009/12/22/booting-xen-paravirtualized-vm-in-rescue-mode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is my first post in english. I am sorry if there are some mistakes &#8211; it is not my native language <img src='http://slashroot.eu/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Recently I had to rename volume group in one of my virtual machines. It is based on CentOS (both dom0 and domU) and it was paravirtualized. I couldn`t do it on running system because root partition was on logical volume. I had to boot the machine in rescue mode. I had no idea how to boot from CD/DVD iso image &#8211; AFAIK it is impossible on pv guests. I had to boot vm directly from kernel and initrd used in installation (both are xen aware). So I copied  them to ﻿<strong>/tmp/xen</strong> from <strong>/images/xen/</strong> on CD/DVD installation disc.</p>
<p>Then I had to comment out the following line from vm`s config file to bypass pygrub bootloader:<br />
<code><br />
#bootloader = "/usr/bin/pygrub"<br />
</code></p>
<p>Now I needed to tell my vm to use kernel and initrd I had previously copied so I added the following lines:<br />
<code><br />
kernel = "/tmp/xen/vmlinuz"<br />
ramdisk = "/tmp/xen/initrd.img"<br />
extra = "rescue method=http://192.168.0.2/install/centos/"<br />
</code></p>
<p>The last line passes extra arguments to kernel. There is a rescue keyword and a method which tells anaconda installer to get install files from my http server.</p>
<p>After that I was able to boot vm in rescue and rename my LVM virtual group.</p>
]]></content:encoded>
			<wfw:commentRss>http://slashroot.eu/2009/12/22/booting-xen-paravirtualized-vm-in-rescue-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

