<?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>Beyond Abstraction &#187; BSD</title>
	<atom:link href="http://beyondabstraction.net/category/bsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://beyondabstraction.net</link>
	<description>Meanderings and Such...</description>
	<lastBuildDate>Wed, 28 Mar 2012 18:39:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>On topics such as how to run sudo from a cron job</title>
		<link>http://beyondabstraction.net/2009/12/20/on-topics-such-as-how-to-run-sudo-from-a-cron-job%e2%80%a6/</link>
		<comments>http://beyondabstraction.net/2009/12/20/on-topics-such-as-how-to-run-sudo-from-a-cron-job%e2%80%a6/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 01:15:37 +0000</pubDate>
		<dc:creator>spencer</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://beyondabstraction.net/?p=388</guid>
		<description><![CDATA[If you want to run sudo from any part of a cron job make sure you comment out the Defaults requiretty from /etc/sudoers. Bit me twice now so hopefully I&#8217;ll remember next time. Ed: Apologies to those who have read this before but I had to restore from backup and my last post wasn&#8217;t in &#8230; </p><p><a class="more-link block-button" href="http://beyondabstraction.net/2009/12/20/on-topics-such-as-how-to-run-sudo-from-a-cron-job%e2%80%a6/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>If you want to run sudo from any part of a cron job make sure you comment out the </p>
<blockquote><p>Defaults requiretty</p></blockquote>
<p>from /etc/sudoers. Bit me twice now so hopefully I&#8217;ll remember next time.</p>
<p><em>Ed: Apologies to those who have read this before but I had to restore from backup and my last post wasn&#8217;t in that backup.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://beyondabstraction.net/2009/12/20/on-topics-such-as-how-to-run-sudo-from-a-cron-job%e2%80%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solid State Devices (SSD) and journaling</title>
		<link>http://beyondabstraction.net/2009/03/02/solid-state-devices-ssd-and-journaling/</link>
		<comments>http://beyondabstraction.net/2009/03/02/solid-state-devices-ssd-and-journaling/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 07:09:51 +0000</pubDate>
		<dc:creator>spencer</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://beyondabstraction.net/?p=307</guid>
		<description><![CDATA[A few things all of us are probably interested in: SSD Write Amplification: http://www.extremetech.com/article2/0,2845,2329594,00.asp Journaling and write performance in ext4: http://thunk.org/tytso/blog/2009/03/01/ssds-journaling-and-noatimerelatime/ The bottom-line as far as wear and tear: vfat is basically the same as a journaled FS from a wear-leveling standpoint, both are worst case. Thankfully vfat, being the worst case, forced the manufacturers &#8230; </p><p><a class="more-link block-button" href="http://beyondabstraction.net/2009/03/02/solid-state-devices-ssd-and-journaling/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>A few things all of us are probably interested in:</p>
<ul>
<li>SSD Write Amplification:<br />
<br/><br />
<a href="http://www.extremetech.com/article2/0,2845,2329594,00.asp">http://www.extremetech.com/article2/0,2845,2329594,00.asp</a><br />
<br/>
</li>
<li>Journaling and write performance in ext4:<br />
<br/><br />
<a href="http://thunk.org/tytso/blog/2009/03/01/ssds-journaling-and-noatimerelatime/">http://thunk.org/tytso/blog/2009/03/01/ssds-journaling-and-noatimerelatime/</a>
</li>
</ul>
<p>The bottom-line as far as wear and tear: vfat is basically the same as a journaled FS from a wear-leveling standpoint, both are worst case.  Thankfully vfat, being the worst case, forced the manufacturers to deal with the problem early.  So all those outlandish claims I made about the world being flat and NTFS on thumbdrives are unfounded.  Ted&#8217;s evidence does not speak to the amount of effort it takes to create an NTFS thumbdrive in Windows, however</p>
]]></content:encoded>
			<wfw:commentRss>http://beyondabstraction.net/2009/03/02/solid-state-devices-ssd-and-journaling/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disabling file access time updates using noatime in OS X</title>
		<link>http://beyondabstraction.net/2008/11/06/noatime-mount-option-in-os-x/</link>
		<comments>http://beyondabstraction.net/2008/11/06/noatime-mount-option-in-os-x/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 19:23:44 +0000</pubDate>
		<dc:creator>spencer</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[tipsntricks]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://beyondabstraction.net/?p=225</guid>
		<description><![CDATA[The past few days people in Linux blogosphere have been bringing back up the noatime/nodiratime mount options. These options disable the updating of file and directory access times. On many standard systems when you read file a &#8220;last read,&#8221; or access time, timestamp is written to disk. Disabling the writing of access times can provide &#8230; </p><p><a class="more-link block-button" href="http://beyondabstraction.net/2008/11/06/noatime-mount-option-in-os-x/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>The past few days people in Linux blogosphere have been bringing back up the noatime/nodiratime mount options.  These options disable the updating of file and directory access times.  On many standard systems when you read file a &#8220;last read,&#8221; or access time, timestamp is written to disk. Disabling the writing of access times can provide performance increases in some conditions.  Probably in a lot of conditions.  Disabling the writing of these access times can be accomplished with the noatime and nodiratime mount options on a typical FS on a Linux system.  Well in OS X and hfs+ nodiratime doesn&#8217;t exist but noatime does.  </p>
<p>These options are old news to some.  I had used them in Linux in the past &#8211; heck I think it was even in the standard Gentoo install docs &#8211; but I had never them a second thought since I moved to OS X.  If you know me personally you know I can&#8217;t leave something untweaked.  And those recent discussions got me to thinking&#8230;</p>
<p>Be forewarned, I haven&#8217;t gone to great lengths to explain the concepts of the notes below so if you&#8217;ve never seen a terminal this isn&#8217;t going to be comprehendible.</p>
<p>I wanted to mount my filesystems with the noatime option in OS X to disable the updates to access times for files.  Problem is that, at least in 10.5, OS X no longer honors /etc/fstab for system disks, only for automount disks.  </p>
<p>After wrestling with it for awhile I gave upon trying to find a location where I could specify mount options for system disks.  I decided to just remount the disk later with the correct options.  I created a StartupItem entry to remount the disk.  I created a directory:</p>
<blockquote><p>
# mkdir /Library/StartupItems/spencer_boot
</p></blockquote>
<p>Then I created the StartupItem plist. Pretty straight forward.</p>
<blockquote><p>
# cat /Library/StartupItems/\<br />
spencer_boot/StartupParameters.plist</p>
<blockquote><p>
{<br />
  Description = &#8220;Spencer&#8217;s Boot Script&#8221;;<br />
  Provides = (&#8220;spencer_boot&#8221;);<br />
  OrderPreference = &#8220;None&#8221;;<br />
  Messages =<br />
  {<br />
    start = &#8220;Starting Spencer&#8217;s Boot Script&#8221;;<br />
    stop = &#8220;Stoping Spencer&#8217;s Boot Script&#8221;;<br />
    restart = &#8220;Restarting Spencer&#8217;s Boot Script&#8221;;<br />
  };<br />
}
</p></blockquote>
</blockquote>
<p>Now I needed the shell script that would be run on boot.</p>
<blockquote><p>
# cat /Library/StartupItems/spencer_boot/spencer_boot </p>
<blockquote><p>
#!/bin/sh</p>
<p>. /etc/rc.common</p>
<p>case &#8220;$1&#8243; in<br />
  start)</p>
<p>    ConsoleMessage &#8220;Starting Spencer Boot: remounting root fs noatime&#8221;<br />
    mount_hfs -o noatime /dev/disk0s2 /</p>
<p>    ;;<br />
esac</p>
<p>exit 0
</p></blockquote>
</blockquote>
<p>This solved the problem for the root fs but I also use Filevault.  If you don&#8217;t use Filevault you can stop reading here.  How would I go about this?  Same problem as before, no where to add mount time options.  Additionally the fs is mounted upon login, not boot.  So our previous method of creating a StartupItem won&#8217;t work.  We&#8217;re going to have to do it later after it has been mounted &#8211; again.  </p>
<blockquote><p><strong>&lt;redacted&gt;</strong> I did have some other information here but after review I wasn&#8217;t happy with advocating the &#8220;hack&#8221; I&#8217;m using.  But the gist of it is to run something like this: <code>/sbin/mount  -u -o noatime,nosuid,nodev /dev/disk1s2 /Users/spencer/</code> after the volume is mounted.  This happens after you enter your password.  So a good place would be login items if you can figure out how to run mount as root from a user&#8217;s startup scripts.<strong>&lt;/redacted&gt;</strong></p></blockquote>
<p>After you login and the system has completely finished running your startup apps open a terminal and type &#8220;mount&#8221;.  You should see &#8220;noatime&#8221; listed as a mount option for you system and Filevault disks.</p>
<p><a href="http://beyondabstraction.net/wp-content/uploads.hidden/2008/11/spencer_boot.sh" title="noatime OS X StartupItem script">spencer_boot shell script</a><br />
<a href="http://beyondabstraction.net/wp-content/uploads.hidden/2008/11/startupparameters.plist" title="noatime OS X StartItems StartupParameters.plist">StartupParameters.plist for the spencer_boot StartupItem</a><br />
<a href="http://beyondabstraction.net/wp-content/uploads.hidden/2008/11/remount_filevault.c" title="noatime Filevault remounter">remount_filevault for noatime in Filevault volumes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://beyondabstraction.net/2008/11/06/noatime-mount-option-in-os-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

