<?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>Juho Mäkinen&#039;s blog</title>
	<atom:link href="http://www.juhonkoti.net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.juhonkoti.net</link>
	<description>Ajatuksia, kokemuksia, tekniikkaa ja ystäviä</description>
	<lastBuildDate>Thu, 02 Feb 2012 07:27:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Fix accidentally misclick putty paste with irssi</title>
		<link>http://www.juhonkoti.net/2012/02/02/fix-accidentally-misclick-putty-paste-with-irssi</link>
		<comments>http://www.juhonkoti.net/2012/02/02/fix-accidentally-misclick-putty-paste-with-irssi#comments</comments>
		<pubDate>Thu, 02 Feb 2012 07:27:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://www.juhonkoti.net/?p=317</guid>
		<description><![CDATA[Tired of pasting a bunch of lines into your irssi by a right mouse button misclick? Well, no more! Set these two irssi settings and irssi will ask you every time if you try to paste an entire line, or more. /set paste_detect_time 5msecs /set paste_verify_line_count 1 /save And that&#8217;s it!]]></description>
			<content:encoded><![CDATA[<p>Tired of pasting a bunch of lines into your irssi by a right mouse button misclick? Well, no more! Set these two irssi settings and irssi will ask you every time if you try to paste an entire line, or more.</p>
<pre>/set paste_detect_time 5msecs
/set paste_verify_line_count 1
/save</pre>
<p>And that&#8217;s it!</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.juhonkoti.net%2F2012%2F02%2F02%2Ffix-accidentally-misclick-putty-paste-with-irssi&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.juhonkoti.net/2012/02/02/fix-accidentally-misclick-putty-paste-with-irssi/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding new storage tank with diskmap.py.</title>
		<link>http://www.juhonkoti.net/2012/01/20/adding-new-storage-tank-with-diskmap</link>
		<comments>http://www.juhonkoti.net/2012/01/20/adding-new-storage-tank-with-diskmap#comments</comments>
		<pubDate>Fri, 20 Jan 2012 14:36:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.juhonkoti.net/?p=310</guid>
		<description><![CDATA[We recently added a bunch of Western Digital 3.0TB Green drives to the enclosure, so that we can run a bunch of tests with this brand. Here's a quick recap what I had to do to make these new disks online.]]></description>
			<content:encoded><![CDATA[<p>We recently added a bunch of Western Digital 3.0TB Green drives to the enclosure, so that we can run a bunch of tests with this brand. Here&#8217;s a quick recap what I had to do to make these new disks online.</p>
<p>First run the diskmap.py. the <strong>bold</strong> lines are my commands which I wrote. First I <strong>discover</strong> for new drives (it might that the diskmap shows an old cache without the new drivers) and then I ask it to lisk all <strong>disks</strong>.</p>
<pre>root@openindiana:/export/home/garo# diskmap.py
Diskmap - openindiana&gt; <strong>discover</strong>
Diskmap - openindiana&gt; <strong>disks</strong>
0:02:00 c2t5000C5003EF23025d0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:01 c2t5000C5003EEE6655d0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:02 c2t5000C5003EE17259d0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:03 c2t5000C5003EE16F53d0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:04 c2t5000C5003EE5D5DCd0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:05 c2t5000C5003EE6F70Bd0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:06 c2t5000C5003EEF8E58d0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:07 c2t5000C5003EF0EBB8d0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:08 c2t5000C5003EF0F507d0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:09 c2t5000C5003EECE68Ad0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:10 <span style="color: #00ff00;">c2t5000C5003EF2D1D0d0</span> ST33000651AS 3.0T Ready (RDY) tank: spares
0:02:12 <span style="color: #00ff00;">c2t5000C5003EEEBC8Cd0</span> ST33000651AS 3.0T Ready (RDY) tank: spares
0:02:13 <span style="color: #00ff00;">c2t5000C5003EE49672d0</span> ST33000651AS 3.0T Ready (RDY) tank: spares
0:02:14 c2t5000C5003EEE7F2Ad0 ST33000651AS 3.0T Ready (RDY) tank: raidz3-0
0:02:15 c2t5000C5003EED65BBd0 ST33000651AS 3.0T Ready (RDY)
0:03:10 <span style="color: #ff9900;">c2t50014EE2B1158E58d0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
0:03:11 <span style="color: #ff9900;">c2t50014EE2B11052C3d0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
0:03:12 <span style="color: #ff9900;">c2t50014EE25B963A7Ed0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
0:03:13 <span style="color: #ff9900;">c2t50014EE2B1101488d0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
0:03:14 <span style="color: #ff9900;">c2t50014EE2B0EBFF8Ad0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
0:03:15 <span style="color: #ff9900;">c2t50014EE25BBB4F91d0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
0:03:16 <span style="color: #ff9900;">c2t50014EE2066AB19Fd0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
0:03:17 <span style="color: #ff9900;">c2t50014EE25BBFCAB0d0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
0:03:18 <span style="color: #ff9900;">c2t50014EE2066686C6d0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
0:03:19 <span style="color: #ff9900;">c2t50014EE2B1158F6Fd0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
0:03:20 <span style="color: #ff9900;">c2t50014EE2B0E99EA1d0</span> WDC WD30EZRX-00M 3.0T Ready (RDY)
1:01:00 c2t50015179596901EBd0 INTEL SSDSA2CT04 40.0G Ready (RDY) rpool: mirror-0
1:01:01 c2t50015179596A488Cd0 INTEL SSDSA2CT04 40.0G Ready (RDY) rpool: mirror-0
Drives : 28 Total Capacity : 78.1T
Diskmap - openindiana&gt;</pre>
<p style="text-align: justify;">I colored the new disk ids with <span style="color: #ff9900;">yellow <span style="color: #000000;">for your reading pleasure. Next I copied all those 11 ids and I formed the following command, which creates a new tank. I also reused the three old spares, those disk ids are marked with <span style="color: #00ff00;">green</span>. </span></span></p>
<pre>zpool create raidz3 <span style="color: #ff9900;">c2t50014EE2B1158E58d0</span> ... <span style="color: #ff9900;">c2t5000C5003EE49672d0</span> spares <span style="color: #00ff00;">c2t5000C5003EF2D1D0d0 c2t5000C5003EEEBC8Cd0 c2t5000C5003EE49672d0</span></pre>
<p>All set! I could now access the new 30TB volume under /tank2.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.juhonkoti.net%2F2012%2F01%2F20%2Fadding-new-storage-tank-with-diskmap&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.juhonkoti.net/2012/01/20/adding-new-storage-tank-with-diskmap/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a 85TB cheap storage server with Solaris OpenIndiana</title>
		<link>http://www.juhonkoti.net/2012/01/02/building-a-85tb-cheap-storage-server-with-solaris-openindiana</link>
		<comments>http://www.juhonkoti.net/2012/01/02/building-a-85tb-cheap-storage-server-with-solaris-openindiana#comments</comments>
		<pubDate>Mon, 02 Jan 2012 16:49:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.juhonkoti.net/?p=292</guid>
		<description><![CDATA[I just recently built a storage server based on Solaris OpenIndiana with SuperMicro 45 disk enclosure. The current configuration can host 84 TB of usable disk space, but we plan to extend this at least to 200TB in the following months. This blog entry describes the configuration and steps how to implement such beast by yourself.]]></description>
			<content:encoded><![CDATA[<p>I just recently built a storage server based on Solaris OpenIndiana, a 2U SuperMicro server and a SuperMicro 45 disk JBOD rack enclosure. The current configuration can host 84 TB of usable disk space, but we plan to extend this at least to 200TB in the following months. This blog entry describes the configuration and steps how to implement such beast by yourself.</p>
<h2>Goal:</h2>
<ul>
<li>Build a cheap storage system capable of hosting 200TB of disk space.</li>
<li>System will be used to archive data (around 25 GB per item) which is written once and then accessed infrequently (once every month or so).</li>
<li>System must be tolerant to disk failures, hence I preferred raidz3 which can handle a failure of three disks simultaneously.</li>
<li>The capacity can be extended incrementally by buying more disks and more enclosures.</li>
<li>Each volume must be at least 20TB, but doesn&#8217;t have to be necessarily bigger than that.</li>
<li>Option to add a 10GB Ethernet card in the future.</li>
<li>Broken disks must be able to identify easily with a blinking led.</li>
</ul>
<p>I choose to deploy an OpenIndiana based system which uses SuperMicro enclosures to host cheap 3TB disks. Total cost of the hardware with one enclosure was around 6600 EUR (2011 Dec prices) without disks. Storing 85TB would cost additional 14000 EUR with current very expensive (after the Thailand floods) disk prices. Half a year ago the the same disks would have been about half of that. Disks would be deployed in a 11-disk raidz3 sets, one or two per zpool. This gives us about 21.5TB per 11 disk set. New storage is added as a new zpool instead of attaching it to an old zpool.</p>
<h2>Parts used:</h2>
<ul>
<li>The host is based on a <a href="http://www.supermicro.com/products/motherboard/QPI/5500/X8DTH-6F.cfm">Supermicro X8DTH-6F</a> server motherboard with two Intel Xeon E5620 4-core 2.4 Ghz CPUs and 48 GB of memory. Our workload didn&#8217;t need more memory, but one could easily add more.</li>
<li>Currently one <a href="http://www.supermicro.com/products/chassis/4U/847/SC847E16-RJBOD1.cfm">SC847E16-RJBOD1</a> enclosure. This densely packed 4U chassis can fit a whopping 45 disks.</li>
<li>Each chassis is connected to a <a href="http://www.lsi.com/channel/products/storagecomponents/Pages/LSISAS9205-8e.aspx">LSI Logic SAS 9205-8e </a>HBA controller with two SAS cables. Each enclosure has two backplanes, so both backplanes are connected to the HBA with one cable.</li>
<li>Two 40GB Intel 320-series SSDs for the operating system.</li>
<li>Drives from two different vendor so that we can have some benchmarks and tests before we commit to the 200TB upgrade:
<ul>
<li>3TB Seagate Barracuda XT 7200.12 ST33000651AS disks</li>
<li>Western Digital Caviar Green 3TB disks</li>
</ul>
</li>
</ul>
<p>It&#8217;s worth to note that this system is built for storing large amounts of data which are not frequently accessed. We could easily add SSD disks as L2ARC caches and even a separated ZIL (for example the 8 GB STEC ZeusRAM DRAM, which costs around 2200 EUR) if we would need faster performance for example database usage. We selected disks from two different vendors for additional testing. One zpool will use only disks of a single type. At least the WD Green drives needs a firmware modification so that they don&#8217;t park their heads all the time.</p>
<h2>Installation:</h2>
<p>OpenIndiana installation is easy: Create a <a href="http://wiki.openindiana.org/oi/Installing+OpenIndiana">bootable CD or a bootable USB</a> and boot the machine with just the root devices attached. The installation is very simple and takes around 10 minutes. Just select that you install the system to one of your SSDs with standard disk layout. After your installation is completed and you have booted the system, follow <a href="http://darkstar-solaris.blogspot.com/2008/09/zfs-root-mirror.html" target="_blank">these steps</a> to make the another ssd bootable.</p>
<p>Then setup some disk utils under /usr/sbin. You will need these utils to for example identify the physical location of a broken disk in the enclosure. (read more <a href="http://www.juhonkoti.net/2012/01/02/supermicro-jbod-sc847e16-rjbo-enclosure-with-solaris-openindiana" target="_blank">here</a>):</p>
<ul>
<li>LSIutil from <a href="http://www.juhonkoti.net/media/LSIUTIL-1.63.zip" target="_blank">http://www.juhonkoti.net/media/LSIUTIL-1.63.zip</a></li>
<li>sas2ircu from <a href="http://www.lsi.com/Pages/user/eula.aspx?file=http%3a%2f%2fwww.lsi.com%2fdownloads%2fPublic%2fHost%2520Bus%2520Adapters%2fHost%2520Bus%2520Adapters%2520Common%2520Files%2fSAS_SATA_6G_P11%2fSAS2IRCU_P11.zip&amp;Source=http%3a%2f%2fwww.mail-archive.com%2fopenindiana-discuss%40openindiana.org%2fmsg06165.html" target="_blank">here (long url)</a></li>
<li>diskmay.py from <a href="http://the-key.enix.org/~krystal/diskmap.py" target="_blank">http://the-key.enix.org/~krystal/diskmap.py</a></li>
</ul>
<p>Now it&#8217;s time to connect your enclosure to the system with the SAS cables and boot it. OpenIndiana should recognize the new storage disks automatically. Use the diskmap.py to get a list of the disk identifies for later <em>zpool create</em> usage:</p>
<pre>garo@openindiana:/tank$ diskmap.py
Diskmap - openindiana&gt; disks
0:02:00 c2t5000C5003EF23025d0 ST33000651AS 3.0T Ready (RDY)
0:02:01 c2t5000C5003EEE6655d0 ST33000651AS 3.0T Ready (RDY)
0:02:02 c2t5000C5003EE17259d0 ST33000651AS 3.0T Ready (RDY)
0:02:03 c2t5000C5003EE16F53d0 ST33000651AS 3.0T Ready (RDY)
0:02:04 c2t5000C5003EE5D5DCd0 ST33000651AS 3.0T Ready (RDY)
0:02:05 c2t5000C5003EE6F70Bd0 ST33000651AS 3.0T Ready (RDY)
0:02:06 c2t5000C5003EEF8E58d0 ST33000651AS 3.0T Ready (RDY)
0:02:07 c2t5000C5003EF0EBB8d0 ST33000651AS 3.0T Ready (RDY)
0:02:08 c2t5000C5003EF0F507d0 ST33000651AS 3.0T Ready (RDY)
0:02:09 c2t5000C5003EECE68Ad0 ST33000651AS 3.0T Ready (RDY)
0:02:11 c2t5000C5003EF2D1D0d0 ST33000651AS 3.0T Ready (RDY)
0:02:12 c2t5000C5003EEEBC8Cd0 ST33000651AS 3.0T Ready (RDY)
0:02:13 c2t5000C5003EE49672d0 ST33000651AS 3.0T Ready (RDY)
0:02:14 c2t5000C5003EEE7F2Ad0 ST33000651AS 3.0T Ready (RDY)
0:03:20 c2t5000C5003EED65BBd0 ST33000651AS 3.0T Ready (RDY)
1:01:00 c2t50015179596901EBd0 INTEL SSDSA2CT04 40.0G Ready (RDY) rpool: mirror-0
1:01:01 c2t50015179596A488Cd0 INTEL SSDSA2CT04 40.0G Ready (RDY) rpool: mirror-0
Drives : 17 Total Capacity : 45.1T</pre>
<p>Here we have total of 15 disks. We&#8217;ll use 11 of them to for a raidz3 stripe. It&#8217;s important to have the correct amount of drivers in your raidz configurations to get optimal performance with the 4K disks. I just simply selected the first 11 disks (c2t5000C5003EF23025d0, c2t5000C5003EEE6655d0, &#8230; , c2t5000C5003EF2D1D0d0) and created a new zpool with them and also added three spares for the zpool:</p>
<pre>zpool create tank raidz3 c2t5000C5003EF23025d0, c2t5000C5003EEE6655d0, ... , c2t5000C5003EF2D1D0d0
zpool add tank spare c2t5000C5003EF2D1D0d0 c2t5000C5003EEEBC8Cd0 c2t5000C5003EE49672d0</pre>
<p>This resulted in a nice big tank:</p>
<pre>        NAME                       STATE     READ WRITE CKSUM
        tank                       ONLINE       0     0     0
          raidz3-0                 ONLINE       0     0     0
            c2t5000C5003EF23025d0  ONLINE       0     0     0
            c2t5000C5003EEE6655d0  ONLINE       0     0     0
            c2t5000C5003EE17259d0  ONLINE       0     0     0
            c2t5000C5003EE16F53d0  ONLINE       0     0     0
            c2t5000C5003EE5D5DCd0  ONLINE       0     0     0
            c2t5000C5003EE6F70Bd0  ONLINE       0     0     0
            c2t5000C5003EEF8E58d0  ONLINE       0     0     0
            c2t5000C5003EF0EBB8d0  ONLINE       0     0     0
            c2t5000C5003EF0F507d0  ONLINE       0     0     0
            c2t5000C5003EECE68Ad0  ONLINE       0     0     0
            c2t5000C5003EEE7F2Ad0  ONLINE       0     0     0
        spares
          c2t5000C5003EF2D1D0d0    AVAIL
          c2t5000C5003EEEBC8Cd0    AVAIL
          c2t5000C5003EE49672d0    AVAIL</pre>
<h2>Setup email alerts:</h2>
<p>OpenIndiana will have a default sendmail configuration which can send email to the internet via directly connecting to the destination mail port. Edit your /etc/aliases to add a meaningful destination for your root account and type <strong>newaliases</strong> after you have done your editing. Then follow <a href="http://www.c0t0d0s0.org/archives/7053-New-Solaris-features-Notifications-from-the-Fault-Management-Architecture.html" target="_blank">this guide</a> and setup email alerts to get notified when you lose a disk.</p>
<h2>Snapshot current setup as a boot environment:</h2>
<p>OpenIndiana boot environments allows you to snapshot your current system as a backup, so that you can always reboot your system to a known working state. This is really handy when you do system upgrades, or experiment with something new. <strong>beadm list</strong> shows the default boot environment:</p>
<pre>root@openindiana:/home/garo# beadm list
BE Active Mountpoint Space Policy Created
openindiana NR / 1.59G static 2012-01-02 11:57</pre>
<pre>There we can see our default <em>openindiana </em>boot environment, which is both active (N) and will be activated upon next reboot (R). The command <strong>beadm create -e openindiana openindiana-baseline </strong>will snapshot the current environment into new <em>openindiana-baseline</em> which acts as a backup. This <a href="http://www.c0t0d0s0.org/archives/4372-New-features-of-Solaris-Alternate-boot-environments-based-on-snapshots.html">blog post at c0t0d0s0</a> as a lot of additional information how to use the beadm tool.</pre>
<h2>What to do when a disk fails?</h2>
<p>The failure detection system will email you a message when the zfs system detects a problem with system. Here&#8217;s an example of the results when we removed a disk on the fly:</p>
<blockquote><p><strong>Subject:</strong> Fault Management Event: openindiana:ZFS-8000-D3<br />
SUNW-MSG-ID: ZFS-8000-D3, TYPE: Fault, VER: 1, SEVERITY: Major<br />
EVENT-TIME: Mon Jan 2 14:52:48 EET 2012<br />
PLATFORM: X8DTH-i-6-iF-6F, CSN: 1234567890, HOSTNAME: openindiana<br />
SOURCE: zfs-diagnosis, REV: 1.0<br />
EVENT-ID: 475fe76a-9410-e3e5-8caa-dfdb3ec83b3b<br />
DESC: A ZFS device failed. Refer to http://sun.com/msg/ZFS-8000-D3 for more information.<br />
AUTO-RESPONSE: No automated response will occur.<br />
IMPACT: Fault tolerance of the pool may be compromised.<br />
REC-ACTION: Run &#8216;zpool status -x&#8217; and replace the bad device.</p></blockquote>
<p>Log into the machine and execute <strong>zpool status</strong> to get detailed explanation which disk has been broken. You should also see that a spare disk has been activated. Look up the disk id (c2t5000C5003EEE7F2Ad0 in this case) from the print.</p>
<pre>        NAME                       STATE     READ WRITE CKSUM
        tank                       ONLINE       0     0     0
          raidz3-0                 ONLINE       0     0     0
            c2t5000C5003EF23025d0  ONLINE       0     0     0
            c2t5000C5003EEE6655d0  ONLINE       0     0     0
            c2t5000C5003EE17259d0  ONLINE       0     0     0
            c2t5000C5003EE16F53d0  ONLINE       0     0     0
            c2t5000C5003EE5D5DCd0  ONLINE       0     0     0
            c2t5000C5003EE6F70Bd0  ONLINE       0     0     0
            c2t5000C5003EEF8E58d0  ONLINE       0     0     0
            c2t5000C5003EF0EBB8d0  ONLINE       0     0     0
            c2t5000C5003EF0F507d0  ONLINE       0     0     0
            c2t5000C5003EECE68Ad0  ONLINE       0     0     0
            spare-10
              c2t5000C5003EEE7F2Ad0  UNAVAIL       0     0     0  cannot open
              c2t5000C5003EF2D1D0d0 ONLINE       0     0     0 132GB resilvered
        spares
          c2t5000C5003EF2D1D0d0    INUSE     currently in use
          c2t5000C5003EEEBC8Cd0    AVAIL
          c2t5000C5003EE49672d0    AVAIL</pre>
<p>Start the <strong>diskmap.py</strong> and execute command &#8220;<strong>ledon c2t5000C5003EEE7F2Ad0&#8243;.</strong> You should now see a blinking red led on the broken disk. You should also try to unconfigure the disk first via cfgadm: Type <strong>cfgadm -al</strong> to get a list of your configurable devices. You should find your faulted disk from a line like this:</p>
<pre>c8::w5000c5003eee7f2a,0        disk-path    connected    configured   unknown</pre>
<p>Notice that our disk id in <strong>zpool status </strong>was c2t<span style="color: #ff00ff;">5000C5003EEE7F2A</span>d0, so it will show in the cfgadm print as &#8220;c8::<span style="color: #ff00ff;">w5000c5003eee7f2a</span>,0&#8243;. Now try and type <strong>cfgadm -c unconfigure c8::w5000c5003eee7f2a,0 </strong>I&#8217;m not really sure is this part needed, but our friends at #openindiana irc channel recommended doing this.</p>
<p>Now remove the physical disk which is blinking the red led and plug a new drive back. OpenIndiana should recognize the disk automatically. You can verify this by running <strong>dmesg</strong>:</p>
<pre>genunix: [ID 936769 kern.info] sd17 is /scsi_vhci/disk@g5000c5003eed65bb
genunix: [ID 408114 kern.info] /scsi_vhci/disk@g5000c5003eed65bb (sd17) online</pre>
<p>Now start <strong>diskmap.py</strong>, run <strong>discover</strong> and then <strong>disks</strong> and you should see your new disk <em>c2t5000C5003EED65BBd0. </em>Now you need to replace the faulted device with thew new one: <strong>zpool replace tank  c2t5000C5003EEE7F2Ad0 <em>c2t5000C5003EED65BBd0</em></strong><em>. </em>The zpool should now start resilvering the new replacement disk. The spare disk is still attached and must be manually removed after the resilvering is completed: <strong>zpool detach tank </strong> <strong>c2t5000C5003EF2D1D0d0</strong>. There&#8217;s more info and examples at the Oracle <a href="http://docs.oracle.com/cd/E19253-01/819-5461/6n7ht6qvv/index.html">manuals</a> which you should read.</p>
<p>As you noted, there&#8217;s a lot manual operations which needs to be done. Some of these can be automated and the rest can be scripted. Consult at least the zpool man page to know more.</p>
<h2>Benchmarks:</h2>
<p>Simple sequential read and write benchmark against a 11 disks raidz3 in a single stripe was done with <strong>dd if=/dev/zero of=/tank/test bs=4k</strong> and monitoring the performance with <strong>zpool iostat -v 5</strong></p>
<pre>Read performance with bs=4k: 500MB/s
Write performance with bs=4k: 450MB/s
Read performance with bs=128k: 900MB/s
Write performance with bs=128k: 600MB/s</pre>
<p>I have not done any IOPS benchmarks, but knowing how the raidz3 works, the IOPS performance should be about the same than one single disk can do. The 3TB Seagate Barracuda XT 7200.12 ST33000651AS can do (depending on threads) 50 to 100 iops. CPU usage tops at about 20% during the sequential operations.</p>
<h2>Future:</h2>
<p>We&#8217;ll be running more tests, benchmarks and watch for general stability in the upcoming months. We&#8217;ll probably fill the first enclosure gradually in the new few months with total of 44 disks, resulting around 85TB of usable storage. Once this space runs out we&#8217;ll just buy another enclosure, another 9205-8e HBA controller and start filling that.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.juhonkoti.net%2F2012%2F01%2F02%2Fbuilding-a-85tb-cheap-storage-server-with-solaris-openindiana&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.juhonkoti.net/2012/01/02/building-a-85tb-cheap-storage-server-with-solaris-openindiana/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SuperMicro JBOD SC847E16-RJBOD1 enclosure with Solaris OpenIndiana</title>
		<link>http://www.juhonkoti.net/2012/01/02/supermicro-jbod-sc847e16-rjbo-enclosure-with-solaris-openindiana</link>
		<comments>http://www.juhonkoti.net/2012/01/02/supermicro-jbod-sc847e16-rjbo-enclosure-with-solaris-openindiana#comments</comments>
		<pubDate>Mon, 02 Jan 2012 15:07:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.juhonkoti.net/?p=286</guid>
		<description><![CDATA[I've just deployed a OpenIndiana storage system which uses a SuperMicro  JBOD SC847E16-RJBO 45 disk enclosure and an LSI Logic SAS 9205-8e HBA controller with OpenIndiana (build 151a).]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just deployed a OpenIndiana storage system which uses a SuperMicro JBOD <a href="http://www.supermicro.com/products/chassis/4U/847/SC847E16-RJBOD1.cfm">SC847E16-RJBOD1</a> 45 disk enclosure and an LSI Logic SAS 9205-8e HBA controller with OpenIndiana (build 151a). This enclosure allows you to fit huge amount of storage into just 4U rack space.</p>
<p>There&#8217;s a great utility called <a href="http://www.lsi.com/Pages/user/eula.aspx?file=http%3a%2f%2fwww.lsi.com%2fdownloads%2fPublic%2fHost%2520Bus%2520Adapters%2fHost%2520Bus%2520Adapters%2520Common%2520Files%2fSAS_SATA_6G_P11%2fSAS2IRCU_P11.zip&amp;Source=http%3a%2f%2fwww.mail-archive.com%2fopenindiana-discuss%40openindiana.org%2fmsg06165.html" target="_blank">sas2ircu</a>. Together with <a href="http://the-key.enix.org/~krystal/diskmap.py" target="_blank">diskmap.py</a>, these allows you to:</p>
<ul>
<li>Identify where your disks are in your enclosure</li>
<li>Toggle the disk locator identify led on and off.</li>
<li>Run a smartcl test</li>
</ul>
<p>So I can now locate my faulted disk with a clear blinking red led so that I can replace it safely.</p>
<p>Installation: Copy both binaries to /usr/sbin and you&#8217;re ready to go. Try first running diskmap.py and execute the <em>discover</em> command. Then you can list your disks and their addresses in the enclosure by saying <em>disks</em>.</p>
<p>There&#8217;s also the great <strong>lsiutil</strong> tool available. You need to find the 1.63 version which supports the 9205-8e controller. Unfortunately for some reason LSI has not yet made this tool available on their site. You can download it in the mean time from here: <a href="http://www.juhonkoti.net/media/LSIUTIL-1.63.zip">http://www.juhonkoti.net/media/LSIUTIL-1.63.zip</a></p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.juhonkoti.net%2F2012%2F01%2F02%2Fsupermicro-jbod-sc847e16-rjbo-enclosure-with-solaris-openindiana&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.juhonkoti.net/2012/01/02/supermicro-jbod-sc847e16-rjbo-enclosure-with-solaris-openindiana/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kindlen käyttö Suomessa</title>
		<link>http://www.juhonkoti.net/2011/12/19/kindlen-kaytto-suomessa</link>
		<comments>http://www.juhonkoti.net/2011/12/19/kindlen-kaytto-suomessa#comments</comments>
		<pubDate>Mon, 19 Dec 2011 07:56:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[kindle]]></category>

		<guid isPermaLink="false">http://www.juhonkoti.net/?p=271</guid>
		<description><![CDATA[Kindle on Amazonin erinomainen sähköisten kirjojen lukulaite, jonka saa tilattua Amazonin verkkokaupasta reilun sadan euron hintaan. Jenkkimatkalla Kindlen voi noustaa itselleen noin 70 euron hintaan...]]></description>
			<content:encoded><![CDATA[<p>Kindle on Amazonin erinomainen sähköisten kirjojen lukulaite, jonka saa tilattua Suomeen Amazonin verkkokaupasta reilun sadan euron hintaan. Jenkkimatkalla Kindlen voi noustaa itselleen noin 70 euron hintaan. Kindle käyttää ns. sähköistä mustetta (eInk), jonka lukeminen vastaa erittäin hyvin paperilta lukemista. Koska näytössä ei ole taustavaloa, sen lukeminen ei rasita silmiä ja sen käyttö vie erittäin vähän sähköä. Kindlen akku kestääkin normaalissa käytössä helposti kuukauden. Kindlen kaveriksi kannattaa ostaa jonkinlainen suojakuori, jotta sen kantaminen mukana olisi huolettomampaa. Kindle ladataan kytkemällä se micro-USB -johdolla esimerkiksi tietokoneeseen.</p>
<p>Kindlessä on sisäänrakennettuna Englannin, Ranskan, Saksan, Italian, Portugalin ja Espanjan tietosanakirjat. Voit erittäin helposti tarkistaa lähes minkä tahansa sanan merkityksen lukiessasi mitä tahansa kirjaa. Tämä on erittäin kätevä, jos esimerkiksi jokin Englanninkielisen romaanin sana ei ole ennalta tuttu. Vaikka pidänkin Englannin kielen sanavarastoani kohtuullisena, tämä ominaisuus on ollut ahkerassa käytössä. Sanan hakeminen tapahtuu liikuttamalla kursori halutun sanan eteen, jolloin sanan selostus ilmestyy ruudun reunaan.</p>
<p>Näyttö on mustavalkoinen ja se sopii parhaiten romaanien lukemiseen. Muita sovelluskohteita on esimerkiksi tietokirjat, oppikirjat ja laitteiden manuaalit. Grafiikkaa sisältävät julkaisut ja sarjakuvat eivät ole Kindlen omininta aluetta. Kindlestä on saatavilla useita eri malleja: Näppäimistöllä tai ilman, kosketusnäytöllä tai ilman, 3G yhteydellä tai ilman. Itse olen ollut hyvin tyytyväinen kaikista halvimpaan malliin, jossa ei ole mitään edellämainituista.</p>
<ul>
<li><strong>Näppäimistö</strong>: Kindlen avulla voi tehdä muistiinpanoja, merkintöjä &#8220;sivujen marginaaleihin&#8221; ja hakea tekstiä kirjasta ja selata vaikka Wikipediaa. Kaikki onnistuu tarvittaessa myös näytöltä käytettävällä näppäimistöllä. Koska itse käytän Kindleä vain lukemiseen, en ole kaivannut fyysistä näppäimistöä.</li>
<li><strong>Kosketusnäyttö:</strong> Helpottaa esimerkiksi on-screen -näppäimistön käyttöä, mutta toisaalta täyttää näytön sormenjäljillä. En ole kaivannut.</li>
<li><strong>3G-yhteys:</strong> Kindlen saa (lähes) ilmaiseksi ympäri maailman toimivalla 3G yhteydellä. Kindlen avulla voi ostaa kirjoja suoraan Amazonin verkkokaupasta, eikä näiden lataamisesta Kindleen tarvitse maksaa tiedonsiirtomaksua. Ainoastaan omien dokumenttien lataaminen sähköpostin välityksellä maksaa jonkin verran. Jos sinulla on mahdollisuus käyttää WLANia esimerkiksi puhelimen kautta, et tarvitse tätä.</li>
<li><strong>Mainokset: </strong>Jenkeistä ostamalla voi valita muutaman kymmenen dollarin halvemman version, joka näyttää laitteen ollessa poiskytkettynä jonkin satunnaisen mainoksen. Mainokset eivät haittaa lukemista, eikä niiden käyttö vähennä laitteen akunkestoa. Itse en ole kokenut mainoksia häiritseväksi ja ne sisältävät satunnaisesti ihan hyviä tarjouksia.</li>
<li><strong>DX-versio</strong>: Kindlestä on olemassa myös huomattavasti isompi DX versio. Itse en ole tätä kaivannut, vaan romaanien lukeminen onnistuu hyvin normaalin Kindlen näytöltä. Voisin kuvitella, että isommasta näytöstä olisi hyötyä esimerkiksi PDF-muodossa olevien manuaalien lukemisessa.</li>
</ul>
<p>Kindle tukee natiivisti Amazonin omaa .AWZ-formaattia, yleisesti käytettävää .MOBI-formaattia, PDF- ja TXT-tiedostoja. Netissä on saatavilla runsaasti .EPUB-tiedostoja, jotka on muunnettava Kindlen ymmärtämään muotoon esimerkiksi <a href="http://calibre-ebook.com/">Calibre</a>-ohjelmistolla.</p>
<p>Kindleen voi hankkia lukemista seuraavilla eri tavoilla, järjestettynä parhaimmasta tavasta huonompaan:</p>
<ul>
<li>Osto Amazonin verkkokaupasta: Tämä on ehdottomasti Kindlen paras ominaisuus. Kirjauduttasi sisään Amazoniin, voit ladata lähes minkä tahansa kirjan Kindleen painamalla oikeasta reunasta &#8220;Buy now with 1-Click.&#8221; Tämän jälkeen sinun tarvitsee ainoastaan kytkeä Kindlen WLAN päälle. Parhaassa tapauksessa kirja on luettavissa viiden sekunnin päästä napin klikkauksesta. Ostokokemus on täysin omaa luokkaansa ja suorastaan häkellyttävän helppoa.</li>
<li>Ilmaisten netistä saatavien kirjojen lataaminen omalta koneelta käyttämällä <a href="http://calibre-ebook.com/">Calibre</a>-ohjelmistoa. Calibren avulla voit muuntaa lähes minkä tahansa kirjan Kindlen osaamaan .mobi-tiedostomuotoon. Kytket vain Kindlen USB:llä tietokoneeseesi ja valitset mitkä kirjat haluat ladata Kindleen.</li>
<li>Kirjan lähettäminen sähköpostin liitetiedostona &lt;oma tunnus&gt;@kindle.com -osoitteeseen. Voit laittaa esimerkiksi .MOBI-tiedoston sähköpostin liitteeksi, jolloin se päätyy sinulle Kindleen luettavaksi muutamassa minuutissa.</li>
<li>PDF tiedostojen lataaminen USB:llä. Voit kopioida PDF tiedostot sellaisenaan Kindleen kytkemällä sen USB:llä tietokoneeseen ilman Calibrea. PDF tiedostojen lukeminen ei ole niin mukavaa kuin Kindlelle taitetun kirjan, mutta se soveltuu silti kohtalaisesti esimerkiksi manuaalien lukemiseen.</li>
<li>Kirjojen osto Suomalaisista verkkokaupoista. Suomalaiset verkkokaupat eivät ole kovinkaan fiksuja, koska kaikki myydyt kirjat ovat DRM suojattuja. Tämän takia sinun tulee murtaa ostetun kirjan DRM suojaus käyttäen Calibrea. Tämä on täysin mahdollista ja hyvin helppoa, mutta kuvastaa silti täydellistä ymmärtämättömyyttä eBook markkinoista. Tämän jälkeen ei tarvitse ihmetellä miksi Suomalaiset kirjakaupat valittavat huonosta eBook-myynnistä.</li>
</ul>
<p>Ilmaisia klassikkokirjoja löytää mm. <a href="http://www.gutenberg.org/">Project Gutenberg</a>:n sivuilta ja hakemalla Googlesta &#8220;ebook&#8221;, &#8220;.mobi&#8221; ja &#8220;.epub&#8221; -hakusanoilla. Valitettavasti jotkut verkkokaupat myyvät näitä ilmaiseksi saatavia kirjoja muutaman dollarin hinnalla, joten kannattaa varoa ettei maksa turhasta.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.juhonkoti.net%2F2011%2F12%2F19%2Fkindlen-kaytto-suomessa&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.juhonkoti.net/2011/12/19/kindlen-kaytto-suomessa/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ReaktorDevDay presentation online</title>
		<link>http://www.juhonkoti.net/2011/09/03/reaktordevday-presentation-online</link>
		<comments>http://www.juhonkoti.net/2011/09/03/reaktordevday-presentation-online#comments</comments>
		<pubDate>Sat, 03 Sep 2011 19:11:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.juhonkoti.net/?p=261</guid>
		<description><![CDATA[I've just uploaded my <em>Pitfalls and Lessons Learned with node.js</em> presentation slides from #ReaktorDevDay 2011 to <a href="/media/reaktordevday-juhomakinen-nodejs-2011-09-02.pdf">http://www.juhonkoti.net/media/reaktordevday-juhomakinen-nodejs-2011-09-02.pdf</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just uploaded my <em>Pitfalls and Lessons Learned with node.js</em> presentation slides from #ReaktorDevDay 2011 to <a href="/media/reaktordevday-juhomakinen-nodejs-2011-09-02.pdf">http://www.juhonkoti.net/media/reaktordevday-juhomakinen-nodejs-2011-09-02.pdf</a>.</p>
<p>Thanks! It was fun to speak and even more to listen other great speakers talking about some very cool stuff.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.juhonkoti.net%2F2011%2F09%2F03%2Freaktordevday-presentation-online&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.juhonkoti.net/2011/09/03/reaktordevday-presentation-online/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frontend Finland Presentation online</title>
		<link>http://www.juhonkoti.net/2011/05/12/frontend-finland-presentation-online</link>
		<comments>http://www.juhonkoti.net/2011/05/12/frontend-finland-presentation-online#comments</comments>
		<pubDate>Thu, 12 May 2011 08:55:11 +0000</pubDate>
		<dc:creator>garo</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.juhonkoti.net/?p=255</guid>
		<description><![CDATA[I had the privilege to do a presentation at yesterdays (2011-05-11) Frontend Finland event. Thanks for everybody who had the time to listen my presentation even when the time was a bit late. I&#8217;ve uploaded my slides so you can download them (PDF). Remember to check our career page if you would like to work with [...]]]></description>
			<content:encoded><![CDATA[<p>I had the privilege to do a presentation at yesterdays (2011-05-11) <a href="http://events.frontend.fi/">Frontend Finland event</a>. Thanks for everybody who had the time to listen my presentation even when the time was a bit late.</p>
<p>I&#8217;ve uploaded my slides so you can <a href="http://www.juhonkoti.net/media/frontendfinland-2011-applifier-juhomakinen.pdf">download them</a> (PDF). Remember to check our <a href="http://careers.applifier.com/">career page</a> if you would like to work with us as Applifier.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.juhonkoti.net%2F2011%2F05%2F12%2Ffrontend-finland-presentation-online&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.juhonkoti.net/2011/05/12/frontend-finland-presentation-online/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementing Multi Level Security in Windows 7 with VirtualBox and VMLite</title>
		<link>http://www.juhonkoti.net/2011/01/15/implementing-multi-level-security-in-windows-7-with-virtualbox-and-vmlite</link>
		<comments>http://www.juhonkoti.net/2011/01/15/implementing-multi-level-security-in-windows-7-with-virtualbox-and-vmlite#comments</comments>
		<pubDate>Sat, 15 Jan 2011 11:18:20 +0000</pubDate>
		<dc:creator>garo</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[multi level security]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[vmlite]]></category>

		<guid isPermaLink="false">http://www.juhonkoti.net/?p=248</guid>
		<description><![CDATA[I've been experimenting with a Multi Level Security implementation in Windows 7 using VirtualBox and VMLite to run Chrome and other browsers inside a virtual machine (guest system) and to use this browser as the default browser for the entire computer (host system) for additional security.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been experimenting with a Multi Level Security implementation in Windows 7 using VirtualBox and VMLite to run Chrome and other browsers inside a virtual machine (<em>guest system</em>) and to use this browser as the default browser for the entire computer (<em>host system</em>) for additional security. This setup allows to click any HTTP link inside pretty much any running program and make that url to load itself into a browser running inside the virtual machine.</p>
<p>This gives us an extra layer of security besides the normal Chrome sandboxing. Also all other usual VM features like snapshotting, reverting to a snapshot, clipboard between host and guest operation system, seamless mode, networking etc are all available. In practice the software running inside VM can&#8217;t be easily tell apart from non virtualized programs.</p>
<p><a href="http://www.vmlite.com/index.php/products/vmlite-workstation">VMLite Workstation</a> is a software built upon VirtualBox which allows to run a Windows XP instance in Seamless mode over a host operating system (Windows 7 in this case). You need a Windows XP license which is available at least with Windows 7 Professional version. This guide shows how to install Windows XP Mode which comes with Windows 7 Professional into a virtual machine and to configure a Chrome browser inside the VM to act as the default browser for the host operating system.</p>
<h2>Installation Instructions for VMLites and the Windows XP virtual image:</h2>
<ol>
<li>Download <strong>Virtual XP Mode</strong> from <a href="http://www.microsoft.com/windows/virtual-pc/download.aspx">http://www.microsoft.com/windows/virtual-pc/download.aspx</a> and install it with the default settings.</li>
<li>Download <strong>VMLite Workstation</strong> from <a href="http://www.vmlite.com/index.php/products/vmlite-workstation">http://www.vmlite.com/index.php/products/vmlite-workstation</a></li>
<li>Create new Virtual Image inside the VMLite workstation and give it  the installation location of the Virtual XP Mode.</li>
<li>Now you should be able to boot the Virtual XP Mode within VMLite and install Chrome and other softwares which you feel you might need. Here&#8217;s a list for ideas which you should do:
<ul>
<li>Change Chrome theme to something else so you can tell apart the Chrome which runs inside the guest vm and the Chrome which runs in your host system.</li>
<li>Edit the VM settings to disable full read/write access to the shared folders and drivers and instead just give one predefined directory which you use to transfer files between the guest and the host operating systems.</li>
</ul>
</li>
<li>Remember to take a snapshot from the VM after you have setup your environment. This acts as a restore point in time so you can always reset your VM into this state if you do something stupid or think that the VM is compromised.</li>
</ol>
<h2>Making the Chrome inside VM to be the default browser for everything.</h2>
<p>VMLite comes with a &#8220;Internet Explorer (secure)&#8221; shortcut with green borders which is installed onto your desktop. This shortcut starts Internet Explorer inside the VM. We&#8217;ll use this trick to pass Chrome.exe calls from the host system into the guest (VM) system with a .bat file and then making this .bat file the default browser program for the host system.</p>
<ol>
<li>First create a multilevel-security-browser.bat file by modifying these sources into some good location (I&#8217;ve placed it into F:\Users\Garo\VMLites\multilevel-security-browser.bat)
<pre>@echo off
pushd "C:\Program Files\VMLite\VMLite Workstation\"
set path="C:\Program Files\VMLite\VMLite Workstation\";%path%
vmlitectl run "VMLite XP Mode" "C:\Documents and Settings\Administrator\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" "%*"
popd</pre>
<p>Notice few things: The path line should have the VMLite installation directory inside the host system, the &#8220;VMLite XP Mode&#8221; should be the name of your VM and the chrome.exe path is the browser path inside the guest vm.</li>
<li>Then create a multilevel-security-browser.reg file based on these sources:
<pre>Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\MultilevelSecurityBrowser]
@="MultilevelSecurityBrowser"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\MultilevelSecurityBrowser\DefaultIcon]
@="C:\\Users\\garo\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe,0"

[HKEY_CLASSES_ROOT\MultilevelSecurityBrowser\shell]

[HKEY_CLASSES_ROOT\MultilevelSecurityBrowser\shell\open]

[HKEY_CLASSES_ROOT\MultilevelSecurityBrowser\shell\open\command]
@="\"f:\\Users\\garo\\VMLites\\multilevel-security-browser.bat\" -- \"%1\""

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice]
"Progid"="MultilevelSecurityBrowser"</pre>
<p>and set the path for chrome.bat to the path where you created your multilevel-security-browser.bat. Notice that we use the chrome.exe as the source of our DefaultIcon which assumes that you have Chrome also installed into your host operating system.</li>
<li>Save the multilevel-security-browser.reg file and click to <strong>Merge</strong> its contents with the Windows 7 registry. UAC will ask for a confirmation which you need to allow.</li>
<li>We&#8217;re pretty much done here. You can now try to click some http url and if everything went correctly a black shell window will appear for a moment and the VM is started (if it isn&#8217;t already running) and the url should be opened inside Chrome in the guest vm.</li>
</ol>
<p>I&#8217;ve used this setup only for a day now and so far it has worked nicely. the VMLite can be turned into Seamless mode and the Windows XP taskbar can be moved on the top of the screen and set it to Auto-Hide the taskbar.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.juhonkoti.net%2F2011%2F01%2F15%2Fimplementing-multi-level-security-in-windows-7-with-virtualbox-and-vmlite&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.juhonkoti.net/2011/01/15/implementing-multi-level-security-in-windows-7-with-virtualbox-and-vmlite/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Saunalahden mokkulan asennus OS X:ään, error 5370</title>
		<link>http://www.juhonkoti.net/2011/01/06/saunalahden-mokkulan-asennus-os-xaan-error-5370</link>
		<comments>http://www.juhonkoti.net/2011/01/06/saunalahden-mokkulan-asennus-os-xaan-error-5370#comments</comments>
		<pubDate>Thu, 06 Jan 2011 17:27:16 +0000</pubDate>
		<dc:creator>garo</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[mokkula]]></category>
		<category><![CDATA[saunalahti]]></category>

		<guid isPermaLink="false">http://www.juhonkoti.net/?p=243</guid>
		<description><![CDATA[Törmäsin asennusongelmiin Saunalahden mobiilitikun ohjelmiston kanssa yrittäiessäni asentaa sitä OS X:ään (10.6.5). Asennusohjelma ilmoitti virheen "An internal error has occured during configuration (5370)". Ongelma voidaan ratkaista seuraavasti...]]></description>
			<content:encoded><![CDATA[<p>Törmäsin asennusongelmiin Saunalahden mobiilitikun ohjelmiston kanssa yrittäiessäni asentaa sitä OS X:ään (10.6.5). Asennusohjelma ilmoitti virheen &#8220;An internal error has occured during configuration (5370)&#8221;.</p>
<p>Ongelma voidaan ratkaista seuraavasti:</p>
<ol>
<li>Avaa Pääte (Terminal)</li>
<li>Kirjaudu superkäyttäjäksi komennolla <strong>sudo</strong> ja antamalla oma salasanasi.</li>
<li>Siirry oikeaan hakemistoon komennolla: <strong>cd &#8220;/Applications/Elisa/Mobiililaajakaista opastettu asennus.app/Contents/MacOS&#8221;</strong> (huomaa lainausmerkit ja välilyönnit)</li>
<li>Käynnistä asennusohjelma komennolla: <strong>./MobileManager\ Setup\ Assistant </strong></li>
</ol>
<p>Asennusohjelman pitäisi tämän jälkeen suoriutua tehtävästään ongelmitta.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.juhonkoti.net%2F2011%2F01%2F06%2Fsaunalahden-mokkulan-asennus-os-xaan-error-5370&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.juhonkoti.net/2011/01/06/saunalahden-mokkulan-asennus-os-xaan-error-5370/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crash course to Java JVM memory issues to sysadmins</title>
		<link>http://www.juhonkoti.net/2010/10/19/crash-course-to-java-jvm-memory-issues-to-sysadmins</link>
		<comments>http://www.juhonkoti.net/2010/10/19/crash-course-to-java-jvm-memory-issues-to-sysadmins#comments</comments>
		<pubDate>Tue, 19 Oct 2010 12:42:29 +0000</pubDate>
		<dc:creator>garo</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jvm]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.juhonkoti.net/?p=218</guid>
		<description><![CDATA[Are you a sysadmin who is new to Java? Then you might find this post to be helpful. Java has its own memory management system with garbage collection which is most of the time really nice, but you need to know some details how it works so you can admin your JVM instances effectively.]]></description>
			<content:encoded><![CDATA[<p>Are you a sysadmin who is new to Java? Then you might find this post to be helpful.</p>
<p>Java has its own memory management system with garbage collection which is most of the time really nice, but you need to know some details how it works so you can administrate your JVM instances effectively.</p>
<h2>How Java manages memory?</h2>
<p>At the beginning Java JVM will allocate a block of memory from the OS to its heap which it will distribute to the program running inside the JVM. The amount is controlled with two command line arguments: <strong>-Xms </strong>tells how much memory JVM will allocate at the start<strong> </strong>and <strong>-Xmx </strong>what&#8217;s the maximum amount of memory which JVM can allocate from the OS. For example <strong>-Xms512m -Xmx1G</strong> will tell java to start with half gigabyte at the beginning and allow it to grow to one gigabyte.</p>
<p>As the Java program runs it allocates memory for the objects from the JVM heap. This will result the heap to grow until a GC (garbage collection) threshold is  reached. This will trigger the JVM to see which objects are no longer used (objects which are not referenced by any working object) and it will free this memory back to the heap. There are numerous ways how this can work in different GC implementations (Java has many of them) and they&#8217;re out of the scope of this article. The main point is that the Java heap usage will grow until about 80% usage when the GC occurs and then drop back to much lower level. If you use <em>jconsole </em>to watch the free memory you will see something like this:</p>
<p><a href="http://www.juhonkoti.net/wp-content/uploads/2010/10/jconsole_normal.png" rel="lightbox[218]"><img class="aligncenter size-medium wp-image-219" title="jconsole_normal" src="http://www.juhonkoti.net/wp-content/uploads/2010/10/jconsole_normal-450x375.png" alt="" width="450" height="375" /></a>The saw tooth like pattern is just normal life Java garbage collection and nothing to worry about. This however will make it difficult to know how much memory the program actually uses needs.</p>
<h2>What happens when Java runs out of memory?</h2>
<p>If JVM can&#8217;t free enough memory with a simple GC it will run a Full GC which will be a stop-the-world collection. This suspends the JVM execution until the collection is done.  A Full GC can be seen as a sudden drop on the amount of used memory, for example as seen in this image. The Full GC in this case took 0.8 seconds. It&#8217;s not much, but it did suspend the program execution for that time, so keep that in mind when designing your Java software and its real time requirements.</p>
<p><img class="aligncenter size-medium wp-image-220" title="full_gc" src="http://www.juhonkoti.net/wp-content/uploads/2010/10/full_gc-450x172.png" alt="" width="450" height="172" /></p>
<p>The Full GC will be able to free enough memory so that the program will continue, but if the JVM simply has not enough memory it will need to trigger another Full GC shortly. This can result in a <em>GC storm </em>where the program spends even more time doing even longer Full GC&#8217;s and finally running out of memory.  It&#8217;s not uncommon to see Full GC taking over two minutes in these situations and remember, the program is suspended during a Full GC! No need to say that this is bad, right?</p>
<p>However giving JVM too much memory is also bad. This will make the JVM happy as it doesn&#8217;t need to do Full GCs, but then the small GCs can take longer and if you eventually run into a Full GC situation it will take long. Very long. Thus you need to think how much memory your program will need and setup the JVM <strong>-Xms</strong> and <strong>-Xmx </strong>so that it has enough plus additional &#8220;gc breathing room&#8221; on top of that.</p>
<h2>How the OS sees all this?</h2>
<p>When the JVM starts and allocates the amount of memory specified in -Xms the OS will not immediately allocate all this memory but thanks to the modern virtual memory management the OS reserves this to be used later. You can see this in the <strong>VIRT </strong><strong> </strong>column in top. Once the Java program starts to actually use this memory the OS will need to provide the memory and thus you can see the program <strong>RES</strong> column value to grow. VIRT means how much virtual memory has been allocated and mapped to the process (this includes the JVM heap memory plus JVM code and other libraries) and RES means how much memory from all VIRT memory is actually in the ram.</p>
<p><a href="http://www.juhonkoti.net/wp-content/uploads/2010/10/top.png" rel="lightbox[218]"><img class="aligncenter size-medium wp-image-230" title="top" src="http://www.juhonkoti.net/wp-content/uploads/2010/10/top-450x90.png" alt="" width="450" height="90" /></a>The Java in the image above has too big amount of memory. The program was started with 384MB heap (-Xms384m) but it was allowed to grow up to one gigabyte (-Xmx1G), but the program is actually using just 161 megabytes out of it.</p>
<p>However when the JVM GC runs and frees the memory back to the application, the memory is not given back to the OS. Thus you will see the RES value to grow up to VIRT, but never to actually decrease unless the OS chooses to swap some of the JVM memory out to disk. This can happen easily if you specify too big heap to the JVM which doesn&#8217;t get used and you should try to avoid this.</p>
<p>Top Tip for Top: You can press <strong>f</strong> to add and hide columns like SWAP. Notice that SWAP isn&#8217;t actually the amount of memory which has been swapped to disk. According to top manual: VIRT = SWAP + RES. Swap contains both the pages which has been swapped to disk and pages which hasn&#8217;t yet been actually used. See for more very usefull top commands by pressing <strong>?</strong>.</p>
<h2>How can I monitor all this?</h2>
<p>The best way is to use JMX with some handy tool like jconsole. JConsole is a GUI utility which comes with all JDK distributions and can be found under the bin/ directory (jconsole.exe in windows). You can use the jconsole to connect into a running JVM and extract a lot of different metrics out of it and even tweak some settings on the fly.</p>
<p>JMX needs to be enabled, which can be done by adding these arguments to the JVM command line:</p>
<pre>-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=8892 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote=true</pre>
<p>Notice that these settings disable authentication and ssl, so you should not do this unless your network is secured from the outside. You can also feed this data into monitor systems like Zabbix (my favourite), Cacti or Nagios, which I have found very helpful when debugging JVM performance.</p>
<p>Other way is to enable GC logging which can be done in Sun JVM with these command line parameters (these are reported to be working also with OpenJDK but I haven&#8217;t tested)</p>
<pre>-XX:+PrintGCTimeStamps -XX:+PrintGC -Xloggc:/some/dir/cassandra.gc.log</pre>
<p>These will print GC statistics to the log file, here&#8217;s an actual example:</p>
<pre>17500.125: [GC 876226K-&gt;710063K(4193024K), 0.0195470 secs]
17569.086: [GC 877871K-&gt;711547K(4193024K), 0.0200440 secs]
17641.289: [GC 879355K-&gt;713210K(4193024K), 0.0201440 secs]
17712.079: [GC 881018K-&gt;714931K(4193024K), 0.0212350 secs]
17736.576: [GC 881557K-&gt;882170K(4193024K), 0.0419590 secs]
17736.620: [Full GC 882170K-&gt;231044K(4193024K), 0.8055450 secs]
17786.560: [GC 398852K-&gt;287047K(4193024K), 0.0244280 secs]</pre>
<p>The first number is <em>seconds since JVM startup</em>, the second tells the GC type (normal vs. Full GC) and how much memory was freed.</p>
<h2>Conclusion</h2>
<ul>
<li>Java JVM will eat all the memory which you give to it (this is normal)</li>
<li>You need to tune the JVM <strong>-Xms </strong>and <strong>-Xmx</strong> parameters to give it enough but not too much memory so your application works.</li>
<li>The memory wont be released back to the OS until JVM exists, but the OS can swap the JVM memory out. Usually this is bad and you need to decrease the memory you give to the JVM.</li>
<li>Use JMX to monitor the JVM memory usage to find suitable values.</li>
</ul>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.juhonkoti.net%2F2010%2F10%2F19%2Fcrash-course-to-java-jvm-memory-issues-to-sysadmins&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=recommend&amp;colorscheme=light&amp;height=65&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:65px'></iframe></p>]]></content:encoded>
			<wfw:commentRss>http://www.juhonkoti.net/2010/10/19/crash-course-to-java-jvm-memory-issues-to-sysadmins/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

