<?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>holyhandgrenade.org &#187; centos</title>
	<atom:link href="http://holyhandgrenade.org/blog/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://holyhandgrenade.org/blog</link>
	<description>System administration from the trenches.</description>
	<lastBuildDate>Wed, 28 Jul 2010 05:31:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Recording disk statistics with sysstat on RHEL/CentOS</title>
		<link>http://holyhandgrenade.org/blog/2009/11/recording-disk-statistics-with-sysstat-on-rhelcentos/</link>
		<comments>http://holyhandgrenade.org/blog/2009/11/recording-disk-statistics-with-sysstat-on-rhelcentos/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 19:56:36 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://holyhandgrenade.org/blog/?p=429</guid>
		<description><![CDATA[Unlike on Debian-like systems, the default configuration for sysstat&#8217;s sa1 collector on RHEL/CentOS does not include disk statistics (like you would get from iostat) in the sa collection output. This is due to a missing flag in the cron.d fragment that calls sa1. The &#8220;-A&#8221; flag to sa1 defies reasonable assumption about its function, and [...]]]></description>
			<content:encoded><![CDATA[<p>Unlike on Debian-like systems, the default configuration for sysstat&#8217;s sa1 collector on RHEL/CentOS does not include disk statistics (like you would get from iostat) in the sa collection output. This is due to a missing flag in the cron.d fragment that calls sa1. The &#8220;-A&#8221; flag to sa1 defies reasonable assumption about its function, and does not include disk statistics, so we have to specify &#8220;-d&#8221; manually.</p>
<p>To enable disk statistics collection/trending, edit <strong>/etc/cron.d/sysstat</strong> and change the following:</p>
<blockquote><p><code>*/10 * * * * root /usr/lib64/sa/sa1 1 1</code></p></blockquote>
<p>to this:</p>
<blockquote><p><code>*/10 * * * * root /usr/lib64/sa/sa1 -d 1 1</code></p></blockquote>
<p>(Obviously, replace &#8220;lib64&#8243; with &#8220;lib&#8221; as appropriate for i386 systems.)</p>
<p>Either wait for the next sa log rotation (at midnight) for sa1 to begin collecting disk statistics, or delete your current day&#8217;s statistics. sa1, for whatever historical reason, does not add new counters to an existing sa log file.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyhandgrenade.org/blog/2009/11/recording-disk-statistics-with-sysstat-on-rhelcentos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More on CentOS 5.3 to 5.4</title>
		<link>http://holyhandgrenade.org/blog/2009/11/more-on-centos-5-3-to-5-4/</link>
		<comments>http://holyhandgrenade.org/blog/2009/11/more-on-centos-5-3-to-5-4/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 23:39:08 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://holyhandgrenade.org/blog/?p=366</guid>
		<description><![CDATA[So, here&#8217;s a humbling, humiliating and slightly funny follow-up to my last blog post: I&#8217;ve always done my due diligence in making sure upgrades go smoothly. As a result, I have a habit of tirelessly poring over release notes and the &#8220;known issues&#8221; section therein. However, I got burned this week when I failed to [...]]]></description>
			<content:encoded><![CDATA[<p>So, here&#8217;s a humbling, humiliating and slightly funny follow-up to my last blog post:</p>
<p>I&#8217;ve always done my due diligence in making sure upgrades go smoothly. As a result, I have a habit of tirelessly poring over release notes and the &#8220;known issues&#8221; section therein. However, I got burned this week when I failed to read <em>all</em> of the release notes.</p>
<p>CentOS has a <a href="http://www.centos.org/docs/5/">documentation</a> page for the 5.0 series. And as of this writing, the documentation page links to a document called <a href="http://www.centos.org/docs/5/html/5.4/release-notes/">Release Notes</a>. It does not, however, link to a completely <em>different</em> document that also is called <a href="http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.4">Release Notes</a>. I had read the release notes on the documentation page, but not the CentOS-specific release notes document which was only linked from the front page. I suppose it&#8217;s my fault for not noticing that 5.0 through 5.3 all have CentOS release notes links pointing to the wiki, and thinking that the wiki might be a good place to look.</p>
<p>Upon asking about my upgrade issues, the always-helpful folks in #centos berated me for not Googling correctly for the release notes, accused me of trolling when I pointed out that I did find (and read) the release notes but that there was a documentation problem, and asked me why I would <em>dare </em>to criticize the <em>free efforts done by a volunteer</em> in maintaining the documentation. Obviously, after finding the only document called &#8220;Release Notes&#8221; listed under CentOS&#8217;s documentation for 5.4, on the page where this documentation would normally be, the perfectly reasonable, thinking man&#8217;s approach to the problem would be to <em>Google for CentOS release notes</em>.</p>
<p>After much soul-searching and reflection, and a few minutes spent filing a bug report about the documentation page, I did find the answers I was looking for in the CentOS-specific release notes tucked away on their wiki:</p>
<blockquote>
<ul>
<li>CentOS 5.4 includes glibc and kernel updates. For yum updates the recommended procedure is:</li>
</ul>
<p><code>yum clean all<br />
yum update glibc\*<br />
yum update yum\* rpm\* python\*<br />
yum clean all<br />
yum update<br />
shutdown -r now</code></p></blockquote>
<p>So, here&#8217;s the morals of the story:</p>
<ul>
<li>If you try to run the whole upgrade at once using yum upgrade, there is a good chance that <strong>you will break your system</strong> going from 5.3 to 5.4. Follow the documentation, and update your packages in the order given above, and you should be just fine.</li>
<li>If you think you&#8217;re missing an important piece of documentation, you probably are.</li>
</ul>
<p>Did you ever have one of those weeks where everything you learned seemed to be choreographed into place? I think that I&#8217;m learning much broader lessons this week about the nature and the danger of assumptions, as the Lone Sysadmin would tell you about me. (Bob Plankers, it turns out, is very much not a &#8220;goon,&#8221; and one can make a very big ass of themselves by assuming other people are familiar with the other meanings of such a word.)</p>
]]></content:encoded>
			<wfw:commentRss>http://holyhandgrenade.org/blog/2009/11/more-on-centos-5-3-to-5-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CentOS 5.3 to 5.4 upgrade woes</title>
		<link>http://holyhandgrenade.org/blog/2009/11/centos-5-3-to-5-4-upgrade-woes/</link>
		<comments>http://holyhandgrenade.org/blog/2009/11/centos-5-3-to-5-4-upgrade-woes/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 20:38:10 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://holyhandgrenade.org/blog/?p=345</guid>
		<description><![CDATA[I&#8217;ve been pushing out CentOS 5.4 on a number of test systems this week, and I came upon a very interesting, very insidious, and very annoying problem. When running the upgrade, yum upgrade seems to run without a hitch, and returns completely successfully with no errors or warnings. However, what actually happens in the background [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been pushing out CentOS 5.4 on a number of test systems this week, and I came upon a very interesting, very insidious, and very annoying problem.</p>
<p>When running the upgrade, <strong>yum upgrade</strong> seems to run without a hitch, and returns completely successfully with no errors or warnings. However, what actually happens in the background is that the cleanup process breaks silently, and the package manager gets completely filled up with entries for duplicate packages that shouldn&#8217;t be allowed to coexist. I was alerted to the problem by rkhunter, which notified me during its post-reboot run that several files were mismatched versus what the package manager thought they should contain. Now, if you <strong>rpm -qa </strong>a package with matching versions installed, the order they come back is arbitrary and depends on how they end up in your RPM BDB database. When rkhunter called <strong>rpm &#8211;verify</strong>, it was running against the older version, which was failing the checksum comparison.</p>
<p>The number of package errors that rkhunter actually caught paled in comparison to the huge number of screwed up package entries on the system.</p>
<p>This usually doesn&#8217;t cause a problem. In most cases, if the cleanup portion fails, you can just run <strong>yum-complete-transaction</strong> and it will pick up where it left off. For whatever reason, this doesn&#8217;t work here.</p>
<p>After hitting this problem, if you try to run another update, you get output like this:</p>
<blockquote>
<pre>ruby-1.8.5-5.el5_2.6.i386 from installed has depsolving problems
  --&gt; Missing Dependency: ruby-libs = 1.8.5-5.el5_2.6 is needed by package ruby-1.8.5-5.el5_2.6.i386 (installed)
openssl-devel-0.9.8e-7.el5.i386 from installed has depsolving problems
  --&gt; Missing Dependency: openssl = 0.9.8e-7.el5 is needed by package openssl-devel-0.9.8e-7.el5.i386 (installed)
2:vim-enhanced-7.0.109-4.el5_2.4z.i386 from installed has depsolving problems
  --&gt; Missing Dependency: vim-common = 2:7.0.109-4.el5_2.4z is needed by package 2:vim-enhanced-7.0.109-4.el5_2.4z.i386 (installed)
gcc-c++-4.1.2-44.el5.i386 from installed has depsolving problems
  --&gt; Missing Dependency: gcc = 4.1.2-44.el5 is needed by package gcc-c++-4.1.2-44.el5.i386 (installed)
samba-client-3.0.33-3.7.el5.i386 from installed has depsolving problems
  --&gt; Missing Dependency: samba-common = 3.0.33-3.7.el5 is needed by package samba-client-3.0.33-3.7.el5.i386 (installed)
Error: Missing Dependency: vim-common = 2:7.0.109-4.el5_2.4z is needed by package 2:vim-enhanced-7.0.109-4.el5_2.4z.i386 (installed)
Error: Missing Dependency: samba-common = 3.0.33-3.7.el5 is needed by package samba-client-3.0.33-3.7.el5.i386 (installed)
Error: Missing Dependency: openssl = 0.9.8e-7.el5 is needed by package openssl-devel-0.9.8e-7.el5.i386 (installed)
Error: Missing Dependency: ruby-libs = 1.8.5-5.el5_2.6 is needed by package ruby-1.8.5-5.el5_2.6.i386 (installed)
Error: Missing Dependency: gcc = 4.1.2-44.el5 is needed by package gcc-c++-4.1.2-44.el5.i386 (installed)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest</pre>
</blockquote>
<p>I cooked up a hairy one-liner to find the duplicates:</p>
<p><code>rpm -qa --queryformat="%{name}.%{arch}\n" | sort | uniq -d | perl -ne 's/(.*)\.(.*)/\1/g; print' | xargs rpm -qa --queryformat="%{name}-%{version}-%{release}.%{arch}\n" | sort<br />
</code></p>
<p>(It&#8217;s only so long because you need to match the arch on x86_64, and rpm -qa doesn&#8217;t play nicely with packagename.arch-format names. Interestingly, though, I&#8217;ve only experienced the problem on the i386 servers that I&#8217;ve upgraded.)</p>
<p>Here&#8217;s the output on one host following a supposedly successful upgrade:</p>
<blockquote><p><code><br />
apr-1.2.7-11.el5_3.1.i386<br />
apr-1.2.7-11.i386<br />
apr-util-1.2.7-7.el5_3.2.i386<br />
apr-util-1.2.7-7.el5.i386<br />
audit-libs-1.7.13-2.el5.i386<br />
audit-libs-1.7.7-6.el5_3.3.i386<br />
autofs-5.0.1-0.rc2.102.i386<br />
autofs-5.0.1-0.rc2.131.el5_4.1.i386<br />
centos-release-5-3.el5.centos.1.i386<br />
centos-release-5-4.el5.centos.1.i386<br />
cpio-2.6-20.i386<br />
cpio-2.6-23.el5.i386<br />
cpuspeed-1.2.1-5.el5.i386<br />
cpuspeed-1.2.1-8.el5.i386<br />
crash-4.0-7.2.3.el5.centos.i386<br />
crash-4.0-8.9.1.el5.centos.i386<br />
cups-libs-1.3.7-11.el5_4.3.i386<br />
cups-libs-1.3.7-8.el5_3.4.i386<br />
device-mapper-1.02.28-2.el5.i386<br />
device-mapper-1.02.32-1.el5.i386<br />
device-mapper-event-1.02.28-2.el5.i386<br />
device-mapper-event-1.02.32-1.el5.i386<br />
device-mapper-multipath-0.4.7-23.el5_3.4.i386<br />
device-mapper-multipath-0.4.7-30.el5_4.2.i386<br />
dmidecode-2.10-2.el5_4.i386<br />
dmidecode-2.7-1.28.2.el5.i386<br />
dos2unix-3.1-27.1.i386<br />
dos2unix-3.1-27.2.el5.i386<br />
e2fsprogs-1.39-20.el5.i386<br />
e2fsprogs-1.39-23.el5.i386<br />
e2fsprogs-libs-1.39-20.el5.i386<br />
e2fsprogs-libs-1.39-23.el5.i386<br />
ethtool-6-2.el5.i386<br />
ethtool-6-3.el5.i386<br />
gcc-c++-4.1.2-44.el5.i386<br />
gcc-c++-4.1.2-46.el5_4.1.i386<br />
glibc-2.5-34.i686<br />
glibc-2.5-42.i686<br />
iptables-1.3.5-4.el5.i386<br />
iptables-1.3.5-5.3.el5_4.1.i386<br />
iptables-ipv6-1.3.5-4.el5.i386<br />
iptables-ipv6-1.3.5-5.3.el5_4.1.i386<br />
kernel-2.6.18-128.1.10.el5.i686<br />
kernel-2.6.18-92.1.18.el5.i686<br />
kernel-headers-2.6.18-128.1.10.el5.i386<br />
kernel-headers-2.6.18-164.6.1.el5.i386<br />
kpartx-0.4.7-23.el5_3.4.i386<br />
kpartx-0.4.7-30.el5_4.2.i386<br />
krb5-devel-1.6.1-31.el5_3.3.i386<br />
krb5-devel-1.6.1-36.el5.i386<br />
krb5-libs-1.6.1-31.el5_3.3.i386<br />
krb5-libs-1.6.1-36.el5.i386<br />
krb5-workstation-1.6.1-31.el5_3.3.i386<br />
krb5-workstation-1.6.1-36.el5.i386<br />
less-394-5.el5.i386<br />
less-394-6.el5.i386<br />
lftp-3.5.1-2.fc6.i386<br />
lftp-3.7.11-4.el5.i386<br />
libgcc-4.1.2-44.el5.i386<br />
libgcc-4.1.2-46.el5_4.1.i386<br />
libgomp-4.3.2-7.el5.i386<br />
libgomp-4.4.0-6.el5.i386<br />
libselinux-1.33.4-5.1.el5.i386<br />
libselinux-1.33.4-5.5.el5.i386<br />
libselinux-devel-1.33.4-5.1.el5.i386<br />
libselinux-devel-1.33.4-5.5.el5.i386<br />
libsemanage-1.9.1-3.el5.i386<br />
libsemanage-1.9.1-4.4.el5.i386<br />
libsepol-1.15.2-1.el5.i386<br />
libsepol-1.15.2-2.el5.i386<br />
libstdc++-4.1.2-44.el5.i386<br />
libstdc++-4.1.2-46.el5_4.1.i386<br />
libuser-0.54.7-2.1.el5_4.1.i386<br />
libuser-0.54.7-2.el5.5.i386<br />
libX11-1.0.3-11.el5.i386<br />
libX11-1.0.3-9.el5.i386<br />
libxml2-2.6.26-2.1.2.7.i386<br />
libxml2-2.6.26-2.1.2.8.i386<br />
libxml2-python-2.6.26-2.1.2.7.i386<br />
libxml2-python-2.6.26-2.1.2.8.i386<br />
m2crypto-0.16-6.el5.3.i386<br />
m2crypto-0.16-6.el5.6.i386<br />
mysql-5.0.45-7.el5.i386<br />
mysql-5.0.77-3.el5.i386<br />
mysql-devel-5.0.45-7.el5.i386<br />
mysql-devel-5.0.77-3.el5.i386<br />
mysql-server-5.0.45-7.el5.i386<br />
mysql-server-5.0.77-3.el5.i386<br />
neon-0.25.5-10.el5_4.1.i386<br />
neon-0.25.5-10.el5.i386<br />
newt-0.52.2-12.el5_4.1.i386<br />
newt-0.52.2-12.el5.i386<br />
nfs-utils-lib-1.0.8-7.2.z2.i386<br />
nfs-utils-lib-1.0.8-7.6.el5.i386<br />
nscd-2.5-34.i386<br />
nscd-2.5-42.i386<br />
nss-3.12.2.0-4.el5.centos.i386<br />
nss-3.12.3.99.3-1.el5.centos.2.i386<br />
numactl-0.9.8-7.el5.i386<br />
numactl-0.9.8-8.el5.i386<br />
openssl-devel-0.9.8e-12.el5.i386<br />
openssl-devel-0.9.8e-7.el5.i386<br />
pam-0.99.6.2-4.el5.i386<br />
pam-0.99.6.2-6.el5.i386<br />
perl-5.8.8-18.el5_3.1.i386<br />
perl-5.8.8-27.el5.i386<br />
redhat-rpm-config-8.0.45-29.el5.noarch<br />
redhat-rpm-config-8.0.45-32.el5.centos.noarch<br />
rsh-0.17-38.el5.i386<br />
rsh-0.17-40.el5.i386<br />
ruby-1.8.5-5.el5_2.6.i386<br />
ruby-1.8.5-5.el5_3.7.i386<br />
ruby-irb-1.8.5-5.el5_2.6.i386<br />
ruby-irb-1.8.5-5.el5_3.7.i386<br />
samba-client-3.0.33-3.15.el5_4.i386<br />
samba-client-3.0.33-3.7.el5.i386<br />
sqlite-3.3.6-2.i386<br />
sqlite-3.3.6-5.i386<br />
strace-4.5.18-2.el5_3.3.i386<br />
strace-4.5.18-5.el5.i386<br />
tzdata-2009f-1.el5.noarch<br />
tzdata-2009o-2.el5.noarch<br />
udev-095-14.20.el5_3.i386<br />
udev-095-14.21.el5.i386<br />
vim-enhanced-7.0.109-4.el5_2.4z.i386<br />
vim-enhanced-7.0.109-6.el5.i386<br />
vim-minimal-7.0.109-4.el5_2.4z.i386<br />
vim-minimal-7.0.109-6.el5.i386<br />
ypbind-1.19-11.el5.i386<br />
ypbind-1.19-12.el5.i386<br />
yum-metadata-parser-1.1.2-2.el5.i386<br />
yum-metadata-parser-1.1.2-3.el5.centos.i386<br />
</code></p></blockquote>
<p>You need to go through these and remove the outdated package versions, one by one. (If you&#8217;re confused about which is newer, you can run <strong>rpm -qi &lt;packagename&gt;</strong> and see, among other details, the date the package was built.) This should be a safe operation; the package manager reference-counts files, and won&#8217;t remove a file belonging to multiple packages until all of those packages have been removed, even though you should never have multiple packages owning the same file in the first place. I&#8217;m fairly sure that removing these packages manually shouldn&#8217;t trigger the %postun scripts, and that the package manager will figure out that removing one version while you have a newer one installed means it&#8217;s an upgrade instead of an uninstall. If you&#8217;re worried, though, you can do an <strong>rpm -e &#8211;justdb</strong> to remove only the package database entries for the files while not running the scripts or actually removing any files.</p>
<p>Following the removal of the stale packages, a <strong>yum -y upgrade</strong> should fix the remaining issues.</p>
<p>It&#8217;s important to note that the packages do all upgrade &#8212; running an <strong>rpm &#8211;verify</strong> on the package after removing the old version does not result in any checksum mismatches or any other visible strangeness. The old versions simply don&#8217;t get removed from the package manager, which wreaks havoc on your dependency graphs.</p>
<p>I don&#8217;t know what&#8217;s causing the problem, but I think it might have something to do with where the upgrades to rpm/yum are placed in the middle of the transaction. Will report back after the next batch of updates, in which I will update rpm and yum first before proceeding with the remainder of the upgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyhandgrenade.org/blog/2009/11/centos-5-3-to-5-4-upgrade-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
