<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Koitsu&#039;s Weblog</title>
	<atom:link href="http://koitsu.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://koitsu.wordpress.com</link>
	<description>Keeping IT real like a sprayed snow tree...</description>
	<lastBuildDate>Thu, 05 Nov 2009 05:57:05 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='koitsu.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/d1805d413ea3489eac62ed2a03ab3789?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Koitsu&#039;s Weblog</title>
		<link>http://koitsu.wordpress.com</link>
	</image>
			<item>
		<title>Writing FreeBSD memstick.img to a USB drive in Windows</title>
		<link>http://koitsu.wordpress.com/2009/11/03/writing-freebsd-memstick-img-to-a-usb-drive-in-windows/</link>
		<comments>http://koitsu.wordpress.com/2009/11/03/writing-freebsd-memstick-img-to-a-usb-drive-in-windows/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 06:48:51 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=548</guid>
		<description><![CDATA[I&#8217;ve received some hits on my blog of people looking how to write the FreeBSD memstick.img image to a USB flash drive under Windows.  The official FreeBSD procedure works great, but only applies if you already have access to a FreeBSD box.  Accomplishing the same under Windows is more of a hassle, but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=548&subd=koitsu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve received some hits on my blog of people looking how to write the FreeBSD memstick.img image to a USB flash drive under Windows.  The official FreeBSD procedure works great, but only applies if you already have access to a FreeBSD box.  Accomplishing the same under Windows is more of a hassle, but not too much.</p>
<p>The solution: download John&#8217;s Newbigin&#8217;s <a href="http://www.chrysocome.net/dd">dd for Windows</a>.  This is an enhanced version of <code>dd</code> which also lets you list off raw devices in Windows &#8212; including USB sticks.</p>
<p>In the below example, I have a 4GB USB flash drive (HP, model v100w) connected on a USB port, under Windows XP SP3.  This is the drive I want <code>8.0-RC2-amd64-memstick.img</code> written to.  <b>Bolded text</b> is used for denoting commands I&#8217;ve typed, as well as the device strings associated with the USB flash drive:</p>
<blockquote><pre>
C:\&gt;<b>dd --list</b>
rawwrite dd for windows version 0.5.
Written by John Newbigin &lt;jn@it.swin.edu.au&gt;
This program is covered by the GPL.  See copying.txt for details
Win32 Available Volume Information
\\.\Volume{1ff1b266-ab71-11de-b1e8-806d6172696f}\
  link to \\?\Device\HarddiskVolume1
  fixed media
  Mounted on \\.\c:

\\.\Volume{808faa36-bdbc-11de-a116-806d6172696f}\
  link to \\?\Device\HarddiskVolume2
  fixed media
  Mounted on \\.\d:

\\.\Volume{1ff1b262-ab71-11de-b1e8-806d6172696f}\
  link to \\?\Device\CdRom0
  CD-ROM
  Mounted on \\.\e:

\\.\Volume{3794d0ff-abb4-11de-9377-00221578190a}\
  link to \\?\Device\CdRom1
  CD-ROM
  Mounted on \\.\f:

\\.\Volume{ec4923e1-c907-11de-a118-00221578190a}\
  link to \\?\Device\Harddisk1\DP(1)0-0+12
  removeable media
  Mounted on \\.\g:

NT Block Device Objects
\\?\Device\CdRom0
  size is 2147483647 bytes
\\?\Device\CdRom1
  size is 2147483647 bytes
\\?\Device\Harddisk0\Partition0
  link to \\?\Device\Harddisk0\DR0
  Fixed hard disk media. Block size = 512
  size is 300069052416 bytes
\\?\Device\Harddisk0\Partition1
  link to \\?\Device\HarddiskVolume1
\\?\Device\Harddisk0\Partition2
  link to \\?\Device\HarddiskVolume2
<b>\\?\Device\Harddisk1\Partition0
  link to \\?\Device\Harddisk1\DR17
  Removable media other than floppy. Block size = 512
  size is 4009754624 bytes
\\?\Device\Harddisk1\Partition1
  link to \\?\Device\Harddisk1\DP(1)0-0+12
  Removable media other than floppy. Block size = 512
  size is 4009730048 bytes</b>
...
</pre>
</blockquote>
<p>The device string we want is the NT Block Device, not the Win32 Volume, and we&#8217;re interested in the <b>Partition0</b> entry.  Now that we know the device path, we can write memstick.img directly to that, using the exact same block size as what the <a href="http://lists.freebsd.org/pipermail/freebsd-stable/2009-July/051018.html">official FreeBSD procedure</a> recommends.</p>
<p>Note that the <code>conv=sync</code> parameter has been removed (not needed here, and this version of <code>dd</code> doesn&#8217;t understand it anyway), and I&#8217;ve added the <code>--progress</code> flag which indicates how many bytes have been written in real-time (useful).</p>
<p>Finally: <b>please be sure you pick the correct device string!</b>  I won&#8217;t be held accountable if you screw this up and destroy your Windows machines&#8217; hard disk.  :-)</p>
<blockquote><pre>
C:\&gt;<b>dd if=8.0-RC2-amd64-memstick.img of=\\?\Device\Harddisk1\Partition0 bs=10240 --progress</b>
rawwrite dd for windows version 0.5.
Written by John Newbigin &lt;jn@it.swin.edu.au&gt;
This program is covered by the GPL.  See copying.txt for details
1,044,858,880
102037+0 records in
102037+0 records out
</pre>
</blockquote>
<p>Voilà.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/548/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koitsu.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koitsu.wordpress.com/548/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koitsu.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koitsu.wordpress.com/548/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koitsu.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koitsu.wordpress.com/548/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koitsu.wordpress.com/548/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koitsu.wordpress.com/548/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=548&subd=koitsu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://koitsu.wordpress.com/2009/11/03/writing-freebsd-memstick-img-to-a-usb-drive-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Testing out FreeBSD 8.0-RC2</title>
		<link>http://koitsu.wordpress.com/2009/11/02/testing-out-freebsd-8-0-rc2/</link>
		<comments>http://koitsu.wordpress.com/2009/11/02/testing-out-freebsd-8-0-rc2/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 18:34:14 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=520</guid>
		<description><![CDATA[Those who haven&#8217;t read about my 8.0-RC1 experience should do so first:

Testing out FreeBSD 8.0-RC1

Basically, my experience with 8.0-RC2 was identical to that of RC1, except some of the bugs/issues I experienced are now gone (hooray!).
Fixes/improvements:

The issue I experienced with the Boot Manager selection phase of installation has been fixed.  Also, Standard is now [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=520&subd=koitsu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Those who haven&#8217;t read about my 8.0-RC1 experience should do so first:</p>
<ul>
<li><a href="http://koitsu.wordpress.com/2009/10/12/testing-out-freebsd-8-0-rc1/">Testing out FreeBSD 8.0-RC1</a></li>
</ul>
<p>Basically, my experience with 8.0-RC2 was identical to that of RC1, except some of the bugs/issues I experienced are now gone (hooray!).</p>
<p>Fixes/improvements:</p>
<ul>
<li>The issue I experienced with the Boot Manager selection phase of installation has been fixed.  Also, <b>Standard</b> is now the default option (first choice).</li>
<li>The <code>geometry does not match label</code> problem has been addressed by fixing the FreeBSD slice editor in sysinstall/sade; see below.</li>
<li>The FreeBSD slice editor has been changed to properly work with GEOM.  Commonly when installing FreeBSD on a box, people go into the slice editor and press &#8220;<b>a</b>&#8221; to use the entire disk.  Previously, users would end up with a disk where the first 63 sectors were unused (probably for the PBR/MBR and overall alignment), then the FreeBSD slice, and a third &#8220;unused&#8221; portion of the disk (which, if I remember correctly, was done solely for alignment reasons).  Example:<br />
<blockquote><pre>
Offset       Size(ST)        End     Name  PType       Desc  Subtype    Flags

         0         63         62        -     12     unused        0
        63  390716802  390716864    ad8s1      8    freebsd      165    A
 390716865       5103  390721967        -     12     unused        0
</pre>
</blockquote>
<p>Starting with RC2, this is what you&#8217;ll see:</p>
<blockquote><pre>
Offset       Size(ST)        End     Name  PType       Desc  Subtype    Flags

         0         63         62        -     12     unused        0
        63  390721905  390721967    ad8s1      8    freebsd      165    A
</pre>
</blockquote>
<p>Note the lack of the last &#8220;unused&#8221; section.  This indicates that the FreeBSD slice can literally go to the very last block on the disk.  GEOM is really looking great at this point!</p>
<p>Sadly, this also means people will need to reinstall FreeBSD (specifically, deleting the slice and re-creating it) to benefit from this.  As far as I know, you can&#8217;t fix this without a full reinstallation.
</li>
<li>The EOF issue for ttys (re: ^D being shown) has been fixed and committed to CURRENT (FreeBSD 9.0), but hasn&#8217;t been MFC&#8217;d to RELENG_8 yet.  Yes, it&#8217;s scheduled to be (in about 2 weeks).  Big thanks to Ed Schouten for fixing this!</li>
<li>There were some ZFS commits which happened between RC1 and RC2 which may indicate that the ARC exhausting all available kmem is no longer possible.  I have not been able to confirm/deny whether this fix works, but looking at the code, it may be sufficient.  I&#8217;d need to get in touch with Kip Macy to confirm/deny.</li>
</ul>
<p>Issues that are still pending:</p>
<ul>
<li><code>bsdlabel</code> still behaves incorrectly (&#8220;Class not found&#8221;).  Instead, users should use <code>gpart</code> to write the bootstraps as follows: <code>gpart bootcode [disk]</code>, where <code>[disk]</code> is <code>ad4</code> or similar.  Note that you pick the disk itself now, not the slice like in <code>bsdlabel</code> (unless you were using dangerously dedicated disks :-) ).</li>
<li>The ZFS notice pertaining to <code>vfs.zfs.prefetch_disable</code> when the system has less than 4GB RAM available has been re-worded <b>again</b>, but still is vague/unclear.  A little bit of ego here &#8212; the person committing these changes should really consider changing the message to what I proposed.</li>
<li>I still haven&#8217;t received a reply to my <a href="http://koitsu.wordpress.com/2009/10/08/freebsd-and-zfs-is-it-truly-stable/">request for clarification on ZFS stabilisation</a>.  Is <code>/boot/loader.conf</code> tuning for kmem-related parameters still required?  We still need an official statement on this matter.</li>
</ul>
<p>I also want to take a moment to send a shout-out to John Baldwin, who has been working incredibly hard on the FreeBSD kernel (specifically VM and ACPI) over the past 4 weeks.  John, I&#8217;ve seen/followed your commits, and I appreciate the improvements!  Thank you!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koitsu.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koitsu.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koitsu.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koitsu.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koitsu.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koitsu.wordpress.com/520/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koitsu.wordpress.com/520/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koitsu.wordpress.com/520/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=520&subd=koitsu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://koitsu.wordpress.com/2009/11/02/testing-out-freebsd-8-0-rc2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>UNIX mail format annoyances</title>
		<link>http://koitsu.wordpress.com/2009/10/29/unix-mail-format-annoyances/</link>
		<comments>http://koitsu.wordpress.com/2009/10/29/unix-mail-format-annoyances/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 16:09:39 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=485</guid>
		<description><![CDATA[For many years now I&#8217;ve been dealing with an ongoing issue which still to this day has no real solution: classic UNIX mailboxes (called mbox) comparing the files&#8217; mtime to its atime to determine if there&#8217;s new mail inside of the mailbox (if the mtime is greater than the atime, there&#8217;s new mail.  If [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=485&subd=koitsu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For many years now I&#8217;ve been dealing with an ongoing issue which still to this day has no real solution: classic UNIX mailboxes (called <a href="http://en.wikipedia.org/wiki/Mbox">mbox</a>) comparing the files&#8217; mtime to its atime to determine if there&#8217;s new mail inside of the mailbox (if the mtime is greater than the atime, there&#8217;s new mail.  If the mtime is smaller than the atime, new mail has been read/there is no new mail).  &#8220;Classic mail spools&#8221; (e.g. <code>/var/mail</code> or <code>/var/spool/mail</code>) are mbox.</p>
<p>Why is this a problem?  Because those of us who use mutt/alpine/etc. on our UNIX machines, who also do backups using things like <code>tar/cp/rsync</code> (more on rsync in a moment) end up with mailboxes with a lost/clobbered atime after the backup takes place.  The end result: our mail clients no longer tell us there&#8217;s new mail in that mailbox, which can be detrimental in many respects.</p>
<p>The most common rebuttal is &#8220;shut up and use <a href="http://en.wikipedia.org/wiki/Maildir">Maildir</a>&#8220;.  What Maildir advocates don&#8217;t care to acknowledge is that there are many problems with the Maildir concept, particularly when used on a filesystem like ZFS.  With classic mbox, your multi-megabyte mailboxes loads quickly &#8212; but with Maildir, since it uses a single file per mail, the end result is a mail client that takes forever to load due to the one-file-per-mail concept.  ZFS does not perform well when it comes to massive numbers of small/terse files.</p>
<p>UFS/UFS2, ext2fs/ext3fs, and other filesystems don&#8217;t have this problem, but let&#8217;s pull our heads out for a moment (since tunnel vision/ostrich syndrome is what got us here in the first place!) &#8212; we&#8217;re entering year 2010 and ZFS is already being used heavily by Solaris/OpenSolaris and FreeBSD users across the globe; ZFS is here to stay, end of discussion.  There are some proposed solutions such as making use of ZFS&#8217;s semi-new <a href="http://blogs.sun.com/brendan/entry/test">L2ARC</a> to add an additional layer of caching using dedicated low-latency devices (specifically SSDs), but there&#8217;s been no actual evidence this improves things with Maildir.  And besides, who in their right mind is going to go out and drop hundreds of dollars on an Intel X25-M <b>per machine</b> just to solve this problem?  Seriously.</p>
<p>And let&#8217;s not forget administrators who mount their filesystems with the <code>noatime</code> mount flag for added performance benefits, especially on a journalled filesystem.</p>
<p>One workaround proposed for mutt users involves recompiling mutt to use <a href="http://www.oracle.com/database/berkeley-db/index.html">Oracle/SleepyCat DB</a>, <a href="http://www.gnu.org/software/gdbm/">GDBM</a>, or <a href="http://1978th.net/tokyocabinet/">Tokyo Cabinet</a> to maintain a cache of mailbox headers (using the <code>header_cache</code> directive), thus speeding up the process.  Does this help?  Yes, there&#8217;s a decent improvement, but anyone who uses this method (such as me) can tell you that it&#8217;s still no where near as fast as classic mbox, especially when you&#8217;ve got a mailbox with a couple hundred new mails in it.</p>
<p>Does the saga end here?  Not even close.</p>
<p>There&#8217;s a new mailbox format, called <a href="http://en.wikipedia.org/wiki/MIX_%28Email%29">MIX</a>, which is being used within alpine.  This format is more or less a combination of mbox and Maildir, and performs much better than Maildir.  Sounds great, right?  Except those of us who use mutt are out of luck &#8212; unsupported, and there&#8217;s been absolutely no discussion of it <a href="http://does-not-exist.org/mail-archives/mutt-dev/msg08003.html">since February 2007</a>.  Even the author of mutt, Michael Elkins, had nothing useful to say <a href="http://does-not-exist.org/mail-archives/mutt-dev/msg08023.html">other than snide comments</a>.  Oh, and MIX isn&#8217;t supported in procmail or Sieve either &#8212; double whammy.  But MIX does sound like the way to go &#8212; too bad it isn&#8217;t getting the attention it should.</p>
<p>Some administrators using ZFS are using ZFS snapshots to do their backups instead of something like rsync, which is great except that they&#8217;re hit-or-miss (reliability-wise) on FreeBSD &#8212; or at least that&#8217;s what I last read 6-9 months ago &#8212; while rsync is filesystem-independent.  Most folks I know who run into snapshot problems revert back to rsync.</p>
<p>So what now?  With all the above in mind,I decided to poke at rsync, because there&#8217;s been many discussions in the past on the mailing lists about getting rsync to preserve file atime.  rsync out-of-the-box will preserve ctime and mtime when using the <code>--times</code> flag.  However, there&#8217;s a patch called <code>atimes.diff</code> which comes with the rsync-patches tarball that provides a <code>--atimes</code> flag that supposedly solves this.  Sounds great&#8230; except there&#8217;s one problem&#8230;</p>
<p>The flag does cause the atimes of the source file to be copied to the destination, but the <a href="http://markmail.org/message/npjrynl3fq4nycxh">atimes of the source file are lost</a>!  And <a href="http://markmail.org/message/dzvccrh3htj4esif">here&#8217;s a more recent confirmation</a>.</p>
<p>If that&#8217;s not enough, here&#8217;s final confirmation.  Note that I&#8217;m using non-zero-byte files intentionally; rsync behaves differently when the files are zero bytes.</p>
<p><code>rsync -a</code>:</p>
<blockquote><pre>
$ echo "hello" &gt; source
$ stat -x source
Access: Wed Oct 28 06:27:05 2009
Modify: Wed Oct 28 06:27:05 2009
Change: Wed Oct 28 06:27:05 2009
$ rsync -a source dest
$ stat -x source
Access: Wed Oct 28 06:27:29 2009
Modify: Wed Oct 28 06:27:05 2009
Change: Wed Oct 28 06:27:05 2009
$ stat -x dest
Access: Wed Oct 28 06:27:29 2009
Modify: Wed Oct 28 06:27:05 2009
Change: Wed Oct 28 06:27:29 2009
$ rm source dest
</pre>
</blockquote>
<p>Above, we see that after the rsync, the atime in the source file is lost, and the ctime in the destination file does not match that of the source &#8212; only the mtime is retained.</p>
<p><code>rsync -a --atimes</code>:</p>
<blockquote><pre>
$ echo "hello" &gt; source
$ stat -x source
Access: Wed Oct 28 06:32:50 2009
Modify: Wed Oct 28 06:32:50 2009
Change: Wed Oct 28 06:32:50 2009
$ rsync -a --atimes source dest
$ stat -x source
Access: Wed Oct 28 06:34:06 2009
Modify: Wed Oct 28 06:32:50 2009
Change: Wed Oct 28 06:32:50 2009
$ stat -x dest
Access: Wed Oct 28 06:32:50 2009
Modify: Wed Oct 28 06:32:50 2009
Change: Wed Oct 28 06:34:06 2009
</pre>
</blockquote>
<p>Above, we see the atime and the mtime in the source file is retained in the destination.  However, again, the atime in the source file is lost and the ctime doesn&#8217;t match that of the source.</p>
<p><code>cp -p</code>:</p>
<blockquote><pre>
$ echo "hello" &gt; source
$ stat -x source
Access: Wed Oct 28 06:37:56 2009
Modify: Wed Oct 28 06:37:56 2009
Change: Wed Oct 28 06:37:56 2009
$ cp -p source dest
$ stat -x source
Access: Wed Oct 28 06:38:27 2009
Modify: Wed Oct 28 06:37:56 2009
Change: Wed Oct 28 06:37:56 2009
$ stat -x dest
Access: Wed Oct 28 06:37:56 2009
Modify: Wed Oct 28 06:37:56 2009
Change: Wed Oct 28 06:38:27 2009
</pre>
</blockquote>
<p>With <code>cp -p</code>, we see identical behaviour to that of <code>rsync -a --atimes</code>.</p>
<p>Some may be wondering: &#8220;is it even possible to solve this problem?&#8221;  Of course it is.  The logic flow should be pretty obvious at this point:</p>
<ol>
<li>stat(2) or fstat(3) the source file and save (in memory) the atime, mtime, and ctime.  Neither call modifies the atime</li>
<li>Copy the source file to the destination file</li>
<li>Set the atime, mtime, and ctime of the destination file using utimes(3) with the previously-obtained values</li>
<li>Set the atime and mtime of the source file using utimes(3) with the previously-obtained values</li>
</ol>
<p>You can accomplish the same thing with <code>touch</code>.</p>
<p>And let&#8217;s not forget that FreeBSD lacks the <code><a href="http://lkml.indiana.edu/hypermail/linux/kernel/0406.1/0894.html">O_NOATIME</a></code> GNU extension for open(2), which was <a href="http://lkml.indiana.edu/hypermail/linux/kernel/9811.2/0118.html">proposed in 1998</a>.</p>
<p>So is there a solution to all of this?  As far as I&#8217;ve been able to tell, no, there isn&#8217;t.  Using filesystem-level snapshots appears to be the only way to &#8220;solve&#8221; this issue.  I&#8217;d be much happier if the <code>--atimes</code> patch for rsync did what it was supposed to&#8230; but it&#8217;s 23KB, and I&#8217;m not familiar with the rsync code (it&#8217;s not as black-and-white as one may think).</p>
<p>We UNIX folks should be ashamed of this whole debacle.  There isn&#8217;t a better way to say it: what a clusterfuck.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/485/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koitsu.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koitsu.wordpress.com/485/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koitsu.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koitsu.wordpress.com/485/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koitsu.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koitsu.wordpress.com/485/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koitsu.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koitsu.wordpress.com/485/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=485&subd=koitsu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://koitsu.wordpress.com/2009/10/29/unix-mail-format-annoyances/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Testing out FreeBSD 8.0-RC1</title>
		<link>http://koitsu.wordpress.com/2009/10/12/testing-out-freebsd-8-0-rc1/</link>
		<comments>http://koitsu.wordpress.com/2009/10/12/testing-out-freebsd-8-0-rc1/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 17:45:33 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=473</guid>
		<description><![CDATA[EDIT: Those interested in the upcoming release of FreeBSD 8.0 should read both the below, as well as my Testing out FreeBSD 8.0-RC2 post (which notes that many, but not all, of these problems have been fixed).
Yesterday I took the plunge and upgraded my home FreeBSD amd64 box from RELENG_7 to FreeBSD 8.0-RC1, which going [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=473&subd=koitsu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>EDIT: Those interested in the upcoming release of FreeBSD 8.0 should read both the below, as well as my <b><a href="http://koitsu.wordpress.com/2009/11/02/testing-out-freebsd-8-0-rc2/">Testing out FreeBSD 8.0-RC2</a></b> post (which notes that many, but not all, of these problems have been fixed).</p>
<p>Yesterday I took the plunge and upgraded my home FreeBSD amd64 box from RELENG_7 to FreeBSD 8.0-RC1, which going forward I will refer to as RELENG_8 (yes, it has been tagged!).  I did a complete reinstall, like I always do when migrating between major FreeBSD releases.  Said box consists of a Supermicro X7SBA motherboard, Intel Core2Duo E8400 CPU, 4GB of RAM, and 3 SATA disks connected via the on-board Intel ICH9 + AHCI &#8212; one for the OS, and two in a ZFS mirror pool.  Relevant <code>dmesg</code> information:</p>
<blockquote><pre>
CPU: Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz (2992.52-MHz K8-class CPU)
real memory  = 4294967296 (4096 MB)
avail memory = 4112478208 (3921 MB)
atapci0: &lt;Intel ICH9 SATA300 controller&gt; port 0x1c50-0x1c57,0x1c44-0x1c47,0x1c48-0x1c4f,0x1c40-0x1c43,0x18e0-0x18ff mem 0xdc000800-0xdc000fff irq 17 at device 31.2 on pci0
atapci0: [ITHREAD]
atapci0: AHCI called from vendor specific driver
atapci0: AHCI v1.20 controller with 6 3Gbps ports, PM supported
ata4: &lt;ATA channel 2&gt; on atapci0
ata4: [ITHREAD]
ata5: &lt;ATA channel 3&gt; on atapci0
ata5: [ITHREAD]
ata7: &lt;ATA channel 5&gt; on atapci0
ata7: [ITHREAD]
ad8: 190782MB &lt;WDC WD2000JD-00HBB0 08.02D08&gt; at ata4-master SATA150
ad10: 953869MB &lt;WDC WD1001FALS-00J7B1 05.00K05&gt; at ata5-master SATA300
ad14: 953869MB &lt;WDC WD1001FALS-00J7B1 05.00K05&gt; at ata7-master SATA300
</pre>
</blockquote>
<p>And ZFS-related details:</p>
<blockquote><pre>
  pool: storage
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        storage     ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            ad10    ONLINE       0     0     0
            ad14    ONLINE       0     0     0

errors: No known data errors
</pre>
</blockquote>
<p>The first thing worth noting is that I performed the installation entirely using the <a href="ftp://ftp4.freebsd.org/pub/FreeBSD/releases/amd64/ISO-IMAGES/8.0/8.0-RC1-amd64-memstick.img">FreeBSD 8.0-RC1 amd64 memstick</a> image on a <a href="http://www.amazon.com/dp/B000NWWT3G/">SanDisk Cruzer Micro 2GB USB drive</a>.  If you&#8217;re going to try this, make sure you have a 2GB or larger USB drive, since the memstick image is larger than 1GB.</p>
<p>Writing the .img file to the USB drive required the use of another FreeBSD box (someone is going to have to address that fact eventually), and was achieved per <a href="http://lists.freebsd.org/pipermail/freebsd-stable/2009-July/051018.html">Ken Smith&#8217;s original instructions</a>:</p>
<blockquote><pre>
dd if=8.0-RC1-amd64-memstick.img of=/dev/da0 bs=10240 conv=sync
</pre>
</blockquote>
<p>The entire <code>dd</code> took about 4 minutes.  I then booted it directly without any issues.  Installation went as expected, with the exception of choosing a different installation medium than usual; there&#8217;s a new <b>USB</b> menu item near the bottom of the installation medium selection list.  I should also note that I deleted the existing FreeBSD partition and re-created it during the sysinstall phase, and during the Boot Manager selection phase, I chose <b>Standard</b> like I always do.  You&#8217;ll understand why I&#8217;ve noted these two things in a moment.</p>
<p>After rebooting + booting off the main OS hard disk, the first thing I saw which was different/anomalous was that I was being shown the F1/F5/F6 FreeBSD boot manager menu &#8212; as if I had selected <b>BootMgr</b> and not <b>Standard</b>.  Options shown were F1 for FreeBSD, F5 for Floppy, and F6 for PXE (that&#8217;s a new one!).  So there&#8217;s definitely a bug/regression somewhere with regards to the boot manager you choose; or maybe it was because I was installing from a USB drive?  Not sure.</p>
<p>The FreeBSD box booted fine, but the following kernel message caught my eye:</p>
<blockquote><pre>
GEOM: ad8s1: geometry does not match label (255h,63s != 16h,63s).
</pre>
</blockquote>
<p>This indicated that what sysinstall wrote to the actual on-disk BSD label, as far as drive geometry went, didn&#8217;t match what GEOM expected &#8212; GEOM expecting 16 heads, the drive label containing 255 heads.  I&#8217;m not using GPT (at least not knowingly; if sysinstall does it without telling you, then someone needs to work out where the actual problem lies).  I first looked at <code>gpart show ad8</code> and <code>gpart show ad8s1</code> to see what it claimed:</p>
<blockquote><pre>
# gpart show ad8
=&gt;       63  390721905  ad8  MBR  (186G)
         63  390716802    1  freebsd  [active]  (186G)
  390716865       5103       - free -  (2.5M)

# gpart show ad8s1
=&gt;        0  390716802  ad8s1  BSD  (186G)
          0    4194304      1  freebsd-ufs  (2.0G)
    4194304   16777216      2  freebsd-swap  (8.0G)
   20971520   33554432      4  freebsd-ufs  (16G)
   54525952   16777216      5  freebsd-ufs  (8.0G)
   71303168  319413634      6  freebsd-ufs  (152G)
</pre>
</blockquote>
<p>Next, and more conclusive, I used <code>bsdlabel -e -A ad8s1</code> and this is what I got:</p>
<blockquote><pre>
# /dev/ad8s1:
type: ESDI
disk: ad8s1
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 24321
sectors/unit: 390721968
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:  4194304        0    4.2BSD        0     0     0
  b: 16777216  4194304      swap
  c: 390716802        0    unused        0     0         # "raw" part, don't edit
  d: 33554432 20971520    4.2BSD        0     0     0
  e: 16777216 54525952    4.2BSD        0     0     0
  f: 319413634 71303168    4.2BSD        0     0     0
</pre>
</blockquote>
<p>So yes, sysinstall is definitely doing the Wrong Thing(tm) here.  One of the biggest problems with this is that users cannot easily fix this &#8212; it requires booting a fixit or LiveFS image and editing the disk label, as well as users having to re-calculate sectors/cylinder and cylinders by hand.  And no, <a href="http://lists.freebsd.org/pipermail/freebsd-current/2009-March/004838.html">I&#8217;m not talking out of my ass</a>.  Also note that the post to freebsd-current is dated March 2009 &#8212; 7 months ago.  So this issue has existed for quite some time without proper attention.</p>
<p>Upon exiting the editor session inside of <code>bsdlabel</code> (using <code>:q!</code>), I was given the following error:</p>
<blockquote><pre>
bsdlabel: partition c doesn't cover the whole unit!
bsdlabel: An incorrect partition c may cause problems for standard system utilities
bsdlabel: Class not found
re-edit the label? [y]: n
</pre>
</blockquote>
<p>Whoa whoa whoa, even more insanity going on here!  Also, what&#8217;s with the <code>Class not found</code> error?  Wow, this is pretty jacked, and apparently <a href="http://lists.freebsd.org/pipermail/freebsd-current/2009-July/009133.html">I&#8217;m not the only one who&#8217;s noticed</a>.  Note this post is dated July 2009 &#8212; 3 months ago.  The easy solution seems to be to use <code>gpart(8)</code> to create all of the slices&#8230; except it&#8217;s obvious no one has fixed sysinstall to do this.  There&#8217;s also <a href="http://lists.freebsd.org/pipermail/freebsd-current/2009-July/009295.html">a patch mentioned</a> which fixes the problem, but that obviously wasn&#8217;t committed before the RELENG_8 tagging, nor backported since.</p>
<p>But the root of the problem <a href="http://lists.freebsd.org/pipermail/freebsd-current/2009-July/009235.html">does appear to be sysinstall</a> not doing the Right Thing(tm) any longer.</p>
<p>Next up was my attempt to fix the Boot Manager oddities.  Historically, re-writing the boot blocks on a disk consisted of doing the appropriate equivalent of <code>bsdlabel -B ad8s1</code>.  However, I was greeted with the exact same &#8220;Class not found&#8221; error as above.  Hmmm&#8230; This doesn&#8217;t bode well.  Presumably I can use <code>gpart(8)</code> to re-write the boot blocks, but given that GEOM is complaining about disk geometry errors, I don&#8217;t dare mess with it.</p>
<p>All of this is a pretty major bug.  The kernel message is going to catch a lot of user attention if it&#8217;s not fixed by the time 8.0-RELEASE is announced.  I plan on sending Robert Watson and Ken Smith an Email about the issue after I get done writing this.</p>
<p>At this point I decided to make appropriate modifications to <code>/etc/rc.conf</code>, specifically the addition of <code>zfs_enable="yes"</code>, so that I could get access to my ZFS filesystems.  After doing so, and running <code>/etc/rc.d/hostid start</code> then <code>/etc/rc.d/zfs start</code>, I was greeted with the usual ZFS kernel messages &#8212; but with an unexpected surprise:</p>
<blockquote><pre>ZFS NOTICE: system has less than 4GB and prefetch enable is not set... disabling.</pre>
</blockquote>
<p>Given how familiar I am with FreeBSD and ZFS at this point, this message caught me off-guard.</p>
<p>First of all, grammatically this sentence is confusing as hell &#8212; there is no &#8220;prefetch enable&#8221; tunable; the tunable is actually called <code>vfs.zfs.prefetch_disable</code>, and it defaults to 0 (off, e.g. prefetching enabled), so why would I exclusively enable something which is enabled by default?  And why&#8217;s it getting disabled?  Secondly, my system <b>has</b> 4GB of RAM installed&#8230; so what&#8217;s going on here?!</p>
<p>I dug around in the <a href="http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c">relevant CVS commit logs</a> and found numerous changes to this file, specifically the message that was printed.  Apparently the existing message was <a href="http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c.diff?r1=1.22;r2=1.23;f=h">reviewed by 5 separate people (revision 1.23) to &#8220;Improve wording&#8221;</a>.</p>
<blockquote><pre>
   3554 #ifdef _KERNEL
   3555         if (TUNABLE_INT_FETCH("vfs.zfs.prefetch_disable", &amp;zfs_prefetch_disable))
   3556                 prefetch_tunable_set = 1;
   3557
   ...
   3565         if ((((uint64_t)physmem * PAGESIZE) &lt; (1ULL &lt;&lt; 32)) &amp;&amp;
   3566             prefetch_tunable_set == 0) {
   3567                 printf(&quot;ZFS NOTICE: system has less than 4GB and prefetch enable is not set&quot;
   3568                     &quot;... disabling.\n&quot;);
   3569                 zfs_prefetch_disable=1;
   3570         }
   3571 #endif
</pre>
</blockquote>
<p>Ahh, now we have a much better idea of what&#8217;s going on.  There are two reasons why this message got printed on my machine:</p>
<p>1) I had not done any tuning of <code>/boot/loader.conf</code> at this point, so <code>vfs.zfs.prefetch_disable</code> hadn&#8217;t been set.  The above code basically says &#8220;if someone has administratively set <code>vfs.zfs.prefetch_disable</code> to something in <code>loader.conf</code>, set <code>prefetch_tunable_set</code> to 1&#8243;.  You can set the tunable to whatever you want (enabled or disabled) and the message won&#8217;t get printed.  If you don&#8217;t set the tunable, the following applies:</p>
<p>2) <code>physmem</code> is actually the amount of memory <b>in pages</b> that&#8217;s available to the kernel when it loads.  The multiplication is actually <code>hw.availpages * hw.pagesize</code>.  The <code>1ULL &lt;&lt; 32</code> statement may look ugly but it&#8217;s a bitshift equivalent of 2^32, e.g. 4294967296.</p>
<p>Let&#8217;s work out the math:</p>
<blockquote><pre>
# sysctl hw.pagesize hw.availpages
hw.pagesize: 4096
hw.availpages: 1046201
# expr 1046201 "*" 4096
4285239296
</pre>
</blockquote>
<p>4285239296 is indeed less than 4294967296.  Wait a minute&#8230; where&#8217;s that extra memory going?</p>
<p>Well, it&#8217;s going to two places on the X7SBA: 1) on-board video (which has an 8MB framebuffer), and 2) the AHCI BIOS which takes up an unknown amount of RAM, but I&#8217;d guess about 1-2MB. So let&#8217;s do the math:</p>
<blockquote><pre>
# expr 4294967296 - 4285239296
9728000
</pre>
</blockquote>
<p>With all of this information kept in mind, the kernel message really should be re-worded to say the following:</p>
<blockquote><pre>
ZFS NOTICE: System has less than 4294967296 bytes (4GB) of usable memory,
ZFS NOTICE: and vfs.zfs.prefetch_disable has not explicitly been defined
ZFS NOTICE: in loader.conf.  Setting vfs.zfs.prefetch_disable="1"...
</pre>
</blockquote>
<p>I&#8217;m also questioning the logic behind why prefetching is disabled on systems with less than 4GB of available memory; I&#8217;d like to know what the reasoning is there.  Is it in regards to stability?  Performance?  I don&#8217;t know.  I can&#8217;t find an answer on the mailing lists either.</p>
<p>Finally, I found an unexpected oddity with the new tty/pty/pts code with regards to EOF.  All other operating systems, including RELENG_7 and earlier, behave as follows when EOF is pressed on a terminal.  This is regardless of shell, by the way:</p>
<blockquote><pre>
bash$ cat
{press Control-D here}bash$
</pre>
</blockquote>
<p>While on RELENG_8, the literal Control-D (^D) character is shown on-screen:</p>
<blockquote><pre>
bash$ cat
{press Control-D here}^Dbash$
</pre>
</blockquote>
<p>I&#8217;ve already mailed Ed Schouten about this, and he agrees it&#8217;s a bug which he&#8217;ll work on fixing, hopefully tonight.</p>
<p>Everything else past this point was peachy keen.  No odd problems building ports, no system lock-ups or odd experiences, and so on.  It&#8217;s all worked great so far.  I&#8217;m looking forward to upgrading our production servers to RELENG_8 when it comes out.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/473/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koitsu.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koitsu.wordpress.com/473/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koitsu.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koitsu.wordpress.com/473/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koitsu.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koitsu.wordpress.com/473/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koitsu.wordpress.com/473/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koitsu.wordpress.com/473/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=473&subd=koitsu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://koitsu.wordpress.com/2009/10/12/testing-out-freebsd-8-0-rc1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>FreeBSD and ZFS &#8212; is it truly stable?</title>
		<link>http://koitsu.wordpress.com/2009/10/08/freebsd-and-zfs-is-it-truly-stable/</link>
		<comments>http://koitsu.wordpress.com/2009/10/08/freebsd-and-zfs-is-it-truly-stable/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 14:48:56 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=470</guid>
		<description><![CDATA[There&#8217;s an &#8220;age old question&#8221; that has been floating around with regards to ZFS on FreeBSD &#8212; is it stable?  &#8220;Stable&#8221; in this case means: do I risk losing my data, will it cause kernel panics or other oddities, and do I need to tune it?
The answer, still, may be yes.
I&#8217;ve taken the initiative [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=470&subd=koitsu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>There&#8217;s an &#8220;age old question&#8221; that has been floating around with regards to ZFS on FreeBSD &#8212; is it stable?  &#8220;Stable&#8221; in this case means: do I risk losing my data, will it cause kernel panics or other oddities, and do I need to tune it?</p>
<p>The answer, still, may be yes.</p>
<p>I&#8217;ve <a href="http://lists.freebsd.org/pipermail/freebsd-stable/2009-October/052256.html">taken the initiative</a> &#8212; that is to say, get an official response to these type of questions, specifically with regards to kernel panics.  I&#8217;m incredibly surprised no one &#8212; not even the user community &#8212; has responded at this point.  It&#8217;s not a trick question either; FreeBSD users really do need an answer to this.</p>
<p>People are continually comparing FreeBSD&#8217;s ZFS to that of Solaris 10 and OpenSolaris&#8217; ZFS.  Given that my day job involves heavy use of Solaris 10 on massive numbers of servers across the United States, I can safely say without a doubt ZFS on Solaris behaves better and won&#8217;t crash your system due to kernel memory exhaustion.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koitsu.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koitsu.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koitsu.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koitsu.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koitsu.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koitsu.wordpress.com/470/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koitsu.wordpress.com/470/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koitsu.wordpress.com/470/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=470&subd=koitsu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://koitsu.wordpress.com/2009/10/08/freebsd-and-zfs-is-it-truly-stable/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>How to install and use SCFH DSF</title>
		<link>http://koitsu.wordpress.com/2009/09/12/how-to-install-and-use-scfh-dsf/</link>
		<comments>http://koitsu.wordpress.com/2009/09/12/how-to-install-and-use-scfh-dsf/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 01:09:33 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=447</guid>
		<description><![CDATA[Many people over the past year have written to me or mailed me asking how to install and use SCFH DSF, since the site and the installation instructions are in Japanese.  Today, I decided to write up such instructions for English-speaking individuals, and also document the features that I use.
Keep one thing in mind: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=447&subd=koitsu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Many people over the past year have written to me or mailed me asking how to install and use <a href="http://mosa.es.land.to/fswiki.cgi?page=SCFH+DSF">SCFH DSF</a>, since the site and the installation instructions are in Japanese.  Today, I decided to write up such instructions for English-speaking individuals, and also document the features that I use.</p>
<p>Keep one thing in mind: all of this applies to Windows XP.  I have no experience with using SCFH DSF on Vista, but according to the author it should work fine.  I just don&#8217;t have any experience using it under that OS.  Also, there&#8217;s no mention of it working or not on Windows 7, so I would be very wary running it there &#8212; but if someone feels ballsy enough to try it, go for it and let me know.</p>
<ol>
<li>
<p>Download SCFH DSF, and unpack it into its own directory somewhere of your choice.</p>
</li>
<li>
<p>Close and fully exit any applications you have which can utilise video capture capabilities.  I&#8217;m talking about things like MSN Messenger, Windows Live Messenger, etc. &#8212; basically anything that might be able to capture video from a device (think: webcam).</p>
</li>
<li>
<p>If using a 32-bit OS: download and install the Microsoft Visual C++ 2008 Redistributable Package (x86) here: <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf">http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf</a></p>
<p>If using a 64-bit OS: download and install the Microsoft Visual C++ 2008 Redistributable Package (x64) here: <a href="http://www.microsoft.com/Downloads/details.aspx?displaylang=en&amp;FamilyID=bd2a6171-e2d6-4230-b809-9a8d7548c1b6">http://www.microsoft.com/Downloads/details.aspx?displaylang=en&amp;FamilyID=bd2a6171-e2d6-4230-b809-9a8d7548c1b6</a></p>
</li>
<li>
<p>If using a 32-bit OS: go into the SCFH directory you unpacked things in, and double-click the <code>install.bat</code> file.  (NOTE: To uninstall SCFH DSF, follow Step #2, and run <code>uninstall.bat</code>)</p>
<p>If using a 64-bit OS: go into the SCFH directory you unpacked things in, and double-click the <code>install64.bat</code> file.  (NOTE: To uninstall SCFH DSF, follow Step #2, and run <code>uninstall64.bat</code>)</p>
</li>
<li>
<p>You&#8217;ll get a <code>cmd.exe</code> window and a pop-up dialog box that should say <strong>DllRegisterServer in <code>scfh.ax</code> succeeded</strong> (or <code>scfh64.ax</code> if you&#8217;re using a 64-bit OS).  If not, something else is wrong and I can&#8217;t help past that point (I&#8217;ve never seen this step fail).  Click <strong>OK</strong> to close both the dialog and the <code>cmd.exe</code> window.</p>
</li>
<li>
<p>In the same directory there&#8217;s a program called <code>SCFH.exe</code>.  Make a shortcut to this somewhere for convenience, e.g. on your desktop.  This is the main SCFH DSF control program.  Once you run it (hold off on that for a moment), you should leave it open while capturing.</p>
</li>
<li>
<p>Launch any of the capturing utilities you want, such as Windows Live Messenger or Firefox/Internet Explorer with Flash which can capture from a webcam, etc&#8230; <a href="http://www.ustream.tv/">Ustream</a> is a good example.</p>
</li>
<li>
<p>Run <code>SCFH.exe</code> or the shortcut you made.  You&#8217;ll be given a window that says <strong>Select process</strong>.  Pick the process name of the program which you wish to control SCFH in and click <strong>OK</strong>.  For example, if you want to let someone watch your webcam (SCFH DSF that is, e.g. stream a copy of your desktop) in Windows Live Messenger, pick <code>msnmsgr.exe</code>.  If you&#8217;re using Ustream or something similar, pick your browser process instance.  Unlike VHScrCap, the process instances here make a lot more sense, and there aren&#8217;t multiples of the same name to confuse you.</p>
<p>If the process in question isn&#8217;t listed, you probably need to set up said program (or Flash) to note that you have a new capture device available &#8212; the device is literally called <strong>SCFH DSF</strong>.</p>
</li>
<li>
<p>You&#8217;ll now be in the main SCFH DSF control program.</p>
</li>
</ol>
<p>I&#8217;ll document the features the SCFH DSF control program that I&#8217;m familiar with or have a pretty good idea about.  And whenever changing any of these features, be sure to click the <strong>Apply</strong> button!</p>
<ul>
<li><strong>Drag here</strong> &#8212; used to select a portion of a window or a dialog/model by clicking the left mouse button + holding it down and &#8220;dragging&#8221; the selection window/border around.  You&#8217;ll have to try it to understand what I mean.  Note that the one beautiful thing about the <strong>Drag here</strong> feature is that once you select part of a window, you can move that window around and not have to re-adjust SCFH to tell it where the X/Y coordinates are.</li>
<li><strong>Area Selection</strong> &#8212; used to select a specific region of your desktop that you want to capture.  Left click it once, and you&#8217;ll be shown a green translucent box that has the text <strong>Double-click to Apply</strong> in it.  You can drag this box around and resize it (like you would a normal window), and when you&#8217;ve selected an area of your desktop you want to capture, double-left-click in the green translucent box.</li>
<li><strong>X/Y and Size input boxes</strong> &#8212; define what X/Y coordinate you want SCFH to capture (upper left corner) and what width/height.  Any changes you make here should show up in the capture window of the program (Flash, Windows Live Messenger, etc.) in real-time.  If there are common X/Y coordinates or sizes, you can click the <strong>Add</strong> button next to the respective item and they&#8217;re stored for future use.  More on that at the end of this write-up.</li>
<li><strong>Show Mouse Cursor</strong> &#8212; defines whether or not SCFH DSF should capture your mouse cursor or not.</li>
<li><strong>Show Layered Window</strong> &#8212; allows you to capture things like Tooltips and other things that aren&#8217;t technically a window.</li>
<li><strong>Keep Aspect Ratio</strong> &#8212; should speak for itself.  This option works significantly better than VHScrCap, in my opinion, and more reliably.  This is quite possibly the main reason I stopped using VHScrCap given the described bug in my blog entries circa 2008.</li>
<li><strong>Enable Enlargement</strong> &#8212; only works when <strong>Keep Aspect Ratio</strong> is enabled.  Say the program which is using SCFH DSF as a capture driver is capturing at 640&#215;480, but the area/window you have selected to capture in SCFH DSF is only 200&#215;160.  When <strong>Enable Enlargement</strong> is disabled, what you&#8217;ll see in your program is the 200&#215;160 capture region, centred, surrounded by a black box to fill in the remaining 440&#215;320 pixels.  When enabled, it would stretch the 200&#215;160 contents to fit the size of the capture area.</li>
<li><strong>Over-Sampling</strong> &#8212; adds somewhat of a blur between two frames during animation/movement.  Look up what oversampling means on Google, and some example sites/videos, and you&#8217;ll then understand it, or just play around with it.</li>
<li><strong>Thread Num</strong> &#8212; not entirely sure on this one, but based on how the program works, my guess is that it probably defines the number of threads SCFH DSF should use for internal operations.  If you have multiple CPUs or a dual/quad core system, you might benefit from increasing this to 2 or 4.  I myself have a quad core system and I&#8217;ve never had to adjust this; I always leave it at 1.</li>
<li><strong>Resize Method</strong> &#8212; allows you to pick how resizing functions and looks, and not just for <strong>Enable Enlargement</strong> but for any kind of resizing.  They all look slightly different, and it&#8217;s especially noticeable on small resolution capture areas.  I tend to use <strong>DirectDraw (1Pass)</strong> mostly because it&#8217;s incredibly fast and looks great.  Note that you may want to adjust this if you&#8217;re capturing an area that has text.  Try them all out, see which one looks best to you <strong><span style="text-decoration:underline;">and</span></strong> to the person you&#8217;re streaming to.  Keep in mind that most online streaming uses compression of some sort, so some of these resize methods might look better or worse once compressed by the streaming software.</li>
<li><strong>Capture: XXX fps</strong> &#8212; should be obvious.  This defaults to 30fps, which is more than sufficient.  I&#8217;m pretty sure it&#8217;s adjustable, I just can&#8217;t remember where&#8230;</li>
<li><strong>Performance</strong> &#8212; gives you an idea of how SCFH DSF is performing.  The author chose a unit type of frames per second, which is a little odd but understandable given the role of the program.  The value shown here is <strong><span style="text-decoration:underline;">highly</span></strong> dependent upon 4 things: 1) CPU speed, 2) video card speed (since many DirectX functions are offloaded on to the GPU), 3) <strong>Resize Method</strong> selected, and 4) size of the capture region.  For example, the performance is going to be much higher for a 200&#215;200 window than it is for a 1920&#215;1200 desktop that has to be resized/scaled down to fit into a 640&#215;480 capture region.  :)</li>
</ul>
<p>Finally, SCFH DSF does not store any data in the registry &#8212; instead, it stores configurations per application (e.g. <code>firefox.exe</code>, <code>msnmsgr.exe</code>, etc.) in INI files in the directory where SCFH DSF is located.  The files will be named things like SCFH.msnmsgr.exe.ini, <code>SCFH.firefox.exe.ini</code>, and so on &#8212; you get the idea.  The SCFH DSF capture driver itself does not use these, only the SCFH DSF control program, so be sure you exit the control program before deleting any of them.</p>
<p>Hope this helps get folks started with SCFH DSF.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koitsu.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koitsu.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koitsu.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koitsu.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koitsu.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koitsu.wordpress.com/447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koitsu.wordpress.com/447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koitsu.wordpress.com/447/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=447&subd=koitsu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://koitsu.wordpress.com/2009/09/12/how-to-install-and-use-scfh-dsf/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Another reason not to run DD-WRT</title>
		<link>http://koitsu.wordpress.com/2009/07/22/another-reason-not-to-run-dd-wrt/</link>
		<comments>http://koitsu.wordpress.com/2009/07/22/another-reason-not-to-run-dd-wrt/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 22:08:49 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[TCPIP]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=437</guid>
		<description><![CDATA[Embarrassing is an understatement.

Open-source firmware vuln exposes wireless routers
Open-source firmware flaw exposes wireless routers &#8211; DD-WRT
http://www.securityfocus.com/bid/35742/info

Tomato users are not affected.  No idea regarding HyperWRT or Thibor.
Sebastian Gottschall&#8217;s statement, &#8220;consider that this exploit was released without any report to us&#8221;, is a miserable attempt at taking responsibility for the mistake.  I have personally reviewed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=437&subd=koitsu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Embarrassing is an understatement.</p>
<ul>
<li><a href="http://www.theregister.co.uk/2009/07/21/critical_ddwrt_router_vuln/">Open-source firmware vuln exposes wireless routers</a></li>
<li><a href="http://www.dslreports.com/forum/r22744679-Opensource-firmware-flaw-exposes-wireless-routers-DDWRT">Open-source firmware flaw exposes wireless routers &#8211; DD-WRT</a></li>
<li><a href="http://www.securityfocus.com/bid/35742/info">http://www.securityfocus.com/bid/35742/info</a></li>
</ul>
<p>Tomato users are not affected.  No idea regarding HyperWRT or Thibor.</p>
<p>Sebastian Gottschall&#8217;s statement, <em>&#8220;consider that this exploit was released without any report to us&#8221;</em>, is a miserable attempt at taking responsibility for the mistake.  I have personally reviewed the DD-WRT source many times while working with WRT* routers &#8212; and like Busybox, it&#8217;s all duct tape and Bondo.  The same applies to HyperWRT, though most of the trashy code there comes from the base source which is the responsibility of Linksys and their third-party vendor.</p>
<p>With regards to DD-WRT, I really don&#8217;t care if the exploit was released without any prior report &#8212; consider doing security audits of your own code, and stop allowing patches with hacked-up solutions.  Instead, stop and think about the change in its entirety before committing.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koitsu.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koitsu.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koitsu.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koitsu.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koitsu.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koitsu.wordpress.com/437/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koitsu.wordpress.com/437/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koitsu.wordpress.com/437/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=437&subd=koitsu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://koitsu.wordpress.com/2009/07/22/another-reason-not-to-run-dd-wrt/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>Marvell&#8217;s faulty 88SE9123 (SATA 6G) controller</title>
		<link>http://koitsu.wordpress.com/2009/07/15/marvells-faulty-88se9123-sata-6g-controller/</link>
		<comments>http://koitsu.wordpress.com/2009/07/15/marvells-faulty-88se9123-sata-6g-controller/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 16:14:30 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=434</guid>
		<description><![CDATA[Marvell&#8217;s new 88SE9123 SATA 6G controller is apparently responsible for a number of motherboard manufacturers having to re-engineer and re-produce their upcoming Intel P55-based boards:

SATA 6G launch delayed to do tech issues on nearly all P55 boards
PC Perspective forum &#8212; SATA 6G delayed due to controller issues
Faulty Marvell Chips Delay SATA 6G Launch

I&#8217;ve now added [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=434&subd=koitsu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Marvell&#8217;s new 88SE9123 SATA 6G controller is apparently responsible for a number of motherboard manufacturers having to re-engineer and re-produce their upcoming Intel P55-based boards:</p>
<ul>
<li><a href="http://www.pcper.com/comments.php?nid=7470">SATA 6G launch delayed to do tech issues on nearly all P55 boards</a></li>
<li><a href="http://forums.pcper.com/showthread.php?t=465339">PC Perspective forum &#8212; SATA 6G delayed due to controller issues</a></li>
<li><a href="http://hardware.slashdot.org/story/09/07/14/1851220/Faulty-Marvell-Chips-Delay-SATA-6G-Launch?from=rss">Faulty Marvell Chips Delay SATA 6G Launch</a></li>
</ul>
<p>I&#8217;ve now added Marvell to my list of manufacturers to avoid for storage. The list is now Silicon Image (31xx series only), JMicron (a.k.a. &#8220;GIGABYTE2&#8243; on Gigabyte boards), and Marvell. Keep &#8216;em coming, and keep laying off your QA staff! *sigh*</p>
<p>Regarding the Asus P55 series, so far I&#8217;ve seen *three* separate photos of an Asus P7P55D board, and all are completely different SATA-connector-wise:</p>
<ul>
<li><a href="http://tinyurl.com/krkf9e">Board #1</a> &#8212; Intel connectors are red AND light blue, Marvell are white</li>
<li><a href="http://www.hexus.net/content/item.php?item=19240&amp;page=3">Board #2</a> &#8212; Intel connectors are light blue, Marvell are white</li>
<li><a href="http://www.theinquirer.net/inquirer/news/1137574/asus-p55-mobo-pictured">Board #3</a> &#8212; Intel connectors are light blue, and I have no idea what&#8217;s on the brown SATA connector (7th SATA port)</li>
</ul>
<p>Regarding a Gigabyte board (not sure what model): they planned on using two Marvell 88SE9123 controllers (each controller offers 2x SATA 6G ports), so in the PC Perspective photo of a Gigabyte board, the Intel P55 PCH SATA ports are light blue and the Marvell SATA ports are white.</p>
<p>I don&#8217;t know what MSI&#8217;s board looks like, so I don&#8217;t know what to tell people to avoid there.</p>
<p>Stick with the Intel P55 PCH SATA ports if you have one of these boards, and also disable the Marvell controller in the BIOS if possible. Take no chances.</p>
<p>2009/10/30 edit: Isn&#8217;t it funny how <a href="http://hothardware.com/News/USB-30-and-SATA-6G-Performance-Preview/">review sites</a> don&#8217;t bother mentioning the problem?  &#8220;Oops&#8221;.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koitsu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koitsu.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koitsu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koitsu.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koitsu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koitsu.wordpress.com/434/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koitsu.wordpress.com/434/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koitsu.wordpress.com/434/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=434&subd=koitsu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://koitsu.wordpress.com/2009/07/15/marvells-faulty-88se9123-sata-6g-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>FreeBSD and ZFS &#8212; NFS bug fixed on RELENG_7 amd64</title>
		<link>http://koitsu.wordpress.com/2009/07/01/freebsd-and-zfs-nfs-bug-fixed-on-releng_7-amd64/</link>
		<comments>http://koitsu.wordpress.com/2009/07/01/freebsd-and-zfs-nfs-bug-fixed-on-releng_7-amd64/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 02:57:10 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=413</guid>
		<description><![CDATA[I just saw this commit come through for RELENG_7:
 Edit src/sys/nfsserver/nfs_serv.c
  Add delta 1.174.2.8 2009.07.01.12.44.23 avg

The CVS commit log indicates this fixes a bug where NFS is being used on ZFS v13 exported filesystems, and the system mounting the NFS share attempts to open(2) with flags O_CREAT and O_EXCL set.  The file is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=413&subd=koitsu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just saw this commit come through for RELENG_7:</p>
<blockquote><pre> Edit src/sys/nfsserver/nfs_serv.c
  Add delta 1.174.2.8 2009.07.01.12.44.23 avg</pre>
</blockquote>
<p>The CVS commit log indicates this fixes a bug where NFS is being used on ZFS v13 exported filesystems, and the system mounting the NFS share attempts to <code>open(2)</code> with flags O_CREAT and O_EXCL set.  The file is created &#8212; 0 bytes in size, with mode 0000 &#8212; yet the operation returns EIO.  This is pretty major:</p>
<blockquote><p>
<a href="http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/nfsserver/nfs_serv.c">src/sys/nfsserver/nfs_serv.c</a>
</p></blockquote>
<p>I also enjoyed reading the PR for this bug, where some developers made some amazing statements (my favourite being &#8220;use UFS2 instead of ZFS, use cp/rm instead of mv, don&#8217;t use NFS&#8221;):</p>
<blockquote><p>
<a href="http://www.freebsd.org/cgi/query-pr.cgi?pr=135412">http://www.freebsd.org/cgi/query-pr.cgi?pr=135412</a>
</p></blockquote>
<p>This further validates my concern that there isn&#8217;t enough QA being done prior to code being committed to the STABLE branches.  I guess no one tested ZFS v13 filesystems being exported via NFS prior to the v13 commit?</p>
<p>Believe me, I&#8217;m thankful that ZFS v13 is now part of STABLE &#8212; sincerely I am &#8212; but my concern isn&#8217;t limited to ZFS: it applies to FreeBSD as a whole.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koitsu.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koitsu.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koitsu.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koitsu.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koitsu.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koitsu.wordpress.com/413/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koitsu.wordpress.com/413/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koitsu.wordpress.com/413/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=413&subd=koitsu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://koitsu.wordpress.com/2009/07/01/freebsd-and-zfs-nfs-bug-fixed-on-releng_7-amd64/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
		<item>
		<title>ports/editors/vim &#8212; unacceptable patch methodology</title>
		<link>http://koitsu.wordpress.com/2009/06/25/portseditorsvim-unacceptable-patch-methodology/</link>
		<comments>http://koitsu.wordpress.com/2009/06/25/portseditorsvim-unacceptable-patch-methodology/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 07:31:57 +0000</pubDate>
		<dc:creator>koitsu</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://koitsu.wordpress.com/?p=411</guid>
		<description><![CDATA[UPDATE: It seems the port maintainer decided that he should rename the patch file to 7.2.041^.  Yes, that&#8217;s right, a caret on the end.  This addresses the problem with URI escaping for people who pull patches locally via HTTP, but why he chose this naming convention is beyond me.  Given the Makefile&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=411&subd=koitsu&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><b>UPDATE: It seems the port maintainer decided that he should rename the patch file to <code>7.2.041^</code>.  Yes, that&#8217;s right, a caret on the end.  This addresses the problem with URI escaping for people who pull patches locally via HTTP, but why he chose this naming convention is beyond me.  Given the Makefile&#8217;s non-complexity, is it that hard to call the patch <code>7.2.041-freebsd-ports</code>?  Or better yet, why not commit it to CVS &#8212; <code>files/</code> does exist for a reason&#8230;</b></p>
<p>This also applies to <code>ports/editors/vim-lite</code>, obviously.</p>
<p>It seems a recent change to the vim port has introduced a &#8220;custom&#8221; patch file, called 7.2.041% (note the percentage symbol at the end).  Another user has opened up a PR on this matter, but the responsible individual has not responded in a month:</p>
<p><a href="http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/135689">http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/135689</a></p>
<p>Rather than accept silence, I discussed the matter with <code>flz@freebsd.org</code> directly, who initially committed a fix I recommended (removing the <code>PATCHFILES</code> line).  This fix was quickly backed out &#8212; because apparently the 7.2.041% patch does exist, just not on any of the official vim mirrors.</p>
<p>So where is this patch, and why can&#8217;t it be fetched?  Well, it can be&#8230; you just have to wait <b>5 full minutes</b> to go through all the mirrors, many of which time out or exhibit odd behaviour (note the Israeli server which results in &#8220;protocol error&#8221;):</p>
<blockquote><pre>
# cd /usr/ports/editors/vim-lite
# time make fetch
=&gt; 7.2.041% doesn't seem to exist in /usr/ports/distfiles/vim.
=&gt; Attempting to fetch from http://ftp.vim.org/pub/vim/patches/7.2/.
fetch: http://ftp.vim.org/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://ftp.vim.org/pub/vim/patches/7.2/.
fetch: http://ftp.vim.org/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://mirrors.24-7-solutions.net/pub/vim/patches/7.2/.
fetch: http://mirrors.24-7-solutions.net/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://ftp.tw.vim.org/pub/vim/patches/7.2/.
fetch: http://ftp.tw.vim.org/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://vim.stu.edu.tw/patches/7.2/.
fetch: http://vim.stu.edu.tw/patches/7.2/7.2.041%: Not Found
=&gt; Attempting to fetch from http://gd.tuwien.ac.at/pub/vim/patches/7.2/.
fetch: http://gd.tuwien.ac.at/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://www.etsimo.uniovi.es/pub/vim/patches/7.2/.
fetch: http://www.etsimo.uniovi.es/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://www.pt.vim.org/pub/vim/patches/7.2/.
fetch: http://www.pt.vim.org/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://www.pangora.org/vim.org/pub/vim/patches/7.2/.
fetch: http://www.pangora.org/vim.org/pub/vim/patches/7.2/7.2.041%: Operation timed out
=&gt; Attempting to fetch from http://www.math.technion.ac.il/pub/vim/patches/7.2/.
fetch: http://www.math.technion.ac.il/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://vim.fyxm.net/pub/vim/patches/7.2/.
fetch: http://vim.fyxm.net/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://zloba.ath.cx/pub/vim/patches/7.2/.
fetch: http://zloba.ath.cx/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://ftp2.uk.vim.org/sites/ftp.vim.org/pub/vim/patches/7.2/.
fetch: http://ftp2.uk.vim.org/sites/ftp.vim.org/pub/vim/patches/7.2/7.2.041%: Bad Request
=&gt; Attempting to fetch from http://vim.mirror.fr/patches/7.2/.
fetch: http://vim.mirror.fr/patches/7.2/7.2.041%: Operation timed out
=&gt; Attempting to fetch from ftp://ftp.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp2.us.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp2.us.vim.org/pub/vim/patches/7.2/7.2.041%: Operation timed out
=&gt; Attempting to fetch from ftp://ftp9.us.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp9.us.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.ca.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.ca.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.nl.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.nl.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.de.vim.org/patches/7.2/.
fetch: ftp://ftp.de.vim.org/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp3.de.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp3.de.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.uk.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.uk.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.ie.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.ie.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.at.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.at.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.pt.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.pt.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.is.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.is.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.il.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.il.vim.org/pub/vim/patches/7.2/7.2.041%: Protocol error
=&gt; Attempting to fetch from ftp://ftp.pl.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.pl.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.ro.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.ro.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.sk.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.sk.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.tw.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.tw.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://vim.stu.edu.tw/pub/vim/patches/7.2/.
fetch: ftp://vim.stu.edu.tw/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.jp.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.jp.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.kr.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.kr.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.mirrorservice.org/sites/ftp.vim.org/pub/vim/patches/7.2/.
fetch: ftp://ftp.mirrorservice.org/sites/ftp.vim.org/pub/vim/patches/7.2/7.2.041%: File unavailable (e.g., file not found, no access)
=&gt; Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/obrien/.
7.2.041%                                      100% of   21 kB   34 kBps
0.256u 0.506s 4:58.00 0.2%      129+1071k 0+0io 0pf+0w
</pre>
</blockquote>
<p>Apparently the 7.2.041% patch is a FreeBSD-specific version of the official 7.2.041 patch which is on the mirrors.  But what <i>I&#8217;d</i> like to know why this custom FreeBSD-specific 7.2.041 patch was not committed to CVS (e.g. <code>files/7.2.041%</code>).  Why must it reside in the maintainer&#8217;s <code>public_distfiles</code>?  This is silly.</p>
<p>Likewise, I think the existing methodology of vim updates is retarded; for example, there were over 300 patches for 7.0 before 7.1 was released.  This isn&#8217;t the fault of FreeBSD, but rather Bram Moolenaar.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koitsu.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koitsu.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koitsu.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koitsu.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koitsu.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koitsu.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koitsu.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koitsu.wordpress.com/411/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koitsu.wordpress.com/411/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koitsu.wordpress.com/411/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koitsu.wordpress.com&blog=1703455&post=411&subd=koitsu&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://koitsu.wordpress.com/2009/06/25/portseditorsvim-unacceptable-patch-methodology/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">koitsu</media:title>
		</media:content>
	</item>
	</channel>
</rss>