<?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>geek scrap &#187; Tips</title>
	<atom:link href="http://geekscrap.com/categories/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://geekscrap.com</link>
	<description>there is at least one way to do it</description>
	<lastBuildDate>Tue, 12 Apr 2011 10:14:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>CD overburning on Mac OS X</title>
		<link>http://geekscrap.com/2010/02/cd-overburning-on-mac-os-x/</link>
		<comments>http://geekscrap.com/2010/02/cd-overburning-on-mac-os-x/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 15:24:29 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[burning]]></category>
		<category><![CDATA[cd]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Toast]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=736</guid>
		<description><![CDATA[It seems that Toast 10 Titanium cd burning application doesn&#8217;t support overburning, so if you need to burn cd images that are larger than conventional 700MB, you can either use cdrtools from the command line with -overburn parameter (available in MacPorts), or use a nice cdrtools frontend called Firestarter FX, which is tested for Tiger [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that Toast 10 Titanium cd burning application doesn&#8217;t support overburning, so if you need to burn cd images that are larger than conventional 700MB, you can either use cdrtools from the command line with <em>-overburn</em> parameter (available in MacPorts), or use a nice cdrtools frontend called <a href="http://www.versiontracker.com/dyn/moreinfo/macosx/19058">Firestarter FX</a>, which is tested for Tiger and Leopard releases.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/cd-overburning-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 25 vulnerability RSS feeds</title>
		<link>http://geekscrap.com/2010/02/top-25-vulnerability-rss-feeds/</link>
		<comments>http://geekscrap.com/2010/02/top-25-vulnerability-rss-feeds/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 08:00:11 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[cert]]></category>
		<category><![CDATA[checkpoint]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[nist]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[opml]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[securityfocus]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=702</guid>
		<description><![CDATA[One way to receive up-to-date reports about vulnerability issues is subscribing to vulnerability RSS feeds: they update on demand, they don&#8217;t rely on your mail subsystem and they don&#8217;t fill up your mailbox. The only drawback is that you could miss alerts if you don&#8217;t sync your feeds for a long time, but if you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>One way to receive up-to-date reports about vulnerability issues is subscribing to vulnerability RSS feeds: they update <em>on demand</em>, they don&#8217;t rely on your mail subsystem and they don&#8217;t fill up your mailbox. The only drawback is that you could miss alerts if you don&#8217;t sync your feeds for a long time, but if you&#8217;re a IT security manager, you don&#8217;t have a life, so how could it happen anyways? <img src='http://geekscrap.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Here&#8217;s the top feeds you should be subscribed to (<a rel="nofollow" href="http://cve.mitre.org/">CVE</a> tags are reported in brackets):</p>
<ol>
<li><a rel="nofollow" href="http://nvd.nist.gov/download/nvd-rss.xml">NIST Vulnerability Database</a>.</li>
<li><a href="http://www.us-cert.gov/channels/techalerts.rdf">US Cert Technical Security Alerts</a> [CERT].</li>
<li><a href="http://www.securityfocus.com/rss/vulnerabilities.xml">SecurityFocus Vulnerabilities</a> [SF-INCIDENTS].</li>
<li><a rel="nofollow" href="http://osvdb.org/feed/vulnerabilities/latest.rss">Open Source Vulnerability Database</a> [OSVDB].</li>
<li><a rel="nofollow" href="http://www.iss.net/rss.php">IBM Internet Security Systems Threats</a> [ISS].</li>
<li><a rel="nofollow" href="http://www.vupen.com/security-advisories.xml">Vupen Security Advisories</a> [VUPEN].</li>
<li><a rel="nofollow" href="http://secunia.tumblr.com/rss">Secunia Latest Security Advisories</a> (Unofficial) [SECUNIA].</li>
<li><a rel="nofollow" href="http://research.eeye.com/rss/published.rss">eEye Security Advisories</a> [EEYE].</li>
</ol>
<p>The above list is also available as <a href="http://geekscrap.com/wp-content/uploads/2010/02/Security-Advisories.opml">OPML file</a> you can import into your feed reader.</p>
<p><span id="more-702"></span>Furthermore, you should subscribe to Operating Systems product-centric vulnerability feeds to ensure you receive timely information regarding updated packages and suggested workarounds for your infrastructure. Here&#8217;s a comprehensive list, sorted alphabetically:</p>
<ol>
<li><a rel="nofollow" href="http://rss.lists.apple.com/security-announce.rss">Apple Security Announce</a> (Mac OS X, iPhone, etc) [APPLE].</li>
<li>Checkpoint&#8217;s <a href="http://www.checkpoint.com/defense/advisories/public/smartdefense_atomz.xml">SmartDefense Service</a> [CHECKPOINT].</li>
<li><a rel="nofollow" href="http://newsroom.cisco.com/data/syndication/rss2/SecurityAdvisories_20.xml">Cisco&#8217;s Product &amp; Service Security Advisories</a> [CISCO].</li>
<li><a rel="nofollow" href="http://www.debian.org/security/dsa-long">Debian Security Advisories</a> [DEBIAN].</li>
<li><a rel="nofollow" href="https://admin.fedoraproject.org/updates/rss/rss2.0?type=security">Fedora Security Updates</a> [FEDORA].</li>
<li><a rel="nofollow" href="http://www.freebsd.org/security/rss.xml">FreeBSD Security Advisories</a> [FREEBSD].</li>
<li><a rel="nofollow" href="http://www.gentoo.org/rdf/en/glsa-index.rdf">Gentoo Linux Security Advisories</a> (GLSA) [GENTOO].</li>
<li><a rel="nofollow" href="http://www.mandriva.com/rss/feed/security">Mandriva Security Advisories</a> [MANDRIVA].</li>
<li>Microsoft&#8217;s <a rel="nofollow" href="http://www.microsoft.com/technet/security/bulletin/RssFeed.aspx?snscomprehensive">Security Notification Service Comprehensive Edition</a> [MS].</li>
<li><a rel="nofollow" href="http://www.NetBSD.org/support/security/rss-advisories.xml">NetBSD Security Advisories</a> [NETBSD].</li>
<li><a rel="nofollow" href="http://www.openpkg.com/security/advisories/?format=rss">OpenPKG Security Advisories</a> [OPENPKG].</li>
<li><a rel="nofollow" href="http://www.undeadly.org/cgi?action=errata">OpenBSD Errata</a> [OPENBSD].</li>
<li><a rel="nofollow" href="https://rhn.redhat.com/rpc/recent-errata.pxt">Red Hat Security Advisories</a> [REDHAT].</li>
<li><a href="http://dev.slackware.it/rss/slackware-security.xml">Slackware Linux Security Advisories</a> [SLACKWARE].</li>
<li><a rel="nofollow" href="http://search.sun.com/feed/atom/results.jsp?col=main-support-sunalerts&amp;oneof=security&amp;nh=30&amp;rf=1&amp;type=advanced&amp;optstat=true&amp;qt=security&amp;reslang=en&amp;st=1">Solaris SunSolve Alerts</a> [SUNALERT].</li>
<li><a rel="nofollow" href="http://www.novell.com/linux/security/suse_security.xml">SUSE Linux Enterprise Security Advisories</a> (also contains OpenSUSE advisories) [SUSE].</li>
<li><a rel="nofollow" href="http://www.ubuntu.com/usn/rss.xml">Ubuntu Security Notices</a> [UBUNTU].</li>
</ol>
<p>OS security advisory feeds are available as <a href="http://geekscrap.com/wp-content/uploads/2010/02/Security-Advisories1.opml">OPML file</a> as well.</p>
<p>Have I missed anything? Please report if you find some advisory feed I accidentally missed. Also, if you&#8217;re into an Operating System security team and you don&#8217;t offer a security announcement feed, please consider making it available.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/top-25-vulnerability-rss-feeds/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Integrate WordPress and Django</title>
		<link>http://geekscrap.com/2010/02/integrate-wordpress-and-django/</link>
		<comments>http://geekscrap.com/2010/02/integrate-wordpress-and-django/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 08:00:21 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wsgi]]></category>
		<category><![CDATA[xml-rpc]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=675</guid>
		<description><![CDATA[Last year WordPress got an award as best Open Source CMS software and the reason is clear: it&#8217;s easy to setup, low on resources, very customizable and full of useful extensions. So unless you have very specific deployment requirements and if your blog is not part of your core technology, you may get the best [...]]]></description>
			<content:encoded><![CDATA[<p>Last year WordPress got an <a href="http://www.packtpub.com/award">award</a> as best Open Source CMS software and the reason is clear: it&#8217;s easy to setup, low on resources, very customizable and full of useful extensions. So unless you have very specific deployment requirements and if your blog is not part of your core technology, you may get the best of both worlds by using WordPress for blogging and use a web framework for everything else. Not reinventing the wheel is very important in post-agile world, after all.</p>
<p>Being a Django monkey, I&#8217;d like to share some tips on how to make WordPress and Django live together:<br />
<span id="more-675"></span></p>
<h2>URL mapping</h2>
<p>To make WordPress and Django co-exist, they should map to different parts of the url space: you can simply configure them to respond on different virtual hosts, or just map WordPress to a specific path. For instance, if your webserver is Apache and you&#8217;re serving Django through mod_wsgi, you can use a config snippet like this:</p>
<pre>&lt;VirtualHost *:80&gt;
ServerName somehost.com
ServerAdmin hostmaster@somehost.com
ErrorLog /path/to/somehost.com/log/error.log
CustomLog /path/to/somehost.com/log/access.log combined
DirectoryIndex index.html
DocumentRoot /var/empty
WSGIScriptAlias / /path/to/somehost.com/parts/wsgi/wsgi
WSGIDaemonProcess somehost.com user=www group=www threads=25
WSGIProcessGroup somehost.com
Alias /blog/ /path/to/somehost.com/wordpress/
Alias /media/ /path/to/somehost.com/project/media/

&lt;Directory /path/to/somehost.com/wordpress/&gt;
Order allow,deny
Allow from all
&lt;/Directory&gt;

&lt;Directory /path/to/somehost.com/media/&gt;
Order allow,deny
Allow from all
&lt;/Directory&gt;
&lt;/VirtualHost&gt;</pre>
<h2>Accessing data</h2>
<p>To share data between your WordPress blog and your Django instance, you have <span style="text-decoration: line-through;">two</span> three main options:</p>
<ol>
<li>Save your WordPress tables and your Django models in the same database and configure your Django models accordingly.<br />
<strong>Pros</strong>: this approach is very straightforward and you don&#8217;t need to learn WordPress API. You can use Django admin interface to edit your WordPress database.<br />
<strong>Cons</strong>: sharing a database between two applications can have an impact on maintenance issues. For example, to rehash your Django application, you can&#8217;t just drop database, re-create it and populate with <em>syncdb</em>. WordPress database schema can change in new releases and make your ORM mapping obsolete.</li>
<li>Use Python&#8217;s xmlrpclib in Django to access WordPress XML-RPC interface.<br />
<strong>Pros</strong>: API changes won&#8217;t possibly break compatibility with previous releases. XML-RPC adds more logic, which means more consistency checks and more behind-the-curtain processing.<br />
<strong>Cons</strong>: XML-RPC calls are not as performant as direct access to MySQL.</li>
<li><strong>UPDATE</strong>: <a rel="nofollow" href="http://dougma.com/">Doug</a> pointed me to another method: adding a <a rel="nofollow" href="http://code.djangoproject.com/ticket/2440">PHP template loader</a> to Django. An useful <a rel="nofollow" href="http://showmedo.com/videotutorials/video?name=pythonNapleonePyConTech2&amp;fromSeriesID=54">video tutorial</a> is also available.</li>
</ol>
<p>To setup method 1, you can use <a rel="nofollow" href="http://code.google.com/p/django-wordpress-admin/source/browse/trunk/wordpress/models.py">models.py</a> from <a rel="nofollow" href="http://code.google.com/p/django-wordpress-admin/">django-wordpress-admin</a> project, which was built around <a rel="nofollow" href="http://docs.djangoproject.com/en/dev/ref/django-admin/#inspectdb">inspectdb</a> output with some custom manager enhancements. On GitHub there&#8217;s another project named <a href="http://github.com/sunlightlabs/django-wordpress">django-wordpress</a>, with the same approach and a step-by-step tutorial is published at <a href="http://uswaretech.com/blog/2010/01/wordpress-and-django-best-buddies/">uswaretech.com</a>.</p>
<p>If you found Django-Wordpress integration tips useful, please drop a note in the comment box below to say how you used it, or just stay in touch with <a rel="nofollow" href="http://twitter.com/geekscrap">Twitter</a> or <a href="http://geekscrap.com/feed/">RSS Feed</a> for more Django stories.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/integrate-wordpress-and-django/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Using screen as your login shell</title>
		<link>http://geekscrap.com/2010/02/using-screen-as-your-login-shell/</link>
		<comments>http://geekscrap.com/2010/02/using-screen-as-your-login-shell/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 10:42:29 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=609</guid>
		<description><![CDATA[GNU screen is a nice utility that allows running multiple interactive shells from the same terminal session and allows you to detach from your terminal while keeping those shells alive. Later on, you can re-attach to your background screen to get back to your shells. It has a lot more features like automatic session logging and [...]]]></description>
			<content:encoded><![CDATA[<p>GNU <a rel="nofollow" href="http://www.gnu.org/software/screen/">screen</a> is a nice utility that allows running multiple interactive shells from the same terminal session and allows you to detach from your terminal while keeping those shells alive. Later on, you can re-attach to your background screen to get back to your shells. It has a lot more features like automatic session logging and terminal window splitting. You can discover them all in the <a href="http://www.gnu.org/software/screen/manual/screen.html">manual</a>.</p>
<p>How many times did you start a long-running task like gcc compilation on a remote server and then suddenly needed to disconnect from your shell? Maybe you just needed to move to some other place with your laptop, but if you disconnected from your LAN, your ssh connection would go down. How many times you thought &#8220;Damn, if I had launched screen before this&#8230;&#8221;?</p>
<p><span id="more-609"></span>The trick to save your compile time and not break your schedule is simple: just have your shell .profile script run screen at startup on your remote server. For bash, the syntax is simple, just add the following line at the end of your ˜/.profile script:</p>
<pre lang="bash">if [ ${SHLVL} -eq 1 ]; then
    ((SHLVL+=1)); export SHLVL
    exec screen -R -e "^Ee" ${SHELL} -l
fi</pre>
<p>Quick implementation notes:</p>
<ol>
<li>Parameter -R reattaches to an existing detached session, if it exists, otherwise creates a new one.</li>
<li>Parameter -e sets a non-standard escape character. This is useful since you don&#8217;t want login screen to interfere with other screens you may spawn during your activity. I chose Ctrl-E as it&#8217;s not used by other well-known keyboard shortcuts and works on most OSes.</li>
</ol>
<p>To detach from your server type <em>Ctrl-E d</em> or just close your terminal window. Running processes will remain active in background, without detaching from your shell. When you connect to your remote shell again, you&#8217;ll get back to your session.</p>
<p>Do you like Unix tips like this? Follow me on <a rel="nofollow" href="http://twitter.com/geekscrap">Twitter</a> or subscribe to my <a href="http://geekscrap.com/feed/">RSS feed</a> for more.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/using-screen-as-your-login-shell/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>8 web design add-ons for Django</title>
		<link>http://geekscrap.com/2010/02/8-web-design-add-ons-for-django/</link>
		<comments>http://geekscrap.com/2010/02/8-web-design-add-ons-for-django/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 08:30:54 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[templatetag]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=446</guid>
		<description><![CDATA[In the last year, I&#8217;ve defined a quite stable fundation for my django projects. In this post I&#8217;m enumerating template design components that saved my day by reducing development time while keeping code readable, concise and standard-compliant. 1. Blueprint CSS framework While not a django-specific add-on, Blueprint CSS framework is a perfect companion for django [...]]]></description>
			<content:encoded><![CDATA[<p>In the last year, I&#8217;ve defined a quite stable fundation for my django projects. In this post I&#8217;m enumerating template design components that saved my day by reducing development time while keeping code readable, concise and standard-compliant.</p>
<h3>1. Blueprint CSS framework</h3>
<p>While not a django-specific add-on, <a rel="nofollow" href="http://www.blueprintcss.org/">Blueprint CSS framework</a> is a perfect companion for django template designers: it features<em> cross-browser style reset</em>, <em>a 24-column grid layout</em>, <em>a nice looking typography</em> and a <em>print-friendly style</em>.</p>
<h3>2. django-uni-form</h3>
<p><a rel="nofollow" href="http://github.com/pydanny/django-uni-form/tree/master">django-uni-form</a> implements <a href="http://www.sprawsm.com/uni-form/">UniForm CSS framework</a> in Django: you can render your forms as stylish xhtml-compliant divs using a simple template tag filter and add form layout information to your Form classes.</p>
<p><span id="more-446"></span></p>
<h3>3. django-compress</h3>
<p>Optimization of CSS and Javascript distribution can greatly improve web client rendering times: <a rel="nofollow" href="http://code.google.com/p/django-compress/">django-compress</a> outputs <em>concatenated and minified</em> files and handles <em>smart client-side caching</em>.</p>
<h3>4. django-userskins</h3>
<p>Using <a rel="nofollow" href="http://github.com/lethain/django-userskins">django-userskins</a> you can enable user-selected themes in your application.</p>
<h3>5. django-tabs</h3>
<p>For your navigation bar, you can use <a rel="nofollow" href="http://code.google.com/p/django-tabs/">django-tabs</a> to highlight active tab (possibly with multiple navigation layers), by combining Django template extension mechanism and a special template tag.</p>
<h3>6. django-reversetag</h3>
<p>Default url tag is quite primitive, but using <em>reverse</em> tag introduce by <a rel="nofollow" href="http://github.com/ulope/django-reversetag">django-reversetag</a>, you can resolve urls from variables and string literals, which is very useful if your view or named view is computed at run-time.</p>
<h3>7. macros template tags</h3>
<p>Django <a rel="nofollow" href="http://www.djangosnippets.org/snippets/363/">macros</a> template tags help you apply DRY criterias in your templates, while maintaining separation between presentation and logic. Download macros.py and save it into your app&#8217;s templatetags folder.</p>
<h3>8. smart_if template tags</h3>
<p><a rel="nofollow" href="http://www.djangosnippets.org/snippets/1350/">smart_if</a> template tag add-on replaces default if/else/endif tags with a custom version that allows basic yet useful value comparisons.  Download smart_if.py and save it into your app&#8217;s templatetags folder.</p>
<p><strong>Tip</strong>: original smart_if doesn&#8217;t support <em>elif</em> syntax. You can find amended version <a rel="nofollow" href="http://www.djangosnippets.org/snippets/1572/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/8-web-design-add-ons-for-django/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Linux RAID disk wipeout</title>
		<link>http://geekscrap.com/2010/02/linux-raid-disk-wipeout/</link>
		<comments>http://geekscrap.com/2010/02/linux-raid-disk-wipeout/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 08:30:35 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[md]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[raid]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=418</guid>
		<description><![CDATA[A common problem with Linux software RAID (aka md) happens when you try to use a disk that was previously part of some other disk array. Symptoms include: wrong volume size, unable to add device to raid, volume UUID mismatch. To fix the problem you need to use mdadm utility on the disk to cleanup: # [...]]]></description>
			<content:encoded><![CDATA[<p>A common problem with Linux software RAID (aka <em>md</em>) happens when you try to use a disk that was previously part of some other disk array. Symptoms include: wrong volume size, unable to add device to raid, volume UUID mismatch. To fix the problem you need to use mdadm utility on the disk to cleanup:</p>
<pre># mdadm --zero-superblock devicepath</pre>
<p>If you need to apply this fix on a system that doesn&#8217;t boot up (for instance when your root volume is on RAID), remember that mdadm and other disk administration utilities are available in <a rel="nofollow" href="http://distfiles.gentoo.org/releases/x86/autobuilds/current-iso/">Gentoo minimal installation disk</a>.</p>
<p><span id="more-418"></span><strong>UPDATE</strong>: Rav asked for the gory details so here it is: when you initially create a Linux RAID array, mkraid writes a signature to the disk called <em>superblock</em>, which contains a unique UUID code for the array and a description of the array (size, raid level, etc). When Linux kernel boots up, this superblock is read by the md kernel module and a minor device number is assigned to the array. Even if you erase your partition table or mbr, this superblock won&#8217;t be erased.<br />
The problem arises when you try to add a disk with an existing superblock to a computer that already has another array in place (for instance when replacing a faulty RAID1 or RAID5 disk): if md driver recognises a superblock, it won&#8217;t allow your added drive to join the array and will report a generic &#8220;Invalid argument&#8221; error. Furthermore, it can happen that, if a minor number is forced onto an array, when booting a system with two parts of arrays trying to grab the same minor, none of them can get through and therefore md devices are not available.<br />
So, instead of zeroing the whole disk with dd if=/dev/zero of=/dev/path, which can take a certain amount of time and is quite useless (if you&#8217;re rebuilding RAID1 or RAID5, your disk contents will be overwritten by raid reconstruction anyway), you can use the command explained at the beginning to erase just the bad superblock and fix the problem.</p>
<p>Just a final notice: another problem with replacing disks in RAID1 and RAID5 happens when people try to use a volume which is slightly smaller than the others in the array (even if advertised capacity is the same of the old drives, there can be slight differences in actual number of blocks). In this case, the error reported from md upon loading is the same as above: &#8220;Invalid argument&#8221;. So if your disk is unused, this is probably the first thing to check, otherwise try the following command on the disk device to check for existing superblocks:</p>
<pre># mdadm -E devicepath</pre>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/linux-raid-disk-wipeout/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
