<?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>MP&#039;s BLOG</title>
	<atom:link href="http://nsas.de/~michel/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://nsas.de/~michel</link>
	<description>Linux, Unix System Administration</description>
	<lastBuildDate>Mon, 22 Mar 2010 18:07:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Removed /dev/null</title>
		<link>http://nsas.de/~michel/?p=49</link>
		<comments>http://nsas.de/~michel/?p=49#comments</comments>
		<pubDate>Mon, 22 Mar 2010 18:06:24 +0000</pubDate>
		<dc:creator>mp</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://nsas.de/~michel/?p=49</guid>
		<description><![CDATA[Today I removed my /dev/null  
If you need to recreade /dev/null just use the following comand.
mknod /dev/null c 1 3 &#38;&#38; chmod 666 /dev/null
]]></description>
			<content:encoded><![CDATA[<p>Today I removed my /dev/null <img src='http://nsas.de/~michel/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If you need to recreade /dev/null just use the following comand.<br />
<code>mknod /dev/null c 1 3 &amp;&amp; chmod 666 /dev/null</code></p>
]]></content:encoded>
			<wfw:commentRss>http://nsas.de/~michel/?feed=rss2&amp;p=49</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software RAID5 with mdadm</title>
		<link>http://nsas.de/~michel/?p=46</link>
		<comments>http://nsas.de/~michel/?p=46#comments</comments>
		<pubDate>Mon, 15 Feb 2010 11:08:58 +0000</pubDate>
		<dc:creator>mp</dc:creator>
				<category><![CDATA[RAID]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[parted]]></category>

		<guid isPermaLink="false">http://nsas.de/~michel/?p=46</guid>
		<description><![CDATA[Short toturial on how to set up raid5 using mdadm bigger than 2TB
Creating:
mdadm --create /dev/md5 --chunk=64 --level=raid5 --raid-devices=4 /dev/sdg1 /dev/sdh1 /dev/sdd1 /dev/sdc1 --force
Checking the status on how the raid is build
cat /proc/mdstat

md5 : active raid5 sdg1[0] sdc1[3] sdd1[2] sdh1[1]
      5860535808 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]

unused devices: ]]></description>
			<content:encoded><![CDATA[<p>Short toturial on how to set up raid5 using mdadm bigger than 2TB</p>
<p>Creating:<br />
<code>mdadm --create /dev/md5 --chunk=64 --level=raid5 --raid-devices=4 /dev/sdg1 /dev/sdh1 /dev/sdd1 /dev/sdc1 --force</code></p>
<p>Checking the status on how the raid is build<br />
<code>cat /proc/mdstat</code></p>
<pre>
md5 : active raid5 sdg1[0] sdc1[3] sdd1[2] sdh1[1]
      5860535808 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]

unused devices: <none></none></pre>
<p>For more details:<br />
<code><br />
mdadm --detail /dev/md5</code></p>
<pre>
/dev/md5:
        Version : 00.90
  Creation Time : Sun Feb 14 11:46:13 2010
     Raid Level : raid5
     Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
  Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 5
    Persistence : Superblock is persistent

    Update Time : Mon Feb 15 11:58:41 2010
          State : active
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : 80766149:664cd4ae:b069a74e:50fc3f3c (local to host server.nsas.lan)
         Events : 0.19

    Number   Major   Minor   RaidDevice State
       0       8       97        0      active sync   /dev/sdg1
       1       8      113        1      active sync   /dev/sdh1
       2       8       49        2      active sync   /dev/sdd1
       3       8       33        3      active sync   /dev/sdc1
</pre>
<p>After everything is build (took some time) you have to create a partion. Since fdisk cant handel more then 2TB, you have to use parted.<br />
<code>parted /dev/md5</code></p>
<p>Create a GPT label.<br />
<code>mklable gpt</code></p>
<p>Create a Partion. Using the max possible space<br />
<code>mkpart primary 0 -0</code></p>
<p>Exit<br />
<code>exit</code></p>
<p>Now format the new partion as you like.<br />
<code>mkfs.xfs -L RAID /dev/md5p1</code></p>
<p>Set you config straight<br />
<code>mdadm --detail --scan >> /etc/mdadm/mdadm.conf</code></p>
<p>Mount it.<br />
<code>mount LABEL=RAID /mnt</code></p>
]]></content:encoded>
			<wfw:commentRss>http://nsas.de/~michel/?feed=rss2&amp;p=46</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to build from PVR-XBMC from source</title>
		<link>http://nsas.de/~michel/?p=34</link>
		<comments>http://nsas.de/~michel/?p=34#comments</comments>
		<pubDate>Tue, 09 Feb 2010 20:25:23 +0000</pubDate>
		<dc:creator>mp</dc:creator>
				<category><![CDATA[XBMC]]></category>
		<category><![CDATA[VDR]]></category>

		<guid isPermaLink="false">http://nsas.de/~michel/?p=34</guid>
		<description><![CDATA[Here is a small howto, that will lead you through building PVR-XBMC from subversion.
Checking out PVR-XBMC via svn.
svn co "http://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/pvr-testing2"
Then goto where ever you checked the pvr-testing2 out
cd pvr-testing2
./bootstrap &#38;&#38; \\
./configure --prefix=$HOME/testing/$(svn info &#124; grep -i revision &#124; cut -d" " -f2) &#38;&#38; \\
make -j2 &#38;&#38; \\
make install
Here is a little function I wrote to ]]></description>
			<content:encoded><![CDATA[<p>Here is a small howto, that will lead you through building PVR-XBMC from subversion.</p>
<p>Checking out PVR-XBMC via svn.<br />
<code>svn co "http://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/pvr-testing2"</code></p>
<p>Then goto where ever you checked the pvr-testing2 out<br />
<code>cd pvr-testing2<br />
./bootstrap &amp;&amp; \\<br />
./configure --prefix=$HOME/testing/$(svn info | grep -i revision | cut -d" " -f2) &amp;&amp; \\<br />
make -j2 &amp;&amp; \\<br />
make install</code></p>
<p>Here is a little function I wrote to update the PVR when ever I need. (in my case it&#8217;s in ~/.zshrc) </p>
<pre>function update_xbmc () {
CURRENTPATH=$(pwd)
mkdir -p ~/testing
cd ~/src/XBMC
echo -n "Checking for changes in SVN "
svn update
REVISION=$(svn info | grep -i revision | cut -d" " -f2)
if [ -d $HOME/testing/$REVISION ] >/dev/null
    then
           echo noting to update
    else
           echo building $REVISION export CFLAGS="-O0 -g"
           ./configure --prefix=$HOME/testing/$REVISION &amp;&amp; \\
           make -j2 &amp;&amp; \\
           make install
           if [ $? -eq 0 ]
               then
                     echo linking
                     cd $HOME/bin
                     ln -sf ../testing/$REVISION/bin/xbmc xbmc-$REVISION
                     ln -sf xbmc-$REVISION xbmc-latest
                     echo -e "XBMC Revision $REVISION has been build. $HOME/testing/$REVISION t enjoy"
           fi
fi
cd $CURRENTPATH }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nsas.de/~michel/?feed=rss2&amp;p=34</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Copying files via SSH</title>
		<link>http://nsas.de/~michel/?p=32</link>
		<comments>http://nsas.de/~michel/?p=32#comments</comments>
		<pubDate>Tue, 09 Feb 2010 15:25:05 +0000</pubDate>
		<dc:creator>mp</dc:creator>
				<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://nsas.de/~michel/?p=32</guid>
		<description><![CDATA[Copy with permissions to $USER&#8217;s home directory on $HOST
scp -p -r $USER@$HOST: file dir/
]]></description>
			<content:encoded><![CDATA[<p>Copy with permissions to $USER&#8217;s home directory on $HOST<br />
<code>scp -p -r $USER@$HOST: file dir/</code></p>
]]></content:encoded>
			<wfw:commentRss>http://nsas.de/~michel/?feed=rss2&amp;p=32</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Tunneling</title>
		<link>http://nsas.de/~michel/?p=4</link>
		<comments>http://nsas.de/~michel/?p=4#comments</comments>
		<pubDate>Tue, 09 Feb 2010 13:07:18 +0000</pubDate>
		<dc:creator>MP</dc:creator>
				<category><![CDATA[SSH]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[socks]]></category>
		<category><![CDATA[tsocks]]></category>

		<guid isPermaLink="false">http://nsas.de/~michel/?p=4</guid>
		<description><![CDATA[
Contents
 &#91; hide &#93; 


Open a remote shell from localhost to server.internet.de
ssh -q -N -R 1337:localhost:22 server.internet.de -p 22
connect to the remote shell from server.internet.de
ssh localhost -p 1337
create a socks5 socket on server.internet.de
ssh -qND 8089 user@server.internet.de -p 22
use the socks5 socket on localhost via tsocks
cat ~/.tsocks.conf

server = 127.0.0.1
server_port = 8089

using the tunnel
tsocks telnet LAN_IP from ]]></description>
			<content:encoded><![CDATA[<div class='contents'>
<h3>Contents</h3>
<p> &#91; <a class='show' onclick='toggle_hide_show(this)'>hide</a> &#93; </p>
<ol class='content_list'></ol>
</div>
<p>Open a remote shell from localhost to server.internet.de<br />
<code>ssh -q -N -R 1337:localhost:22 server.internet.de -p 22</code></p>
<p>connect to the remote shell from server.internet.de<br />
<code>ssh localhost -p 1337</code></p>
<p>create a socks5 socket on server.internet.de<br />
<code>ssh -qND 8089 user@server.internet.de -p 22</code></p>
<p>use the socks5 socket on localhost via tsocks</p>
<p>cat ~/.tsocks.conf</p>
<pre>
server = 127.0.0.1
server_port = 8089
</pre>
<p>using the tunnel<br />
<code>tsocks telnet LAN_IP from server.internet.de</code></p>
This page is wiki editable click <a href='http://nsas.de/~michel/wp-login.php?redirect_to=http://nsas.de/~michel/?feed=rss2'> here</a> to edit this page.]]></content:encoded>
			<wfw:commentRss>http://nsas.de/~michel/?feed=rss2&amp;p=4</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
