<?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>Rude Epiphany! &#187; Computer Tech</title>
	<atom:link href="http://rude-epiphany.net/category/comp-tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://rude-epiphany.net</link>
	<description>I realized something, you probably won't like it...</description>
	<lastBuildDate>Wed, 28 Jul 2010 15:12:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>linux nfs server for solaris/x86 jumpstart</title>
		<link>http://rude-epiphany.net/comp-tech/linux-nfs-server-for-solarisx86-jumpstart/</link>
		<comments>http://rude-epiphany.net/comp-tech/linux-nfs-server-for-solarisx86-jumpstart/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 06:20:15 +0000</pubDate>
		<dc:creator>windsor</dc:creator>
				<category><![CDATA[Computer Tech]]></category>

		<guid isPermaLink="false">http://rude-epiphany.net/thoughts/linux-nfs-server-for-solarisx86-jumpstart/</guid>
		<description><![CDATA[Solaris/x86 jumpstart tries to use NFSv4 during the sysid and jumpstart rules steps.  Linux&#8217;s default nfsd/mountd make this painful as the miniroot never finds your sysidcfg or rules.ok files.  As a result, your installation always goes interactive for &#8220;system configuration&#8221; and the jumpstart steps.
The easy fix is to just disable NFSv4 on your Linux NFS [...]]]></description>
			<content:encoded><![CDATA[<p>Solaris/x86 jumpstart tries to use NFSv4 during the sysid and jumpstart rules steps.  Linux&#8217;s default nfsd/mountd make this painful as the miniroot never finds your sysidcfg or rules.ok files.  As a result, your installation always goes interactive for &#8220;system configuration&#8221; and the jumpstart steps.</p>
<p>The easy fix is to just disable NFSv4 on your Linux NFS servers.</p>
<p>For RedHat/CentOS servers, edit /etc/sysconfig/nfs and add:<br />
<code>RPCMOUNTDOPTS="--no-nfs-version 4"<br />
RPCNFSDARGS="--no-nfs-version 4"</code></p>
<p>And then restart your nfs server:<br />
<code>/etc/init.d/nfs restart</code></p>
<p>For Ubuntu, edit /etc/default/nfs-kernel-server, add <code>"--no-nfs-version 4"</code> to the existing RPCMOUNTDOPTS, which means it should look like:<br />
<code>RPCMOUNTDOPTS="--manage-gids --no-nfs-version 4"</code></p>
<p>and create a new line:<br />
<code>RPCNFSDARGS="--no-nfs-version 4"</code></p>
<p>Then open /etc/init.d/nfs-kernel-server, find the line that looks like:<br />
<code>RPCNFSDARGS="--exec $PREFIX/sbin/rpc.nfsd -- $RPCNFSDCOUNT"</code></p>
<p>Change that to:<br />
<code>RPCNFSDARGS="--exec $PREFIX/sbin/rpc.nfsd -- $RPCNFSDARGS $RPCNFSDCOUNT"</code></p>
<p>and then restart your nfs server:<br />
<code>/etc/init.d/nfs-kernel-server restart</code></p>
<p>On a side note, if your install menu (served by grub&#8217;s menu.lst) looks truncated when using Ubuntu for your tftp server, that&#8217;s because Ubuntu&#8217;s tftpd is archaic (fancy word for &#8220;old and broken&#8221;).  Install the &#8220;atftpd&#8221; package instead:<br />
<code>apt-get install atftpd</code><br />
It will ask you for permission to remove &#8216;tftpd&#8217; and install &#8216;atftpd&#8217;, which is fine.  Afterwards, open /etc/inetd.conf and comment out the tftp entry (it&#8217;s broken anyway, no &#8220;udp4&#8243;).  Your previous xinetd entry for tftpd will probably still be in place, so just restart your xinetd:<br />
<code>/etc/init.d/xinetd restart</code><br />
and try it again.</p>
<p>For the record, this is what I have for /etc/xinetd.d/tftp:<br />
<code><br />
service tftp<br />
{<br />
socket_type		= dgram<br />
protocol		= udp<br />
port			= 69<br />
wait			= yes<br />
user			= nobody<br />
server			= /usr/sbin/in.tftpd<br />
server_args		= --tftpd-timeout 30 /data/netboot/tftpboot<br />
disable			= no<br />
per_source		= 11<br />
cps			= 100 2<br />
flags			= IPv4<br />
#	log_type		= SYSLOG daemon debug<br />
#	log_on_success		= PID HOST EXIT DURATION<br />
}</code></p>
<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://rude-epiphany.net/comp-tech/linux-nfs-server-for-solarisx86-jumpstart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>But how do I put this in my resume?</title>
		<link>http://rude-epiphany.net/comp-tech/but-how-do-i-put-this-in-my-resume/</link>
		<comments>http://rude-epiphany.net/comp-tech/but-how-do-i-put-this-in-my-resume/#comments</comments>
		<pubDate>Wed, 06 May 2009 18:54:27 +0000</pubDate>
		<dc:creator>windsor</dc:creator>
				<category><![CDATA[Computer Tech]]></category>

		<guid isPermaLink="false">http://rude-epiphany.net/comp-tech/but-how-do-i-put-this-in-my-resume/</guid>
		<description><![CDATA[[16:21] JMaya: remember the yes command?
[16:21] JMaya: type it
[16:21] Windsor: yeah
[16:21] JMaya: i know what its for
[16:21] JMaya: do you?
[16:22] Windsor: yes &#124; somecommand
[16:22] JMaya: exactly
[16:22] JMaya: damn!
[16:22] JMaya: i just realized it!
[16:22] JMaya: asshole! i can&#8217;t get you with unix stuff&#8230;
]]></description>
			<content:encoded><![CDATA[<p>[16:21] JMaya: remember the yes command?<br />
[16:21] JMaya: type it<br />
[16:21] Windsor: yeah<br />
[16:21] JMaya: i know what its for<br />
[16:21] JMaya: do you?<br />
[16:22] Windsor: yes | somecommand<br />
[16:22] JMaya: exactly<br />
[16:22] JMaya: damn!<br />
[16:22] JMaya: i just realized it!<br />
[16:22] JMaya: asshole! i can&#8217;t get you with unix stuff&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://rude-epiphany.net/comp-tech/but-how-do-i-put-this-in-my-resume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solaris and zfs and cacti</title>
		<link>http://rude-epiphany.net/comp-tech/solaris-and-zfs-and-cacti/</link>
		<comments>http://rude-epiphany.net/comp-tech/solaris-and-zfs-and-cacti/#comments</comments>
		<pubDate>Sat, 03 May 2008 06:11:25 +0000</pubDate>
		<dc:creator>windsor</dc:creator>
				<category><![CDATA[Computer Tech]]></category>

		<guid isPermaLink="false">http://rude-epiphany.net/comp-tech/solaris-and-zfs-and-cacti/</guid>
		<description><![CDATA[I ran into an interesting problem while setting up cacti.
To start with, the Solaris-10 net-snmp in /usr/sfw will not report partition stats (used, max, free) for partitions that are not ufs.  I noticed this a little while back with some vxfs filesystems at work but graphing them was filed as a low-priority project.
There is [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into an interesting problem while setting up <a href="http://www.cacti.net">cacti</a>.</p>
<p>To start with, the Solaris-10 net-snmp in /usr/sfw will not report partition stats (used, max, free) for partitions that are not ufs.  I noticed this a little while back with some vxfs filesystems at work but graphing them was filed as a low-priority project.</p>
<p>There is a workaround blogged at <a href="http://sysadmin.asyd.net/home/en/blog/asyd/zfs+snmp">sysadmin.asyd.net</a> where he indicates that you can have snmpd return disk percentages for zfs partitions.</p>
<p>After pondering that solution, I came to the conclusion that there are two issues not solved by this solution:</p>
<ol>
<li>You can arbitrarily create filesystems in zfs.  To monitor them in cacti, you need to hand-manage your filesystem list in /etc/init.d/sma/snmpd.conf.  After that, you would need to manually add/remove them from your cacti configuration.  If you have a dynamic system with a dozen or more filesystems, it would be annoying.  At any scale of 1+N servers, this becomes a management nightmare.</li>
<li>You can only display %used in each filesystem.  This figure can grow or shrink in a static filesystem via activity on other filesystems.  Your filesystem availability is shared in a pool (zfs quota assignments minimize the fluctuations, but will not make them go away).</li>
</ol>
<p>Given the zfs philosophy of &#8220;filesystems come and go&#8221;, it doesn&#8217;t make sense to try to plot all of them.  If you have a home fileserver, you may have quite a few filesystems so that you can compartmentalize your data (as I have).  Putting all of them into graphs in cacti will create a very busy page that&#8217;ll be mildly painful to scroll through.</p>
<p>The solution?  Map the zpools instead &#8212; they&#8217;re (generally) tied to devices, so they&#8217;re less likely to be created and removed on a regular basis.</p>
<p>The concept is quite simple, take the output of something like this</p>
<pre>: myserver; zpool list
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
data                   1.81T   1.74T   70.4G    96%  ONLINE     -
export                 38.8G   13.9G   24.8G    35%  ONLINE     -</pre>
<p>and twiddle it so that snmpd will digest and spit it out.</p>
<p>First, a little shell scripting.  We want raw numbers so that we can graph them, so we need to get rid of those pesky non-numeric characters.  Something along the lines of this:</p>
<pre>#!/bin/ksh
export PATH=/usr/bin:/usr/sbin:/sbin
export LD_LIBRARY_PATH=/usr/lib
zpool list -H -o capacity ${1} | sed -e 's/%//g'</pre>
<p>Then we put this in /etc/sma/snmp/snmpd.conf:</p>
<pre>exec zpool-list.ksh /etc/sma/snmp/zpool-list.ksh export
exec zpool-list.ksh /etc/sma/snmp/zpool-list.ksh data</pre>
<p>Restart snmpd:</p>
<pre>: myserver; sudo svcadm -v restart sma
Action restart set for svc:/application/management/sma:default.</pre>
<p>We can use snmpwalk to verify our output:</p>
<pre>: myserver; snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.8
UCD-SNMP-MIB::extIndex.1 = INTEGER: 1
UCD-SNMP-MIB::extIndex.2 = INTEGER: 2
UCD-SNMP-MIB::extNames.1 = STRING: zpool-list.ksh
UCD-SNMP-MIB::extNames.2 = STRING: zpool-list.ksh
UCD-SNMP-MIB::extCommand.1 = STRING: /etc/sma/snmp/zpool-list.ksh export
UCD-SNMP-MIB::extCommand.2 = STRING: /etc/sma/snmp/zpool-list.ksh data
UCD-SNMP-MIB::extResult.1 = INTEGER: 0
UCD-SNMP-MIB::extResult.2 = INTEGER: 0
UCD-SNMP-MIB::extOutput.1 = STRING: 35
UCD-SNMP-MIB::extOutput.2 = STRING: 96
UCD-SNMP-MIB::extErrFix.1 = INTEGER: 0
UCD-SNMP-MIB::extErrFix.2 = INTEGER: 0
UCD-SNMP-MIB::extErrFixCmd.1 = STRING:
UCD-SNMP-MIB::extErrFixCmd.2 = STRING:</pre>
<p>If you notice in the above, we really only have one output line to work with.  Therefore, I decided that %used of the zpool was sufficient, so long as I disabled autoscaling.</p>
<p>The cacti steps were fairly straightforward.</p>
<ol>
<li>Create &#8220;Data Source(s)&#8221; using the &#8220;SNMP &#8211; Generic OID Template&#8221;</li>
<li>Create a &#8220;Graph Template&#8221; copying most settings from &#8220;Unix &#8211; Logged in Users&#8221;</li>
<li>Create &#8220;Graph Object(s)&#8221;</li>
<li>Associate (3) Graph Object(s) with your &#8220;Device&#8221;</li>
</ol>
<p>Normally you can skip (2) and do (3) above using &#8220;SNMP &#8211; Generic OID Template&#8221;, but I ran into cacti bug <a href="http://forums.cacti.net/viewtopic.php?t=25094">0001145</a> and had to create my own template.  No sweat, really.</p>
<p>You can find the details to the above Cacti steps in <a href="http://forums.cacti.net">forums.cacti.net</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rude-epiphany.net/comp-tech/solaris-and-zfs-and-cacti/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
