<?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>AlexCline.net &#187; Technology</title>
	<atom:link href="http://alexcline.net/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexcline.net</link>
	<description>The musings of a geek, cyclist, cinephile, yogi, diver, philosopher and gamer.</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:13:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>&#8220;Message: dualvar is only available with the XS version of Scalar::Util&#8221; Error in CentOS 5</title>
		<link>http://alexcline.net/2012/02/02/message-dualvar-is-only-available-with-the-xs-version-of-scalarutil-error-in-centos-5/</link>
		<comments>http://alexcline.net/2012/02/02/message-dualvar-is-only-available-with-the-xs-version-of-scalarutil-error-in-centos-5/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 19:13:32 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Randomness]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=508</guid>
		<description><![CDATA[After upgrading the CentOS 5 system that is running my company&#8217;s internal ticketing system (OTRS), the automated cron jobs for processing tickets started throwing the following error: This error was caused by an upgrade to the Compress::Zlib package. The newer version of the package isn&#8217;t compiled with XS support. I found some information about this [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading the CentOS 5 system that is running my company&#8217;s internal ticketing system (OTRS), the automated cron jobs for processing tickets started throwing the following error:</p>
<pre class="brush: plain; title: ; notranslate">Message: dualvar is only available with the XS version of Scalar::Util at /usr/lib/perl5/vendor_perl/5.8.8/IO/Socket/SSL.pm line 19</pre>
<p>This error was caused by an upgrade to the Compress::Zlib package.  The newer version of the package isn&#8217;t compiled with XS support.  I found some information about this error from this <a href="http://lists.otrs.org/pipermail/otrs/2010-October/033515.html">OTRS mailing list post</a> from 2010 regarding RHEL.  Looks like it takes about a year for RHEL packages to make it downstream to CentOS.</p>
<p>To fix the error, I ran the following from the command line:</p>
<pre class="brush: bash; title: ; notranslate">perl -MCPAN -e &quot;CPAN::Shell-&gt;force(qw(install Scalar::Util));&quot;</pre>
<p>After letting the cronjobs rerun, the error was gone and tickets successfully processed again.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/02/02/message-dualvar-is-only-available-with-the-xs-version-of-scalarutil-error-in-centos-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending HTML Email from the Linux Command Line</title>
		<link>http://alexcline.net/2012/01/12/sending-html-email-from-the-linux-command-line/</link>
		<comments>http://alexcline.net/2012/01/12/sending-html-email-from-the-linux-command-line/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 17:27:49 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Randomness]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=503</guid>
		<description><![CDATA[Just a little tip that I found useful for a project I was working on today. I had to send the results of a MySQL query via email. Since the results are printed in a table, the formatting in the email had to use a monospace font. The easiest way to use a monospace font [...]]]></description>
			<content:encoded><![CDATA[<p>Just a little tip that I found useful for a project I was working on today.  I had to send the results of a MySQL query via email.  Since the results are printed in a table, the formatting in the email had to use a monospace font.  The easiest way to use a monospace font in an email is to enable HTML and wrap everything in a &lt;pre> tag.</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash
mailto=email@awesome.tld
subject=&quot;The awesome subject line of your email message&quot;
(
  echo &quot;Subject: $subject&quot;
  echo &quot;MIME-Version: 1.0&quot;
  echo &quot;Content-Type: text/html&quot;
  echo &quot;Content-Disposition: inline&quot;
  echo &quot;&lt;html&gt;&lt;body&gt;&lt;pre&gt;&quot;
  mysql db -uawesome -pawesomer --table &lt; some-sql-to-run.sql
  echo &quot;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;&quot;
) | /usr/sbin/sendmail $mailto
</pre>
<p>The output looks like this:</p>
<pre class="brush: plain; title: ; notranslate">
To: email@email.tld
From: system@awesome.tld
Subject: The awesome subject line of your email message
+----------+----------+----------+
| Column 1 | Column 2 | Column 3 |
+----------+----------+----------+
| Apples   |        2 |    14.00 |
| Oranges  |        2 |   0.5000 |
+----------+----------+----------+</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2012/01/12/sending-html-email-from-the-linux-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reconfiguring Network Interfaces in CentOS/RHEL Systems Cloned with vCenter</title>
		<link>http://alexcline.net/2011/11/15/reconfiguring-network-interfaces-in-centosrhel-systems-cloned-with-vcenter/</link>
		<comments>http://alexcline.net/2011/11/15/reconfiguring-network-interfaces-in-centosrhel-systems-cloned-with-vcenter/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 17:28:43 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Randomness]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[eth0]]></category>
		<category><![CDATA[mac address]]></category>
		<category><![CDATA[vm]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=482</guid>
		<description><![CDATA[While cloning CentOS VMs in our environment, I ran into a problem where eth0 wouldn&#8217;t start up. When trying to start the networking service, the following error popped up: The reason this error occurs is because networking adapters in cloned VMs are assigned unique MAC addresses, so they don&#8217;t conflict with the parent VM. During [...]]]></description>
			<content:encoded><![CDATA[<p>While cloning CentOS VMs in our environment, I ran into a problem where eth0 wouldn&#8217;t start up.  When trying to start the networking service, the following error popped up:</p>
<pre class="brush: plain; title: ; notranslate">Bringing up interface eth0: Device eth0 does not seem to be preset, delaying initialization.      [FAILED]</pre>
<p>The reason this error occurs is because networking adapters in cloned VMs are assigned unique MAC addresses, so they don&#8217;t conflict with the parent VM.  During OS installation, the installer detects the network adapter and udev configures the mapping between the device eth0 and the MAC address.  When the MAC address changes udev thinks the device is missing.</p>
<p>To fix this, we need to update udev&#8217;s mapping rules to point the eth0 definition to the device with the correct MAC address.  Open the file /etc/udev/rules.d/70-persistent-net.rules.  You should see something similar to what is below:</p>
<pre class="brush: plain; title: ; notranslate"># This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:50:56:9c:00:16&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;

# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:50:56:9c:00:18&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth1&quot;</pre>
<p>As you can see there are two PCI ethernet adapters present.  The original one from the parent VM (MAC: 9c:00:16) and the new one from the current VM (MAC: 9c:00:18).  To fix the issue you need to change the eth0 device definition to have the correct MAC address (9c:00:18) and remove the eth1 device.  Your resulting file will look like so:</p>
<pre class="brush: plain; title: ; notranslate"># This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:50:56:9c:00:18&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;</pre>
<p>You&#8217;ll also want to update the /etc/sysconfig/network-scripts/ifcfg-eth0 file to reflect the correct MAC address.  Then, after a quick system restart your eth0 adapter will be back up.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2011/11/15/reconfiguring-network-interfaces-in-centosrhel-systems-cloned-with-vcenter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL &#8220;duplicate entry for &#8217;127&#8242; for key 1&#8243; in Rails</title>
		<link>http://alexcline.net/2011/11/01/mysql-duplicate-entry-for-127-for-key-1-in-rails/</link>
		<comments>http://alexcline.net/2011/11/01/mysql-duplicate-entry-for-127-for-key-1-in-rails/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 16:06:49 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=479</guid>
		<description><![CDATA[After building a lightly used rails application for internal use at the company I work for, I got a notification that there was an error in the application. Someone was trying to add a new record and it was failing (500 ISE). I checked the logs and found the following: It turns out that this [...]]]></description>
			<content:encoded><![CDATA[<p>After building a lightly used rails application for internal use at the company I work for, I got a notification that there was an error in the application.  Someone was trying to add a new record and it was failing (500 ISE).  I checked the logs and found the following:</p>
<pre class="brush: plain; title: ; notranslate">ActiveRecord::RecordNotUnique (Mysql2::Error: Duplicate entry '127' for key 1: INSERT INTO...</pre>
<p>It turns out that this problem is triggered when the id column is of type TINYINT which has a maximum signed value of 127.  This of course causes the above error to occur when record 128 is entered.</p>
<p>I was able to resolve this by changing the column type to INT using the MySQL client.</p>
<pre class="brush: plain; title: ; notranslate">ALTER TABLE employees MODIFY id INTEGER NOT NULL AUTO_INCREMENT;</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2011/11/01/mysql-duplicate-entry-for-127-for-key-1-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable nouveau drivers in Fedora 15</title>
		<link>http://alexcline.net/2011/10/12/disable-nouveau-drivers-in-fedora-15/</link>
		<comments>http://alexcline.net/2011/10/12/disable-nouveau-drivers-in-fedora-15/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 14:03:42 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=458</guid>
		<description><![CDATA[Edit: This also works in Fedora 16. During the upgrade I had to boot into single user mode to switch to run level 3 and reinstall the latest nVidia drivers. Then switch back to run level 5 and reboot. When trying to install the latest nVidia drivers on my Fedora 15 workstation, I kept getting [...]]]></description>
			<content:encoded><![CDATA[<p><em>Edit:  This also works in Fedora 16.  During the upgrade I had to boot into single user mode to switch to run level 3 and reinstall the latest nVidia drivers.  Then switch back to run level 5 and reboot.</em></p>
<p>When trying to install the latest nVidia drivers on my Fedora 15 workstation, I kept getting errors about the default nouveau video driver being loaded into the kernel.  The nVidia installer creates a modprobe config file that is supposed to prevent that module from being loaded but it doesn&#8217;t work fully.</p>
<p>To <em>really</em> disable the nouveau driver, you need to edit the grub config file and add the following to the end of the kernel init line:</p>
<pre class="brush: plain; title: ; notranslate">rdblacklist=nouveau nouveau.modeset=0</pre>
<p>For example, your resulting grub.conf file will look like this:</p>
<pre class="brush: plain; title: ; notranslate">title Fedora (2.6.40.6-0.fc15.x86_64)
        root (hd0,1)
        kernel /vmlinuz-2.6.40.6-0.fc15.x86_64 ro root=/dev/mapper/vg_cline-lv_root noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb vga=794 quiet rdblacklist=nouveau nouveau.modeset=0
        initrd /initramfs-2.6.40.6-0.fc15.x86_64.img</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2011/10/12/disable-nouveau-drivers-in-fedora-15/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable Remote Disk Browsing on a Mac</title>
		<link>http://alexcline.net/2011/08/31/enable-remote-disk-browsing-on-a-mac/</link>
		<comments>http://alexcline.net/2011/08/31/enable-remote-disk-browsing-on-a-mac/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 14:04:22 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[blu-ray]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[remote disk]]></category>
		<category><![CDATA[sharing]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=352</guid>
		<description><![CDATA[I recently bought a blu-ray drive for my PC to be able to watch movies and burn blu-ray disks easily. Sadly, Apple doesn&#8217;t offer a Mac with a blu-ray drive nor have I found a blu-ray internal drive for Macbook Pros. One thing that is available for Macs is called &#8216;DVD or CD Sharing&#8217;, also [...]]]></description>
			<content:encoded><![CDATA[<p>I recently bought a blu-ray drive for my PC to be able to watch movies and burn blu-ray disks easily.  Sadly, Apple doesn&#8217;t offer a Mac with a blu-ray drive nor have I found a blu-ray internal drive for Macbook Pros.</p>
<p>One thing that is available for Macs is called &#8216;DVD or CD Sharing&#8217;, also called &#8216;Remote Disk&#8217;.  You can find the default instructions on how to set it up over at <a href="http://support.apple.com/kb/HT1777?viewlocale=en_US" target="_blank">Apple&#8217;s support article</a>.  The instructions include how to install the DVD or CD Sharing client on a Windows PC for sharing to a Mac.</p>
<p>What isn&#8217;t included in those instructions is the fact that by default, only Macbook Airs and Mac Minis support Remote Disk out of the box.  I guess this is because they are the only two Mac models that don&#8217;t have optical drives.</p>
<p>Once DVD or CD Sharing has been enabled on a remote system (and the firewalls between the two systems correctly configured), the following two lines will activate the &#8216;Remote Disk&#8217; option in the Finder window.  Run them in a terminal window, then restart your computer.</p>
<pre class="brush: plain; title: ; notranslate">defaults write com.apple.NetworkBrowser EnableODiskBrowsing -bool true
defaults write com.apple.NetworkBrowser ODSSupported -bool true</pre>
<p>After boot, you should see the following options in your Finder.<br />
<a href="http://alexcline.net/2011/08/31/enable-remote-disk-browsing-on-a-mac/remotedisk/" rel="attachment wp-att-353"><img src="http://alexcline.net/files/2011/08/remotedisk-e1314799347763.png" alt="Screenshot of Finder with Remote Disk devices" title="Remote Disk" width="521" height="294" class="aligncenter size-full wp-image-353" /></a><br />
<em>Note: My PC has two disk drives shared in the above picture.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2011/08/31/enable-remote-disk-browsing-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Augeas Lens for Modifying Munin Nodes</title>
		<link>http://alexcline.net/2011/08/11/augeas-lens-for-modifying-munin-nodes/</link>
		<comments>http://alexcline.net/2011/08/11/augeas-lens-for-modifying-munin-nodes/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 21:14:28 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=347</guid>
		<description><![CDATA[Augeas (from EPEL) doesn&#8217;t come with a default lens for the munin-node.conf files that control Munin Nodes. So I whipped one together.]]></description>
			<content:encoded><![CDATA[<p>Augeas (from EPEL) doesn&#8217;t come with a default lens for the munin-node.conf files that control Munin Nodes.  So I whipped one together.</p>
<pre class="brush: plain; title: ; notranslate">
(* Munin Node module for Augeas *)

module MuninNode =
  autoload xfm

  let record =
    let value = store /[^ \t\n]+([ \t]+[^ \t\n]+)*/ in
      [ key Rx.word . Sep.space . value . Util.eol ]

  let lns = (record | Util.comment | Util.empty) *

  let filter = incl &quot;/etc/munin/munin-node.conf&quot; . Util.stdexcl

  let xfm = transform lns filter
</pre>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2011/08/11/augeas-lens-for-modifying-munin-nodes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Volume group &#8220;VolGroup00&#8243; not found woes.</title>
		<link>http://alexcline.net/2011/06/30/volume-group-volgroup00-not-found-woes/</link>
		<comments>http://alexcline.net/2011/06/30/volume-group-volgroup00-not-found-woes/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 14:08:03 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[p2v]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=341</guid>
		<description><![CDATA[My attempts to migrate a physical CentOS installation to a Virtual machine were fraught with perils. First, I had to figure out how to actually transfer the data. There are many tools out there that say they can assist in a P2V conversion, but the simplest method is usually the easiest. I ended up going [...]]]></description>
			<content:encoded><![CDATA[<p>My attempts to migrate a physical CentOS installation to a Virtual machine were fraught with perils.  First, I had to figure out how to actually transfer the data.  There are many tools out there that say they can assist in a P2V conversion, but the simplest method is usually the easiest.  I ended up going with a good old <code>dd</code>.</p>
<ol>
<li>First, you&#8217;ll want to create the new VM that you&#8217;ll be migrating to; we&#8217;ll call this the DestinationVM.  Just configure the hardware &#8212; don&#8217;t install an OS.</li>
<li>Next, boot the VM from the CentOS installation disk and enter rescue mode.  At the prompt, type
<pre class="brush: bash; title: ; notranslate">linux rescue</pre>
</li>
<li>Configure the network interfaces and when it asks to search for installations, allow it to initialize the disks in the VM.  There isn&#8217;t an install present, but we need to setup the disks to perform the copy.</li>
<li>When the VM has booted run
<pre class="brush: bash; title: ; notranslate">nc -l -p 6501 | dd of=/dev/sda</pre>
<p>  This will start the nc daemon and output the data to the /dev/sda disk.  <em>Make sure to change the destination disk if it is different than /dev/sda.</em></li>
<li>On the physical machine run
<pre class="brush: bash; title: ; notranslate">dd if=/dev/sda | nc &lt;ip-of-VM&gt; 6501</pre>
<p>  <em>Tip: Start the command in a <code>screen</code> session if you might be disconnected from the server during the transfer.  It may take a while.</em></li>
<li>You won&#8217;t see anything until the transfer completes.  It took 6 hours for a 250GB drive to copy for me.  YMMV</li>
<li>Once the transfer is complete, reboot the VM and you should be good to go!</li>
</ol>
<p>Sadly, when I rebooted the VM, I encountered the following error:</p>
<pre class="brush: plain; title: ; notranslate">  Reading all physical volumes. This may take awhile...
  Volume group &quot;VolGroup00&quot; not found
Unable to access resume device (/dev/VolGroup00/LogVol01)
mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!</pre>
<p>This error likely means that the kernel copied from the old physical system doesn&#8217;t have drivers to support the disk hardware in the virtual machine.  Because of this, the LVM configuration isn&#8217;t loading properly.  The easiest way to resolve this is to reinstall the kernel using <code>yum</code>.</p>
<ol>
<li>Boot the VM into the CentOS install CD and at the prompt, type
<pre class="brush: bash; title: ; notranslate">linux rescue</pre>
</li>
<li>Enable and configure networking and allow the mounting of the local installation.  Make sure to mount is as read/write &#8212; we&#8217;ll be making changes to it.</li>
<li>
<pre class="brush: bash; title: ; notranslate">chroot /mnt/sysconfig
yum remove kernel
yum install kernel
exit
exit</pre>
<p><em>Note, it&#8217;s OK to remove all versions of the kernel.  Just make sure you install one before you reboot.</em>
</li>
<li>The system will reboot, once it does, let it load into the OS.  If everything went OK, your new system will be up and running!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2011/06/30/volume-group-volgroup00-not-found-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Expand CentOS 5.6 LVM running on vSphere.</title>
		<link>http://alexcline.net/2011/06/06/expand-centos-5-6-lvm-running-on-vsphere/</link>
		<comments>http://alexcline.net/2011/06/06/expand-centos-5-6-lvm-running-on-vsphere/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 19:26:13 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=317</guid>
		<description><![CDATA[I spent a while looking for information about how to resize an LVM within CentOS 5.6. After adding additional space to the Virtual disk through the vSphere1, CentOS doesn&#8217;t automatically utilize that space. To be able to make use of the extra space, you&#8217;ll have to do the following: Note: These initial steps are required [...]]]></description>
			<content:encoded><![CDATA[<p>I spent a while looking for information about how to resize an LVM within CentOS 5.6.  After adding additional space to the Virtual disk through the vSphere<a href="#vmware"><sup>1</sup></a>, CentOS doesn&#8217;t automatically utilize that space.  To be able to make use of the extra space, you&#8217;ll have to do the following:<br />
<em>Note: These initial steps are required when expanding the size of the root partition.  A non-system partition can be expanded without having to restart.</em></p>
<ol>
<li>Boot into a CentOS 5 installation disk.  At the prompt, type:
<pre class="brush: bash; title: ; notranslate">linux rescue</pre>
</li>
<li>Type the following commands at the prompt.  <em>The following assume you have a standard CentOS LVM configuration.</em></li>
<li>
<pre class="brush: bash; title: ; notranslate">
# Create new partition from free space
fdisk /dev/sda
p  # Print partition table
n  # New partition
p  # Primary partition
3  # ID = 3
t  # Change partition type
3  # Change partition 3
8e # Type = Linux LVM
p  # Print partition table
w  # Write partition table

# Create a new LVM physical volume from the new partition
lvm pvcreate /dev/sda3
lvm pvdisplay

# Extend the volume group with the new physical volume
lvm vgextend /dev/VolGroup00 /dev/sda3

# Extend the logical volume to include 100% of the free space on the volume group.
lvm lvextend -l+100%FREE /dev/VolGroup00/LogVol00

# Mount the volume group
lvm vgscan
lvm vgchange -ay

# Resize the filesystem on the volume group to match the total size of the drive.
resize2fs /dev/VolGroup00/LogVol00
</pre>
</li>
</ol>
<p><strong>As always, have a backup of your data.</strong></p>
<p><sup>1</sup> Learn about how to resize the virtual disk in <a href="http://kb.vmware.com/kb/1004047" name="vmware">VMWare KB Article 1004047</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2011/06/06/expand-centos-5-6-lvm-running-on-vsphere/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fix from address (root@localhost.localdomain) in sendmail</title>
		<link>http://alexcline.net/2011/03/22/fix-from-address-rootlocalhost-localdomain-in-sendmail/</link>
		<comments>http://alexcline.net/2011/03/22/fix-from-address-rootlocalhost-localdomain-in-sendmail/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 16:53:13 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Randomness]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://alexcline.net/?p=309</guid>
		<description><![CDATA[I&#8217;m usually a postfix guy. That&#8217;s what I run on my servers and it&#8217;s the configuration I understand. So when someone asked me to take a look at an issue on a server running sendmail, I was a bit befuddled. The problem was that any messages sent from the command line, were arriving with a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m usually a postfix guy.  That&#8217;s what I run on my servers and it&#8217;s the configuration I understand.  So when someone asked me to take a look at an issue on a server running sendmail, I was a bit befuddled.</p>
<p>The problem was that any messages sent from the command line, were arriving with a from address of root@localhost.localdomain.  This was a bit of a problem.  To test and confirm I ran the following:</p>
<pre class="brush: bash; title: ; notranslate">echo &quot;Who will this message be addressed from?  The world may never know.&quot; | mail -s &quot;Testing sendmail&quot; alex</pre>
<p>And sure enough, I get an email address from root@localhost.localdomain.  I end up Googling combinations of &#8216;root@localhost.localdomain&#8217;, &#8216;localhost.localdomain&#8217; and &#8216;sendmail&#8217;.  The options were pretty much useless.  Too much noise about changing the sendmail configuration options.</p>
<p>In the end, I stumbled upon the real way to fix it&#8230;.  Open /etc/hosts and change add the host&#8217;s name <em>before</em> the localhost.localdomain entry on the first line.</p>
<pre class="brush: bash; title: ; notranslate">127.0.0.1     host.foobar.com host localhost.localdomain localhost
::1           localhost6.localdomain6 localhost6</pre>
<p>Turns out, sendmail looks for the first hostname in the hosts file for the loopback address and uses that in the from field when a from address isn&#8217;t specified by the mail client.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexcline.net/2011/03/22/fix-from-address-rootlocalhost-localdomain-in-sendmail/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

