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

<channel>
	<title>~mperedim/weblog</title>
	<atom:link href="http://mperedim.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mperedim.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Fri, 27 Jan 2012 17:28:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mperedim.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>~mperedim/weblog</title>
		<link>http://mperedim.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mperedim.wordpress.com/osd.xml" title="~mperedim/weblog" />
	<atom:link rel='hub' href='http://mperedim.wordpress.com/?pushpress=hub'/>
		<item>
		<title>UPS Greece, you suck</title>
		<link>http://mperedim.wordpress.com/2011/12/27/ups-greece-you-suck/</link>
		<comments>http://mperedim.wordpress.com/2011/12/27/ups-greece-you-suck/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 18:40:32 +0000</pubDate>
		<dc:creator>mperedim</dc:creator>
				<category><![CDATA[rants]]></category>
		<category><![CDATA[kindle]]></category>
		<category><![CDATA[ups]]></category>

		<guid isPermaLink="false">http://mperedim.wordpress.com/?p=420</guid>
		<description><![CDATA[Dear UPS, I am not really certain if your Greek subsidiary is a partner that just carries your trademark or a full subsidiary &#8230; but it just outright sucks. And you may want to look into it. I could waste a number of keystrokes on the matter, but a picture is worth a thousand words: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=420&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dear UPS,</p>
<p>I am not really certain if your <a href="http://www.ups.com/content/gr/en/contact/index.html">Greek subsidiary</a> is a partner that just carries your trademark or a full subsidiary &#8230; but it just outright sucks. And you may want to look into it.  </p>
<p>I could waste a number of keystrokes on the matter, but a picture is worth a thousand words: </p>
<p><a href="http://mperedim.files.wordpress.com/2011/12/ups_greece.png"><img src="http://mperedim.files.wordpress.com/2011/12/ups_greece.png?w=450&#038;h=475" alt="" title="ups_greece" width="450" height="475" class="aligncenter size-full wp-image-421" /></a></p>
<p>2 working days (20 &amp; 21 December) for a package to travel from the US all the way to Greece. Hopefully 4 &#8230; FOUR! working days (22, 23, 27, 28 December) for the package to travel another ~440km from Athens to Katerini (1 hour away from Thessaloniki, the 2nd largest city of Greece). </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mperedim.wordpress.com/420/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mperedim.wordpress.com/420/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mperedim.wordpress.com/420/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mperedim.wordpress.com/420/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mperedim.wordpress.com/420/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mperedim.wordpress.com/420/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mperedim.wordpress.com/420/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mperedim.wordpress.com/420/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mperedim.wordpress.com/420/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mperedim.wordpress.com/420/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mperedim.wordpress.com/420/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mperedim.wordpress.com/420/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mperedim.wordpress.com/420/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mperedim.wordpress.com/420/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=420&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mperedim.wordpress.com/2011/12/27/ups-greece-you-suck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f979cebe48ea5613c492402f57f89bf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mperedim</media:title>
		</media:content>

		<media:content url="http://mperedim.files.wordpress.com/2011/12/ups_greece.png" medium="image">
			<media:title type="html">ups_greece</media:title>
		</media:content>
	</item>
		<item>
		<title>On corporate responsibility and a shitty thomson TG585v8 DSL modem</title>
		<link>http://mperedim.wordpress.com/2011/12/27/on-corporate-responsibility-and-a-shitty-thomson-tg585v8-dsl-modem/</link>
		<comments>http://mperedim.wordpress.com/2011/12/27/on-corporate-responsibility-and-a-shitty-thomson-tg585v8-dsl-modem/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 10:57:09 +0000</pubDate>
		<dc:creator>mperedim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[OTE]]></category>
		<category><![CDATA[tg585]]></category>

		<guid isPermaLink="false">http://mperedim.wordpress.com/?p=416</guid>
		<description><![CDATA[Last night I ran into the strangest of problems. Having finally setup my HTPC in my living room I tried out XBMC and Constellation to conveniently control it from my iPad. Clicketty-click &#8230; and fail! After struggling for something like 15&#8242; trying in vain to figure out what idiotic mistake I had made I pulled [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=416&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last night I ran into the strangest of problems. Having finally setup my HTPC in my living room I tried out XBMC and <a href="http://fss.cc/constellation/">Constellation</a> to conveniently control it from my iPad. Clicketty-click &#8230; and fail! </p>
<p>After struggling for something like 15&#8242; trying in vain to figure out what idiotic mistake I had made I pulled out my laptop. After another 30&#8242; or so, being unable to contact my HTPC through my laptop too, I found out that not even ARP is working. Afraid of a rootkit I started installing Wireshark on the HTPC. And after 5&#8242; I was finding out in surprise that ARP broadcast requests were not even reaching the HTPC (?!?!). </p>
<p>Some googling later revealed that other people are facing the same problem: ARP <a href="http://superuser.com/questions/125052/cant-ping-other-machines-in-my-network">simply fails</a> with this DSL modem. And there is little info on <a href="http://community.plus.net/forum/index.php/topic,97427.0.html/">whether this is a persistent problem</a>. I can only tell that the problem was temporarily fixed by changing the encryption to WPA2 (vs. WPA+WAP2). </p>
<p>Who is to blame here? <a href="https://twitter.com/#!/mperedim/status/151375087034044416">I will stand to my initial reaction</a>. OTE, the largest ISP in Greece. True, <a href="https://twitter.com/#!/ebalaskas/status/151422246966132736">they don&#8217;t build the firmware</a> but they have selected and shipping and are getting paid for the hardware [*]. And if anyone still thinks that it&#8217;s not OTE to blame &#8230; </p>
<p><a href="http://mperedim.files.wordpress.com/2011/12/tg585v8_welcome_screen.jpg"><img src="http://mperedim.files.wordpress.com/2011/12/tg585v8_welcome_screen.jpg?w=450&#038;h=81" alt="" title="tg585v8_welcome_screen" width="450" height="81" class="aligncenter size-full wp-image-417" /></a></p>
<p>&#8230; I rest my case. </p>
<p>[*] One may argue that you get this specific CPE for free. Which is as free as a &#8220;free mobile phone with a two year contract&#8221;. Not free at all. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mperedim.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mperedim.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mperedim.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mperedim.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mperedim.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mperedim.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mperedim.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mperedim.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mperedim.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mperedim.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mperedim.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mperedim.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mperedim.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mperedim.wordpress.com/416/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=416&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mperedim.wordpress.com/2011/12/27/on-corporate-responsibility-and-a-shitty-thomson-tg585v8-dsl-modem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f979cebe48ea5613c492402f57f89bf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mperedim</media:title>
		</media:content>

		<media:content url="http://mperedim.files.wordpress.com/2011/12/tg585v8_welcome_screen.jpg" medium="image">
			<media:title type="html">tg585v8_welcome_screen</media:title>
		</media:content>
	</item>
		<item>
		<title>Selinux &amp; POLA</title>
		<link>http://mperedim.wordpress.com/2011/07/21/selinux-pola/</link>
		<comments>http://mperedim.wordpress.com/2011/07/21/selinux-pola/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 12:07:15 +0000</pubDate>
		<dc:creator>mperedim</dc:creator>
				<category><![CDATA[rants]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://mperedim.wordpress.com/?p=403</guid>
		<description><![CDATA[Selinux is crap.Sorry redhat fun boys but its true.Not even in redhat&#8217;s documentation doesnt have enough info. via E.Balaskas My own experience with SELinux today? A Virtual Machine with a forgotten root password. OK, that&#8217;s easy, boot in single user mode, type passwd(1), enter the new root password, reboot. I mean the process is documented [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=403&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p>Selinux is crap.Sorry redhat fun boys but its true.Not even in redhat&#8217;s documentation doesnt have enough info. </p></blockquote>
<p><em>via <a href="https://twitter.com/#!/ebalaskas/status/94011945493069824">E.Balaskas</a></em></p>
<p>My own experience with SELinux today? A Virtual Machine with a forgotten root password. OK, that&#8217;s easy, boot in single user mode, type passwd(1), enter the new root password, reboot. I mean the process is documented in a shitload of pages (<a href="http://www.labtestproject.com/using_linux/step_by_step_to_reset_change_root_password_on_fedora_10">example</a>) and has been working like that since &#8230; I don&#8217;t know 1996? Should be a piece of cake, right? </p>
<p>NOOOOOOOOOOOOOOOOO!</p>
<p>You see this is SELinux. There are procedures to follow, &#8220;passwd root&#8221; just won&#8217;t work in single user mode and will exit immediately without a prompt. A well-defined procedure that has been working for ages is now broken. Oh well &#8230; </p>
<p><code><br />
# echo 0 &gt;/selinux/enforce<br />
# passwd root<br />
Changing password for user root.<br />
New password:<br />
</code></p>
<p>Oh-well I am fairly certain that there is one out of more than a billion parallel universes where SELinux just works. Just one though. </p>
<p>References: <a href="http://en.wikipedia.org/wiki/Principle_of_least_astonishment" title="Principle of Least Astonishment">POLA</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mperedim.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mperedim.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mperedim.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mperedim.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mperedim.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mperedim.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mperedim.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mperedim.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mperedim.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mperedim.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mperedim.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mperedim.wordpress.com/403/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mperedim.wordpress.com/403/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mperedim.wordpress.com/403/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=403&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mperedim.wordpress.com/2011/07/21/selinux-pola/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f979cebe48ea5613c492402f57f89bf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mperedim</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle VM server and RHEL-6 paravirtualized domU</title>
		<link>http://mperedim.wordpress.com/2011/07/14/oracle-vm-rhel-6-paravirtualized-domu/</link>
		<comments>http://mperedim.wordpress.com/2011/07/14/oracle-vm-rhel-6-paravirtualized-domu/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 17:03:44 +0000</pubDate>
		<dc:creator>mperedim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://mperedim.wordpress.com/?p=398</guid>
		<description><![CDATA[This cost me something like 10&#8242; of google search and 15&#8242; troubleshooting. Writing it down so that it can cost the next person just 2&#8242; of google search Setting RedHat Enterprise Linux 6 (hereby RHEL6) as a paravirtualized guest is well documented. However the virt-install command generates a 404 error when run on an Oracle [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=398&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This cost me something like 10&#8242; of google search and 15&#8242; troubleshooting. Writing it down so that it can cost the next person just 2&#8242; of google search <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Setting RedHat Enterprise Linux 6 (hereby RHEL6) as a paravirtualized guest is <a href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/sect-Virtualization-Installing_Red_Hat_Enterprise_Linux_5_as_a_para_virtualized_guest.html">well documented</a>. However the virt-install command generates a 404 error when run on an Oracle VM server. I used tcpdump(8) to promptly discover that virt-install attempts to retrieve /images/xen/vmlinuz instead of the proper /isolinux/vmlinuz. Clickety-click: </p>
<pre>

# pwd
/opt/oracle/usr/lib/python2.4/site-packages/virtinst

# diff ParaVirtGuest.py ParaVirtGuest.py.orig
90c90
                 kernel = grabber.urlopen("%s/images/xen/vmlinuz"
92c92
                 initrd = grabber.urlopen("%s/images/xen/initrd.img"
104,105c104,105
&lt;                 kernel = open(&quot;%s/isolinux/vmlinuz&quot; %(nfsmntdir,), &quot;r&quot;)
                 kernel = open("%s/images/xen/vmlinuz" %(nfsmntdir,), "r")
&gt;                 initrd = open("%s/images/xen/initrd.img" %(nfsmntdir,), "r")
</pre>
<p>Then firing up virt-install again did the trick (remember to choose a suitable mirror): </p>
<pre>
# virt-install -n centos6 -r 2048 -f /OVS/publish_pool/centos6.disk.0 \
  --os-type=linux --vnc -p -l \
  http://ftp.ntua.gr/pub/linux/centos/6/os/x86_64/ -b br0 -d
</pre>
<p>Extra notes: [<a href="http://www.karan.org/blog/index.php/2010/04/28/rhel6-xen-domu-on-a-centos-5-dom0">1</a>] [<a href="http://vuksan.com/blog/2010/05/11/installing-redhat-6-enterprise-domu-under-xen/">2</a>]. I only used ext2 for the /boot filesystem but YMMV. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mperedim.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mperedim.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mperedim.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mperedim.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mperedim.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mperedim.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mperedim.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mperedim.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mperedim.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mperedim.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mperedim.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mperedim.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mperedim.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mperedim.wordpress.com/398/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=398&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mperedim.wordpress.com/2011/07/14/oracle-vm-rhel-6-paravirtualized-domu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f979cebe48ea5613c492402f57f89bf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mperedim</media:title>
		</media:content>
	</item>
		<item>
		<title>vpnc &amp; windows 7: sleep a little bit</title>
		<link>http://mperedim.wordpress.com/2011/02/18/vpnc-windows-7-sleep-a-little-bit/</link>
		<comments>http://mperedim.wordpress.com/2011/02/18/vpnc-windows-7-sleep-a-little-bit/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 19:56:41 +0000</pubDate>
		<dc:creator>mperedim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[vpnc]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://mperedim.wordpress.com/?p=387</guid>
		<description><![CDATA[For quite some time I&#8217;ve been using vpnc within Cygwin to connect to the aging Cisco VPN 3000 Series Concentrator at dayjob (thank you Cisco for not supporting 64-bit users as Ilias points out in the comments Cisco has finally added partial support for Windows 7 64-bit). However, I&#8217;ve been running into the erratic problem [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=387&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For quite some time I&#8217;ve been using <a href="http://www.unix-ag.uni-kl.de/~massar/vpnc/">vpnc</a> within <a href="http://www.cygwin.com/">Cygwin</a> to connect to the aging Cisco VPN 3000 Series Concentrator at dayjob (<del datetime="2011-02-21T08:40:42+00:00">thank you Cisco for <a href="https://supportforums.cisco.com/thread/1003133">not supporting 64-bit users</a></del> as Ilias points out in the comments <a href="http://www.cisco.com/en/US/docs/security/vpn_client/cisco_vpn_client/vpn_client5007/release/notes/vpnclient5007.html#wp101224">Cisco has finally added partial support for Windows 7 64-bit</a>). However, I&#8217;ve been running into the erratic problem where my split tunnels were created eratically and didn&#8217;t work. Specifically, once a VPN connection got created <strong>route print</strong> indicated routes similar to the following:</p>
<pre>
#route print
Network Destination        Netmask          Gateway       Interface  Metric
         10.0.0.0        255.0.0.0      10.8.11.245     192.168.1.65     31
</pre>
<p>instead of the proper one: </p>
<pre>
Network Destination        Netmask          Gateway       Interface  Metric
         10.0.0.0        255.0.0.0         On-link       10.8.11.245     31
</pre>
<p>I&#8217;ve conveniently ignored the problem for some time, using a custom script to tear down and re-create the problematic routing entries, till today. Some well placed &#8220;echos&#8221; in <strong>/etc/vpnc/vpnc-script-win.js</strong> indicated that <strong>vpnc</strong> properly constructed the required <strong>route add</strong> commands, yet the routing table entries were still wrong. Clickety-click: </p>
<pre>
$ diff /etc/vpnc/vpnc-script-win.js /etc/vpnc/vpnc-script-win-BEDC.js
$ diff -U 1 /etc/vpnc/vpnc-script-win.js /etc/vpnc/vpnc-script-win-BEDC.js
--- /etc/vpnc/vpnc-script-win.js        2010-09-18 13:13:25.778339100 +0300
+++ /etc/vpnc/vpnc-script-win-BEDC.js   2011-02-18 21:35:53.279264500 +0200
@@ -80,2 +80,4 @@
         if (env("CISCO_SPLIT_INC")) {
+               echo("sleeping a little bit; don't ask why but this is needed");
+               run("sleep 5");
                for (var i = 0 ; i &lt; parseInt(env(&quot;CISCO_SPLIT_INC&quot;)); i++) {
</pre>
<p>Seems that a timing issue of some sort causes these <strong>route add</strong> commands to run prematurely, before the TAP tunnel interface is properly configured, resulting in a problematic configuration. Holding them back for just 5 seconds consistently does the trick for me. </p>
<p><strong>Update</strong>: if generally interested in configuring VPNC with Windows, check out <a href="http://www.alessiomolteni.com/2009/10/28/windows-7-64-bit-cisco-vpn-with-cygwin-vpnc-client/">Alessio Molteni&#8217;s detailed post</a>.<br />
<strong>Update 2</strong>: Corrected status of the official Cisco VPN client. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mperedim.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mperedim.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mperedim.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mperedim.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mperedim.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mperedim.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mperedim.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mperedim.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mperedim.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mperedim.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mperedim.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mperedim.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mperedim.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mperedim.wordpress.com/387/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=387&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mperedim.wordpress.com/2011/02/18/vpnc-windows-7-sleep-a-little-bit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f979cebe48ea5613c492402f57f89bf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mperedim</media:title>
		</media:content>
	</item>
		<item>
		<title>Opennebula: dhcpd contextualization magic</title>
		<link>http://mperedim.wordpress.com/2011/02/17/opennebula-dhcpd-contextualization-magic/</link>
		<comments>http://mperedim.wordpress.com/2011/02/17/opennebula-dhcpd-contextualization-magic/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 11:50:03 +0000</pubDate>
		<dc:creator>mperedim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dhcpd]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[opennebula]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://mperedim.wordpress.com/?p=374</guid>
		<description><![CDATA[One of the most frequent questions on the Opennebula lists relates to network contextualization of Virtual Machines (VMs). Specifically, contrary to Eucalyptus or Nimbus, Opennebula does not directly manage a DHCP server. Instead Opennebula: suggests using a simple rule for extracting the IPv4 address from the MAC address within the VM manages just MAC addresses [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=374&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the most frequent questions on the Opennebula lists relates to network contextualization of Virtual Machines (VMs). Specifically, contrary to Eucalyptus or Nimbus, Opennebula does not directly manage a DHCP server. Instead Opennebula:</p>
<ul>
<li>suggests using a simple rule for extracting the IPv4 address from the MAC address within the VM</li>
<li>manages just MAC addresses</li>
</ul>
<p>This moves the burden of IPv4 configuration to the VM operating system, which has to dynamically calculate the IPv4 address details based on each interface MAC address. While Opennebula <a href="http://opennebula.org/documentation:rel2.0:vmg">provides a relevant sample VM template and script</a> to do this, it comes up a little bit short. Specifically, the script is linux specific, it will probably not work with other Unix O/S like Solaris or FreeBSD, let alone Windows. In addition, extra work is required in order to configure additional but required network parameters, like a default router or a DNS server.<br />
<span id="more-374"></span><br />
This got me thinking that it should be possible to configure an ISC dhcpd server to do the &#8220;MAC to IPv4 address&#8221; work. This would make the VM configuration simpler (just configure DHCP for all network interfaces), the solution cross-platform and leverage any existing knowledge (existing subnets, routers, DNS servers, etc).</p>
<h3>40,000 foot view</h3>
<p>Here is how the solution works from a 40,000 ft. view:</p>
<ol>
<li>A new, unknown Opennebula (ONE) VM performs a DHCP REQ</li>
<li>The VM gets assigned a temporary short-lived (i.e. 10 second) IPv4 address in the subnet it resides</li>
<li>The DHCP server determines this is a ONE VM based on the MAC prefix</li>
<li>The DHCP server determines this is an unknown ONE VM</li>
<li>The DHCP server creates on-the-fly (using omshell) a new static host entry for the unknown VM based on the MAC to IPv4 rule</li>
<li>The lease of the VM gets expired and a renewal is requested</li>
<li>A long term lease based on the reservation created in step 5 is assigned</li>
</ol>
<h3>Subnet configuration</h3>
<p>Assuming that the subnet of interest is <strong>192.168.254.0/24</strong>, its configuration in the DHCP server follows:</p>
<pre>
subnet 192.168.254.0 netmask 255.255.255.0 {
  option routers 192.168.254.1;
  option broadcast-address 192.168.254.255;
  pool {
    range 192.168.254.251 192.168.254.254;
    max-lease-time 10;
  }
}
</pre>
<p>Note the small pool of 4 IP addresses reserved within the subnet. This reflects the &#8220;short-lived leases&#8221; mentioned above. One should make sure that the relevant Opennebula network configuration leaves these out. For example: </p>
<pre>
NAME = "mynet"
TYPE = FIXED

BRIDGE = vbr1

LEASES = [IP=192.168.254.2]
LEASES = [IP=192.168.254.3]
...
LEASES = [IP=192.168.254.249]
LEASES = [IP=192.168.254.250]
</pre>
<p>One will notice that I&#8217;ve also left out the router IP address. </p>
<h3>Enable OMAPI</h3>
<p>One needs to enable OMAPI in order to update the DHCPD configuration during runtime. The following line does the trick: </p>
<pre>
# grep omapi /etc/dhcp/dhcpd.conf
omapi-port 7911;
</pre>
<p>In a production environment you should configure a key so that unauthorized users don&#8217;t wreak havoc in your server. There are a myriad of posts explaining how to do this, just google for them (<a href="http://blog.nominet.org.uk/tech/2005/12/21/using-omapi-object-management-application-programming-interface/">random example</a>)</p>
<h3>Create an OMAPI script frontend</h3>
<p>While OMAPI is useful, it is interactive. Towards this end we need a script that takes a MAC address, an IPv4 address and a hostname and generates a static lease. </p>
<pre>
# cat /var/tmp/omshell.sh
#!/bin/bash -i

. /root/.bashrc

if [ "$4" == "delayed" ]; then
  #fork to background
  bash $0 $1 $2 $3 "run" &amp;
  exit 0
fi
if [ "$4" != "run" ]; then
  echo error
  exit 1
fi

# /bin/cat &lt;&lt;FOO
/usr/bin/omshell &lt;&lt;FOO
port 7911
connect
new host
set name = &quot;$3&quot;
set hardware-address = $1
set hardware-type = 1
set ip-address = $2
set known = 1
create
FOO
</pre>
<p>The above script also includes an extra &#8220;feature&#8221;: it allows specifying whether it will run normally or fork a copy of itself in the background to do the work.</p>
<h3>Tying it all together: dhcp-eval</h3>
<p><a href="http://linux.die.net/man/5/dhcp-eval">dhcp-eval(5)</a> is the duct tape that ties it all together. It allows us to:</p>
<ol>
<li>Define a class that applies only to DHCP clients with the magic MAC prefix</li>
<li>Calculate the appropriate IPv4 address</li>
<li>Create a DHCP reservation for the respective MAC:IPv4 pair (if one doesn&#8217;t exist already)</li>
</ol>
<pre>
# more /etc/dhcp/dhcpd.conf
...
class "one-clients" {
  match if binary-to-ascii (16, 8, "-", substring (hardware, 1, 2)) = "0-3";
  if not (substring(host-decl-name,0,4) = "one-") {
    log (info, "hi one client; creating host entry");
    set onemacaddr = concat(binary-to-ascii (16, 8, "-", substring (hardware, 1, 1)), ":",
                            binary-to-ascii (16, 8, "-", substring (hardware, 2, 1)), ":",
                            binary-to-ascii (16, 8, "-", substring (hardware, 3, 1)), ":",
                            binary-to-ascii (16, 8, "-", substring (hardware, 4, 1)), ":",
                            binary-to-ascii (16, 8, "-", substring (hardware, 5, 1)), ":",
                            binary-to-ascii (16, 8, "-", substring (hardware, 6, 1)));
    set oneipaddr = concat(binary-to-ascii (10, 8, "-", substring (hardware, 3, 1)), ".",
                           binary-to-ascii (10, 8, "-", substring (hardware, 4, 1)), ".",
                           binary-to-ascii (10, 8, "-", substring (hardware, 5, 1)), ".",
                           binary-to-ascii (10, 8, "-", substring (hardware, 6, 1)));
    set onename = concat("one-",
                         binary-to-ascii (10, 8, "-", substring (hardware, 3, 1)),
                         binary-to-ascii (10, 8, "-", substring (hardware, 4, 1)),
                         binary-to-ascii (10, 8, "-", substring (hardware, 5, 1)),
                         binary-to-ascii (10, 8, "-", substring (hardware, 6, 1)));
    execute ("/var/tmp/omshell.sh", onemacaddr, oneipaddr, onename, "delayed");
  }
}
...
</pre>
<h3>Why the short-lived lease?</h3>
<p>Some readers will wonder why go through the short-lived 10-second lease. Why not go through the following steps:</p>
<ol>
<li>DHCP req comes in</li>
<li>Client is recognized as a ONE VM</li>
<li>omshell is used to create static host entry</li>
<li>DHCP response is provided based on above entry</li>
</ol>
<p>Which was what I initially shot for as well. Turns out that the ISC dhcpd doesn&#8217;t really allow that, for instance you can&#8217;t use the execute keyword unless a valid lease is reserved for the client. And once a valid lease has been reserved there is some kind of &#8220;lock&#8221; in place which prevents you from tweaking the lease database, unless the appropriate DHCP response has been sent. </p>
<h3>Does it work?</h3>
<p>Serving my conscription duty means (among other things) that I don&#8217;t have handy access to my OpenNebula setup.Hence I resorted to a simple Virtualbox testbed (one DHCP server, one DHCP client) leveraging a private network and <a href="http://linux.die.net/man/8/dhclient">dhclient(8)</a> to verify the above. The test MAC address used was 00:03:C0:A8:FE:CF, corresponding to the 192.168.254.207 IP address. </p>
<pre>
dhcp-client# ifconfig eth0 | grep HWaddr | awk '{print $NF}'
00:03:C0:A8:FE:CF
dhcp-client# dhclient -v -d eth0
Internet Systems Consortium DHCP Client 4.2.0
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/00:03:c0:a8:fe:cf
Sending on   LPF/eth0/00:03:c0:a8:fe:cf
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPOFFER from 192.168.254.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPNAK from 192.168.254.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPNAK from 192.168.254.1
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPOFFER from 192.168.254.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.254.1
bound to 192.168.254.207 -- renewal in 228 seconds.
</pre>
<p>The respective log entries from the server side follow. One can clearly see that renewal requests for the &#8220;short-lived&#8221; lease are promptly rejected once the permanent entry has been added via omshell. </p>
<p><code><br />
Feb 20 14:01:28 f14-server dhcpd: DHCPDISCOVER from 00:03:c0:a8:fe:cf via eth0<br />
Feb 20 14:01:29 f14-server dhcpd: DHCPOFFER on 192.168.254.251 to 00:03:c0:a8:fe:cf via eth0<br />
Feb 20 14:01:29 f14-server dhcpd: DHCPREQUEST for 192.168.254.251 (192.168.254.1) from 00:03:c0:a8:fe:cf via eth0: lease 192.168.254.251 unavailable.<br />
Feb 20 14:01:29 f14-server dhcpd: DHCPNAK on 192.168.254.251 to 00:03:c0:a8:fe:cf via eth0<br />
Feb 20 14:01:32 f14-server dhcpd: DHCPREQUEST for 192.168.254.251 (192.168.254.1) from 00:03:c0:a8:fe:cf via eth0: lease 192.168.254.251 unavailable.<br />
Feb 20 14:01:32 f14-server dhcpd: DHCPNAK on 192.168.254.251 to 00:03:c0:a8:fe:cf via eth0<br />
Feb 20 14:01:38 f14-server dhcpd: DHCPREQUEST for 192.168.254.251 (192.168.254.1) from 00:03:c0:a8:fe:cf via eth0: lease 192.168.254.251 unavailable.<br />
Feb 20 14:01:38 f14-server dhcpd: DHCPNAK on 192.168.254.251 to 00:03:c0:a8:fe:cf via eth0<br />
Feb 20 14:01:49 f14-server dhcpd: DHCPDISCOVER from 00:03:c0:a8:fe:cf via eth0<br />
Feb 20 14:01:49 f14-server dhcpd: DHCPOFFER on 192.168.254.207 to 00:03:c0:a8:fe:cf via eth0<br />
Feb 20 14:01:49 f14-server dhcpd: DHCPREQUEST for 192.168.254.207 (192.168.254.1) from 00:03:c0:a8:fe:cf via eth0<br />
Feb 20 14:01:49 f14-server dhcpd: DHCPACK on 192.168.254.207 to 00:03:c0:a8:fe:cf via eth0<br />
</code></p>
<h3>Potential issues</h3>
<p>That said, the &#8220;short-lived&#8221; lease could affect the start-up of an actual system (if nothing else it will probably briefly result in the network being down for 3-5 seconds between getting a DHCPNACK for the short-lived lease and getting a DHCPACK for the final IPv4 address). </p>
<p>Other issues could include the short-lived leases being susceptible to a &#8220;DoS&#8221; attack, malicious clients/VMs getting hold of them and preventing new ones joining the cloud. Some ebtables magic (<a href="http://opennebula.org/documentation:rel2.0:nm">example</a>) should do the trick here. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mperedim.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mperedim.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mperedim.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mperedim.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mperedim.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mperedim.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mperedim.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mperedim.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mperedim.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mperedim.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mperedim.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mperedim.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mperedim.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mperedim.wordpress.com/374/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=374&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mperedim.wordpress.com/2011/02/17/opennebula-dhcpd-contextualization-magic/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f979cebe48ea5613c492402f57f89bf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mperedim</media:title>
		</media:content>
	</item>
		<item>
		<title>Estimated cost of conscription</title>
		<link>http://mperedim.wordpress.com/2010/12/12/estimated-cost-of-conscription/</link>
		<comments>http://mperedim.wordpress.com/2010/12/12/estimated-cost-of-conscription/#comments</comments>
		<pubDate>Sun, 12 Dec 2010 14:08:20 +0000</pubDate>
		<dc:creator>mperedim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[army]]></category>
		<category><![CDATA[conscription]]></category>
		<category><![CDATA[draft]]></category>
		<category><![CDATA[greece]]></category>
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://mperedim.wordpress.com/?p=354</guid>
		<description><![CDATA[A frequent pro-conscription argument that I keep hearing in Greece relates to its cost. Maintaining a 100% professional army is probably too expensive, practically a non-consideration given the austerity measures that the government is taking ever since the IMF saved the country. Which is more or less non-true. Conscription costs, and a lot of money [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=354&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A frequent pro-conscription argument that I keep hearing in Greece relates to its cost. Maintaining a 100% professional army is probably too expensive, practically a non-consideration given the austerity measures that the government is taking ever since the IMF saved the country. </p>
<p>Which is more or less non-true. Conscription costs, and a lot of money for that matter. First of all there is a direct cost:<br />
1. <a href="http://www.ellinikos-stratos.com/thiteia/misthos.asp">It costs approximately 300€ per conscript per month</a> (link in Greek) or circa 100M€ per annum assuming 40,000 conscripts per year that serve for 9 months.<br />
2. <a href="http://archive.enet.gr/online/online_text/c=112,dt=21.01.2006,id=22930336,36981024,44883616,50799648">It costs up to the same amount per month to the conscript&#8217;s family</a>, probably amounting to another 50M€. </p>
<p>Then there is a major and much larger opportunity cost. Most people in Greece and most pro-draft supporters around the world have a tendency to ignore this, which is kind of strange. It&#8217;s like claiming that the cost of a car accident, where 4 passengers of a Hyundai i30 get seriously injured for months when hitting a wall, amounts to circa 10,000€, that is the cost of the car plus any minor repairs to the wall. I mean who cares that 4 people got seriously injured? </p>
<p>So how much is the opportunity cost of 1 conscript that has to more or less cease working to serve the army? While there are surprisingly few articles on the matter it makes sense to assume it&#8217;s similar to the cost of someone that got seriously injured in a car accident and had to stop working. Mr. Dimitris Liakopoulos has done a good job of <a href="http://www.nrso.ntua.gr/geyannis/images/stories/ge/Education/d3-Liakopoulos.pdf">quantifying this cost in his Diploma Thesis</a>. By making certain extra admissions, namely that: </p>
<ol>
<li>The conscripts employment ratio is just 50%</li>
<li>Prices quoted are adjusted by +50% to take into account inflation between 1999 and 2010</li>
<li>A conscript has to cease working for 12 months instead of just 9 (cf. <a href="http://is.gd/iBIn4">footnote 4, page 2 of The Dynamic Cost of the Draft</a>)</li>
</ol>
<p>It adds up to an additional sunk opportunity (lost productivity) cost of circa 14.150€ per conscript or circa 565M€ per year. And while this doesn&#8217;t directly impact the balance sheets, it does have a measurable impact on the GDP. </p>
<p>And this is not it. At least a couple of <a href="http://ideas.repec.org/a/bes/jnlbes/v13y1995i2p207-15.html">different</a> <a href="http://client.norc.org/jole/soleweb/820.pdf">sources</a> claim that the wage of a civilian that has been a conscript vs. one that hasn&#8217;t is circa 5% in the long run (this is due to the importance of early professional training). Assuming a ratio of Greek men that have served of 3:1 vs. those that haven&#8217;t, this provides for a 5% wage impact for almost 2 million individual. Given the average wages this is almost 1.000€ per annum or 2 billion!</p>
<p>The above raise the conscription cost (direct + opportunity) to almost 2.5 billion euros, or almost 1% of the Greece GDP. Which is close to the 1.5% predicted by the strict mathematical model presented in &#8220;<a href="http://is.gd/iBIn4">The Dynamic Cost of the Draft</a>&#8221; paper (Page 12, Table 2, 50% subject to draft, 100% supplementary tax rate). </p>
<p>This doesn&#8217;t take into account extra hidden costs, such as employment costs (for military personnel dealing with conscription), retraining cost (not applicable in a professional army), procedural cost (access to what is perceived cheap labor leads to huge spending inefficiencies, at least in the Greek army). That said it should convince any reasonable person that conscription is not free and it may actually be worth spending half a billion dollars per annum to fully professionalize the Greek Army rather than wasting the time of its youth. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mperedim.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mperedim.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mperedim.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mperedim.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mperedim.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mperedim.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mperedim.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mperedim.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mperedim.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mperedim.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mperedim.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mperedim.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mperedim.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mperedim.wordpress.com/354/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=354&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mperedim.wordpress.com/2010/12/12/estimated-cost-of-conscription/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f979cebe48ea5613c492402f57f89bf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mperedim</media:title>
		</media:content>
	</item>
		<item>
		<title>Η παραγωγικότητα του στρατού</title>
		<link>http://mperedim.wordpress.com/2010/12/03/greek-army-productivit/</link>
		<comments>http://mperedim.wordpress.com/2010/12/03/greek-army-productivit/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 17:36:27 +0000</pubDate>
		<dc:creator>mperedim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[conscription]]></category>
		<category><![CDATA[greece]]></category>
		<category><![CDATA[memories]]></category>
		<category><![CDATA[military]]></category>

		<guid isPermaLink="false">http://mperedim.wordpress.com/?p=340</guid>
		<description><![CDATA[Κόρινθος, 2 Νοεμβρίου 2010. Ημέρα προ-κατάταξης Δ&#8217; ΕΣΣΟ 2010. Λίγο αφού ο Πάγκαλος έχει χαρακτηρίσει τις ένοπλες δυνάμεις αντιπαραγωγικές. Η ώρα είναι περίπου 4 το απόγευμα και ένας ανθυπασπιστής (ή μήπως λοχίας; δε θυμάμαι) ζητάει άτομα να ξεφορτώσουν 3 μεγάλα φορτηγά, φορτωμένα με χαρτοκιβώτια γεμάτα ρούχα (άρβυλα, τζόκευ, τζάκετ, χιτώνια, κλπ) δεμένα πάνω σε ξύλινες [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=340&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Κόρινθος, 2 Νοεμβρίου 2010. Ημέρα προ-κατάταξης Δ&#8217; ΕΣΣΟ 2010. Λίγο αφού ο Πάγκαλος έχει χαρακτηρίσει τις ένοπλες δυνάμεις αντιπαραγωγικές. </p>
<p>Η ώρα είναι περίπου 4 το απόγευμα και ένας ανθυπασπιστής (ή μήπως λοχίας; δε θυμάμαι) ζητάει άτομα να ξεφορτώσουν 3 μεγάλα φορτηγά, φορτωμένα με χαρτοκιβώτια γεμάτα ρούχα (άρβυλα, τζόκευ, τζάκετ, χιτώνια, κλπ) δεμένα πάνω σε ξύλινες παλέτες.<br />
<a href="http://mperedim.files.wordpress.com/2010/12/wooden-palette.jpg"><img src="http://mperedim.files.wordpress.com/2010/12/wooden-palette.jpg?w=450&#038;h=358" alt="" title="A wooden palette with cardboards" width="450" height="358" class="aligncenter size-full wp-image-341" /></a></p>
<p>Για τις επόμενες 3-4 ώρες καμιά 10αριά άτομα (σε rotation όχι συνέχεια τα ίδια) λύνουν και ξεφορτώνουν μια-μια τις κούτες, τις κουβαλούν στην αποθήκη και επαναλαμβάνουν, υπό την καθοδήγηση του στελέχους. Κάποια στιγμή κάποιος αναφέρει τις δηλώσεις του Πάγκαλου. Το στέλεχος παίρνει ύφος χιλίων καρδιναλίων και λέει κάτι σαν &#8220;ας έρθει εδώ ο Πάγκαλος να δει πόσο γρήγορα ξεφορτώνουν τρία τεράστια φορτηγά στο πι και φι και ας μου ξανακάνει δηλώσεις για παραγωγικότητα&#8221;. </p>
<p>Με το μικρό μου μυαλουδάκι σκέφτομαι να του απαντήσω: &#8220;μπράβο. αντικατέστησες για μια δουλειά έναν άνθρωπο και ένα κλαρκ με 20-25 άτομα, ρισκάρεις τον τραυματισμό ενός ή περισσότερων από αυτούς και νομίζεις ότι είσαι και παραγωγικός&#8221;. Σκέφτομαι τον στρατιωτικό κανονισμό. Σκέφτομαι ότι εκεί που αρχίζει ο στρατός τελειώνει η λογική. Σκέφτομαι ότι απευθύνομαι στους ίδιους ανθρώπους που θεωρούν παραγωγικό και αναγκαίο το θαλαμοφυλίκι αντί για 4-5 motion detectors, 2-3 κάμερες και ένα κεντρικό σύστημα συναγερμού. </p>
<p>Σκέφτομαι &#8220;243 περίπου και σήμερα&#8221;. Και δε λέω τίποτα. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mperedim.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mperedim.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mperedim.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mperedim.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mperedim.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mperedim.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mperedim.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mperedim.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mperedim.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mperedim.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mperedim.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mperedim.wordpress.com/340/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mperedim.wordpress.com/340/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mperedim.wordpress.com/340/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=340&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mperedim.wordpress.com/2010/12/03/greek-army-productivit/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f979cebe48ea5613c492402f57f89bf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mperedim</media:title>
		</media:content>

		<media:content url="http://mperedim.files.wordpress.com/2010/12/wooden-palette.jpg" medium="image">
			<media:title type="html">A wooden palette with cardboards</media:title>
		</media:content>
	</item>
		<item>
		<title>Times 14</title>
		<link>http://mperedim.wordpress.com/2010/11/01/times-14/</link>
		<comments>http://mperedim.wordpress.com/2010/11/01/times-14/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 16:16:42 +0000</pubDate>
		<dc:creator>mperedim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[marathon]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[running]]></category>

		<guid isPermaLink="false">http://mperedim.wordpress.com/?p=335</guid>
		<description><![CDATA[Last April, after Orthodox Easter, I picked up running again. It seemed like a good way to maintain the weight loss after fasting for 49 days and fight the couch potato syndrome that seemed to had hit me since 2004 or so. A short visit to the most popular running ground in Patras was enough [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=335&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Last April, after Orthodox Easter, I picked up running again. It seemed like a good way to maintain the weight loss after fasting for 49 days and fight the couch potato syndrome that seemed to had hit me since 2004 or so. A short visit to <a href="http://runkeeper.com/user/mperedim/activity/17180462">the most popular running ground in Patras</a> was enough to find out that the almost 8 years since I ran regularly were not too kind with my stamina. I recall running just 3 km at what one can barely call a decent pace for such a short workout (circa 6 minute) then I gasping for breath and walking for the remaining kilometer to my car. </p>
<p>Fast forward a month or so and I was able to do 10km. At a still unimpressive pace (6+ min/km) but 10km nevertheless. In an attempt to keep myself motivated I set out a goal to run at the <a href="http://en.wikipedia.org/wiki/Patras">local</a> half marathon at the first week of October. I ended up doing the distance, but it was during training and <a href="http://runkeeper.com/user/mperedim/activity/14769762">one and a half month earlier than I had hoped for</a>. After that the poking from <a href="http://runaddict.posterous.com">George</a>, the availability of  open seats, the will to step outside my comfort zone and the temptation of finishing <a href="http://en.wikipedia.org/wiki/Athens_Classic_Marathon">the classic route</a> were just irresistible. A full marathon sounded like too big of a bite to chew, 14 times more than what I could run 4 months ago, yet I registered and hoped for the best. </p>
<p>It ended up being a rocky start. I got off to a good pace, passing the half race mark in slightly less than 2 hours. The first couple of cramps hit me very soon after that. This made the uphill climb so painful that I might have quit if I knew what was waiting for me (ignorance is bliss <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ). I managed to reach the final 12km downhill part in a semi-decent shape thankful I had left the uphill behind. Then the cramps got even worse. But quitting never crossed my mind. I ran and when I couldn&#8217;t run I walked, until I could muster enough strength and determination to run again. It was slow and painful, as if having a root canal for two consecutive hours, the only difference that the affected nerves were all over the place in my legs rather than a single tooth (and no you don&#8217;t get any anesthesia). </p>
<p>The end result was totally worth it. Running down the final kilometer in <a href="http://en.wikipedia.org/wiki/Herodou_Attikou_Street">Herodou Attikou</a> under the cheers of the crowd, getting the <a href="http://en.wikipedia.org/wiki/Panathinaiko_Stadium">Kallimarmaro</a> into view and then <a href="http://results.athensclassicmarathon.gr/results2010/bib.asp?personId=810122010">crossing the finishing line</a> is one of those priceless moments that one can hardly put into words. He can only savior it, feel proud about the achievement of having lived it &#8230; and even though the first time is always special train hard to experience it again <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mperedim.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mperedim.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mperedim.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mperedim.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mperedim.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mperedim.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mperedim.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mperedim.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mperedim.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mperedim.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mperedim.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mperedim.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mperedim.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mperedim.wordpress.com/335/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=335&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mperedim.wordpress.com/2010/11/01/times-14/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f979cebe48ea5613c492402f57f89bf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mperedim</media:title>
		</media:content>
	</item>
		<item>
		<title>Solaris: cloning an iSCSI LUN</title>
		<link>http://mperedim.wordpress.com/2010/10/21/solaris-cloning-an-iscsi-lun/</link>
		<comments>http://mperedim.wordpress.com/2010/10/21/solaris-cloning-an-iscsi-lun/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 08:37:03 +0000</pubDate>
		<dc:creator>mperedim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://mperedim.wordpress.com/?p=328</guid>
		<description><![CDATA[While I nailed down on a combination of ramdisk and golden Solaris container images for a diskless boot architectural prototype I had to implement for dayjob, I did toy around initially with iSCSI. I ended up rejecting iSCSI mainly due to the additional requirements placed on the storage subsystem. A single ramdisk may be used [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=328&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While I nailed down on a combination of <a href="http://mperedim.wordpress.com/2010/10/10/solaris-diskless-ramdisk-boot/">ramdisk</a> and golden <a href="http://en.wikipedia.org/wiki/Solaris_Containers">Solaris container</a> images for a diskless boot architectural prototype I had to implement for dayjob, I did toy around initially with iSCSI. </p>
<p>I ended up rejecting iSCSI mainly due to the additional requirements placed on the storage subsystem. A single ramdisk may be used by multiple nodes in the cluster, each client loads the ramdisk and then self-customizes the filesystem for host-specific parameters in the local RAM. Contrast this with iSCSI which requires a separate iSCSI LUN per client. The cost is not just about extra storage (which could be minimal in the presence of cloning and deduplication), there is an increased management cost (maintain 10 LUNs vs. a single ramdisk) as well as an increased <a href="http://en.wikipedia.org/wiki/Capital_expenditure">CAPEX</a> and <a href="http://en.wikipedia.org/wiki/Operating_expense">OPEX</a> due to the presence of an extra SAN. Specifically, you can&#8217;t really expect to have a highly available iSCSI solution with non-dedicated h/w, whereas a similar HA solution with ramdisks is trivial to setup and just needs two DHCP + TFTP servers (coupled with <a href="http://en.wikipedia.org/wiki/Link_aggregation">NIC bonding</a> for extra redundancy). </p>
<p>The above said I thought I&#8217;d write some high level notes with regards to the pain of cloning an iSCSI LUN containing a Solaris installation. I can use them as a reference in the future or (if I&#8217;m lucky) someone will run into this blog post and suggest a more graceful approach. </p>
<ol>
<li><strong>Setup an iSCSI LUN</strong>: it doesn&#8217;t really matter how you&#8217;ll do it. For my setup I used the Solaris iSCSI target (greetz to <a href="http://c0t0d0s0.org">@c0t0d0s0</a> for <a href="http://www.c0t0d0s0.org/archives/4224-Less-known-Solaris-Features-iSCSI.html">yet another excellent tutorial</a>)</li>
<li><strong>Install Solaris on the iSCSI LUN</strong>: Captain Jack provides a <a href="http://blogs.sun.com/cancel/entry/iscsi_boot_x86">thorough step-by-step guide with screenshots</a> with the relevant steps (I will admit wondering whether one can automate the process with Jumpstart and pre-install scripts but I never got there)</li>
<li>Boot the newly installed node for the first time, make any site-specific changes you need and then shut it down. Forget this LUN from now on, it will be your &#8220;golden image&#8221;</li>
<li><strong>Clone the iSCSI LUN to a new one</strong>: This step is really dependent on your SAN. If you are using ZFS the steps are probably something as simple as the following:</li>
<pre>
# zfs snapshot rpool/iscsi/lun0@golden
# zfs clone rpool/iscsi/lun0@golden rpool/iscsi/lun1
</pre>
<li>Add the LUN to an existing or new iSCSI target and get its GUID </li>
<pre>
# iscsitadm create target -u 1 -b /dev/zvol/rdsk/rpool/iscsi/lun1 -t mytarget
# iscsitadm list target -v mytarget
Target: mytarget
    iSCSI Name: iqn.1986-03.com.sun:02:9c23130f-1d8e-6b20-8e95-a6ab8a227924.mytarget
    Connections: 1
        Initiator:
            iSCSI Name: iqn.1986-03.com.sun:01:ba78c2f3ffff.49b911ad
            Alias: unknown
    ACL list:
    TPGT list:
    LUN information:
...
        LUN: 1
            GUID: 600144f04caf16fb00000c29324dee00
            VID: SUN
            PID: SOLARIS
            Type: disk
            Size: 4.0G
            Backing store: /dev/zvol/rdsk/rpool/iscsi/lun1
            Status: online
...
</pre>
<li>Configure a new system to boot from your newly created iSCSI LUN. Here is how a DHCP reservation for gPXE looks like:</li>
<pre>
host  {
  hardware ethernet ;
  fixed-address                   ;
  option routers                  ;
  option subnet-mask              ;
  option domain-name-servers      ;
  filename                      "";
  # iscsi root-path format        iscsi::[protocol]:[port]:[LUN]:
  option root-path
    "iscsi::::1:iqn.1986-03.com.sun:02:9c23130f-1d8e-6b20-8e95-a6ab8a227924.mytarget;
}
</pre>
</ol>
<p>Neat. You installed Solaris in a LUN and you cloned the LUN. One would expect that you can repeat this process as many times as necessary and by changing just the LUN id in gPXE boot as many Solaris systems as you want, right? <a href="http://www.youtube.com/watch?v=tRVUOGUmxJI">WRONG!</a></p>
<p>Turns out that the Solaris installer &#8220;burns&#8221; the iSCSI boot device identifier in the root filesystem during installation. In fact it does a pretty good job of &#8220;burning&#8221; it all over the place to make your life miserable when it comes to cloning an iSCSI LUN and re-using it for another system. So you got to jump through some extra hoops, otherwise you will just get a nice kernel panic. The following steps assume that you are using UFS (don&#8217;t ask!) but they would probably work similarly with ZFS as well. </p>
<ol>
<li>Mount the newly cloned iSCSI LUN from a Solaris system. This could be the iSCSI target itself if you are using Solaris for that task. Do notice the slight difference between the iSCSI target device and the device we are actually mounting. </li>
<pre>
# iscsiadm modify discovery -t enable
# iscsiadm list target -S
Target: iqn.1986-03.com.sun:02:9c23130f-1d8e-6b20-8e95-a6ab8a227924.mytarget
        Alias: asmrootufs
        TPGT: 1
        ISID: 4000002a0000
        Connections: 1
        LUN: 0
             Vendor:  SUN
             Product: SOLARIS
             OS Device Name: /dev/rdsk/c2t600144F04CADE09C00000C29324DEE00d0s2
        LUN: 1
             Vendor:  SUN
             Product: SOLARIS
             OS Device Name: /dev/rdsk/c2t600144F04CAF16FB00000C29324DEE00d0s2
...
# ls -l /dev/rdsk/c2t600144F04CAF16FB00000C29324DEE00d0s2
lrwxrwxrwx  -&gt; ../../devices/scsi_vhci/disk@g600144f04caf16fb00000c29324dee00:c,raw
# mount /devices/scsi_vhci/disk\@g600144f04caf16fb00000c29324dee00\:a /mnt/foo/
</pre>
<li>keep a note of the disk path above: &#8220;/devices/scsi_vhci/disk@g600144f04caf16fb00000c29324dee00:a&#8221;. You&#8217;re going to need it</li>
<li>Edit the files ./boot/solaris/bootenv.rc, etc/path_to_inst and etc/vfstab. In them you will find references to the iSCSI LUN0 device which was used as our golden image (cf. the iscsiadm command above). Change these to the &#8220;/devices&#8221; path corresponding to our iSCSI LUN 1.</li>
<li>Do a recursive grep (find /mnt/foo -type f | xargs grep) for any other occurences of the old iSCSI LUN. I think the above step covers everything but I played it from an old note and it may miss something.</li>
<li>Update the boot archive in the new LUN. </li>
<pre>
# bootadm list-archive -R /mnt/foo
</pre>
<li>Manually create the required symlink under /dev/dsk</li>
<pre>
# cd /mnt/foo/dev/dsk
# ln -s ../../devices/scsi_vhci/disk\@g600144f04caf16fb00000c29324dee00\:a c2t600144F04CAF16FB00000C29324DEE00d0s0
</pre>
<li>Unmount &#8220;/mnt/foo&#8221; and reboot your target node; now everything should work like a charm</li>
<li>&#8230;</li>
<li>Profit! </li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mperedim.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mperedim.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mperedim.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mperedim.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mperedim.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mperedim.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mperedim.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mperedim.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mperedim.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mperedim.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mperedim.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mperedim.wordpress.com/328/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mperedim.wordpress.com/328/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mperedim.wordpress.com/328/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mperedim.wordpress.com&amp;blog=6063423&amp;post=328&amp;subd=mperedim&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mperedim.wordpress.com/2010/10/21/solaris-cloning-an-iscsi-lun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4f979cebe48ea5613c492402f57f89bf?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mperedim</media:title>
		</media:content>
	</item>
	</channel>
</rss>
