<?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>ukstokes.com &#187; Enterprise Linux</title>
	<atom:link href="http://ukstokes.com/blog/category/enterprise-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://ukstokes.com/blog</link>
	<description>tech stuff from a tech bloke</description>
	<lastBuildDate>Fri, 02 Jul 2010 22:58:50 +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>Upgrading bugzilla from 3.0.x to 3.4.6</title>
		<link>http://ukstokes.com/blog/2010/05/11/upgrading-bugzilla-from-3-0-x-to-3-4-6/</link>
		<comments>http://ukstokes.com/blog/2010/05/11/upgrading-bugzilla-from-3-0-x-to-3-4-6/#comments</comments>
		<pubDate>Tue, 11 May 2010 21:23:16 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[Bugzilla]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=602</guid>
		<description><![CDATA[A few weeks ago I updated a 3 year old installation of Bugzilla to the most recent version, and made these notes along the way. The Bugzilla online documentation is pretty good and my plan was formed using their docs as a guide. Send advance warning to users Log on to site, edit params and [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I updated a 3 year old installation of Bugzilla to the most recent version, and made these notes along the way. The Bugzilla online documentation is pretty good and my plan was formed using their docs as a guide.</p>
<ul>
<li>Send advance warning to users</li>
<li>Log on to site, edit params and enter some text under 'shutdown site'</li>
<li>Backup db using this commmand</li>
</ul>
<pre class="brush: bash;">mysqldump --opt -u bugs -p bugs &gt; bugs_backup_$(date +%d%m%y).sql</pre>
<ul>
<li>Download and extract bugzilla 3.4.6</li>
</ul>
<pre class="brush: bash;">cd ~
wget http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-3.4.6.tar.gz
tar fvzx bugzilla-3.4.6.tar.gz
cd /var/www/html/
mv bugzilla bugzilla.old
cp -r ~/bugzilla-3.4.6 ./bugzilla
cp -r bugzilla.old/localconfig* bugzilla</pre>
<p>Later you will install the DBD::mysql perl module which requires mysql header files. So if you don't have mysql-devel, install it now. Also the Image::Magick perl module may fail to build from cpan (this is what happened to me), this can be installed by yum as an alternative.</p>
<pre class="brush: bash;">yum install mysql-devel ImageMagick-perl.i386
cd bugzilla
./checksetup.pl</pre>
<p>checksetup.pl will tell you to install missing perl modules using cpan, however this requires an internet connection. I used ntlmaps to proxy through our MS ISA server as my bugzilla server doesn't have Internet access. I got ntlmaps from another server on the network:</p>
<pre class="brush: bash;">scp -r root@bugtest:/root/ntlm* .
cd ntlmaps-0.9.9.0.1
nohup python main.py
export http_proxy=http://localhost:5865
export ftp_proxy=ftp://localhost:5865
cd /var/www/html/bugzilla</pre>
<p>Install optional updates:</p>
<pre class="brush: bash;"># failed  --&gt; /usr/bin/perl install-module.pl Image::Magick
# skipped --&gt; /usr/bin/perl install-module.pl Authen::Radius
/usr/bin/perl install-module.pl SOAP::Lite
/usr/bin/perl install-module.pl TheSchwartz
/usr/bin/perl install-module.pl Daemon::Generic
/usr/bin/perl install-module.pl SOAP::Lite</pre>
<p>Install compulsary updates:</p>
<pre class="brush: bash;">/usr/bin/perl install-module.pl DBD::mysql
/usr/bin/perl install-module.pl CGI
/usr/bin/perl install-module.pl Digest::SHA
/usr/bin/perl install-module.pl DateTime
/usr/bin/perl install-module.pl DateTime::TimeZone
/usr/bin/perl install-module.pl Template
/usr/bin/perl install-module.pl Email::MIME
/usr/bin/perl install-module.pl Email::MIME::Encodings</pre>
<p>I also needed these perl modules, even though they weren't listed by checksetup.pl:</p>
<pre class="brush: bash;">/usr/bin/perl install-module.pl DateTime::Locale
/usr/bin/perl install-module.pl List::MoreUtils</pre>
<p>Finished with ntlmaps now, it can be stopped</p>
<pre class="brush: bash;">kill $(ps x | grep main.py | grep -v grep | awk {'print $1'})
export http_proxy=
export ftp_proxy=</pre>
<p>Run checksetup again, this bit can take some time while the db is upgraded:</p>
<pre class="brush: bash;">./checksetup.pl</pre>
<ul>
<li>Fix any more problems, run again if required.</li>
<li>Once finished log into bugzilla, put maintenance page back up. This option has now moved to Administration</li>
<li>Run sanity check, fix any problems.</li>
<li>Change any css and templates that you lost in the upgrade.</li>
<li>Reopen the site for logons when you are ready.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2010/05/11/upgrading-bugzilla-from-3-0-x-to-3-4-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Managing multiple PuTTys</title>
		<link>http://ukstokes.com/blog/2009/09/09/managing-multiple-puttys/</link>
		<comments>http://ukstokes.com/blog/2009/09/09/managing-multiple-puttys/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 21:21:22 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Putty]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=407</guid>
		<description><![CDATA[I don't have any Linux cluster servers to look after but do manage 2 Linux server farms. They are similar to clusters in that they are both groups of RHEL servers that all have to have an identical config. The larger of these farms is 12 RHEL 5.3 servers, and to roll out changes to [...]]]></description>
			<content:encoded><![CDATA[<p>I don't have any Linux cluster servers to look after but do manage 2 Linux server farms. They are similar to clusters in that they are both groups of RHEL servers that all have to have an identical config. The larger of these farms is 12 RHEL 5.3 servers, and to roll out changes to them all, I wanted to be able to make the change once, and after it was verified, make the same change on the other 11 servers. I started off by writing this script on <em>server1</em>:</p>
<pre class="brush: bash;">#!/bin/sh

echo -n &quot;Enter command to run (on one line): &quot;
read STRING

for SERVER in server2 server3 server4 server5 server6 etc; do

echo -e &quot;\033[1;31m$SERVER says:\033[m&quot;
ssh $SERVER &quot;$STRING&quot;

done

echo -n &quot;Do you want to run the command locally? (y/n) :&quot;
read ANSWER

case &quot;$ANSWER&quot; in

y|Y) echo -e &quot;\033[1;31mlocalhost says:\033[m&quot;; $STRING ;;
N|n) exit 1 ;;
esac</pre>
<p>For this to work I had to create ssh keys on each server using:</p>
<pre class="brush: bash;">ssh-keygen -t dsa</pre>
<p>And then install the newly generated key (~/ssh/id_dsa.pub) into the authorized_keys file on<em> server1</em>. This works for running simple commands one at a time.</p>
<p>For other tasks its sometimes necessary to manage multiple ssh sessions at once, for example to monitor resources using <a href="http://htop.sourceforge.net/">htop</a> or tailing log files. On Linux you can use <a href="http://clusterssh.sourceforge.net/">ClusterSSH</a> (cssh) but this turned out to be a royal pain in the butt to get working on CentOS or RHEL. It worked OK in an Ubuntu VM but was a bit clunky and I felt there would be a better way of managing multiple PuTTy windows, since I am using a Windows 7 laptop for my day-to-day stuff.</p>
<p>There are quite a few goodies for this on the <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/links.html">Links page</a> on the Putty website and this is where I found <a href="http://www.millardsoftware.com/puttycs">Putty Command Sender</a>. Quite simply you type your command into the command sender, and much like clusterssh, it sends it to all the putty windows you have open.</p>
<p style="text-align: center;"><a href="http://ukstokes.com/blog/wp-content/uploads/2009/09/puttys.png" rel="lightbox"><img class="size-medium wp-image-518 aligncenter" title="puttys" src="http://ukstokes.com/blog/wp-content/uploads/2009/09/puttys-300x187.png" alt="puttys" width="300" height="187" /><em><br />
Putty Command Sender</em></a></p>
<p style="text-align: left;">It's not so great for editing files in Vi on 12 servers at once but it is possible - you can send cursor movements as well as lines of code or single commands. The only thing you have to watch out for in PuttyCS is that all Putty windows have updated before you start typing your next command, otherwise the last window to update may miss the first few characters of the next command.</p>
<p style="text-align: left;">Finally to launch my sessions in groups I'm using <a href="http://puttysm.sourceforge.net/">Putty Session Manager</a>. Other alternatives are available but I found this one to be the best. It's lightweight nature fits in with Putty nicely.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2009/09/09/managing-multiple-puttys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install RHEL with Kickstart and no DHCP</title>
		<link>http://ukstokes.com/blog/2009/06/25/install-rhel-with-kickstart-and-no-dhcp/</link>
		<comments>http://ukstokes.com/blog/2009/06/25/install-rhel-with-kickstart-and-no-dhcp/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 12:44:52 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[kickstart]]></category>
		<category><![CDATA[RHEL]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=442</guid>
		<description><![CDATA[I've been installing 16 RHEL 5.3 servers on a DR site, owned by our sister company. There is no DHCP server on the subnet which has stopped us using HP Rapid Deployment Pack to roll out the servers, but it was still possible to use Kickstart, by specifying the IP information as a parameter when booting [...]]]></description>
			<content:encoded><![CDATA[<p>I've been installing 16 RHEL 5.3 servers on a DR site, owned by our sister company. There is no DHCP server on the subnet which has stopped us using HP Rapid Deployment Pack to roll out the servers, but it was still possible to use Kickstart, by specifying the IP information as a parameter when booting from the RHEL CD (disk 1). The syntax goes like this:</p>
<pre class="brush: plain;">boot: linux ks=http://server/kickstart.cfg ksdevice=eth0 ip=xx.xx.xx.xx netmask=xx.xx.xx.xx gateway=xx.xx.xx.xx dns=xx.xx.xx.xx</pre>
<p>DNS servers can be comma separated if you want to specify more than one.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2009/06/25/install-rhel-with-kickstart-and-no-dhcp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set up a &#8216;honeypot&#8217; router using Netfilter (iptables)</title>
		<link>http://ukstokes.com/blog/2009/06/04/set-up-a-honeypot-router-using-netfilter-iptables/</link>
		<comments>http://ukstokes.com/blog/2009/06/04/set-up-a-honeypot-router-using-netfilter-iptables/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 21:06:33 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[netfilter]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=369</guid>
		<description><![CDATA[We're in the process of moving all servers from a legacy flat network to a new server VLAN. Each time a server is moved and is assigned a new IP address, there is a risk that some applications in the building might still try and connect to the server's old IP address rather than the [...]]]></description>
			<content:encoded><![CDATA[<p>We're in the process of moving all servers from a legacy flat network to a new server VLAN. Each time a server is moved and is assigned a new IP address, there is a risk that some applications in the building might still try and connect to the server's old IP address rather than the DNS name. To log any attempts to reach the old IP address I've set up a 'honeypot' router using iptables and CentOS (as a small VMware machine). Each time a server is moved, the old server IP is added to the CentOS machine and and 2 rules are added in the iptables firewall to drop and log the incoming IP connections. The failed connections would usually logged to the console and the 'messages' log file, but alternatively these could be sent to a remote syslog server by specifying:</p>
<pre class="brush: plain;">kern.*        @xx.xx.xx.xx</pre>
<p>in the syslog.conf. In our case we're logging to our Cacti server and using the Cacti syslog plugin (<a href="http://cactiusers.org/downloads/">from here</a>) to view our Linux server and network switch syslogs in a central location.</p>
<p><strong>iptables configuration</strong><br />
In a default installation of CentOS, iptables is already installed and running by default. There are only 2 changes to make; The first is to bind your additional IP address to your network card (usually eth0). This is done by creating a virtual device called eth0:1, by inserting this text into new file etc/sysconfig/network-scripts/<strong>ifcfg-eth0:1 <span style="font-weight: normal;">(10.10.2.17 is the destination address of the incoming traffic that I want to log):</span></strong></p>
<pre class="brush: plain;">IPADDR=10.10.2.17
NETMASK=255.255.0.0</pre>
<p>And then bringing up the virtual device using:</p>
<pre class="brush: plain;">ifconfig eth0:1 up</pre>
<p>In the iptables config file (etc/sysconfig/iptables) I added these lines in the RH-Firewall-1-INPUT chain:</p>
<pre class="brush: plain;">-A RH-Firewall-1-INPUT -d 10.10.2.17 -j LOG --log-level 4 --log-prefix &quot;OLD SRV1&quot;
-A RH-Firewall-1-INPUT -d 10.10.2.17 -j DROP</pre>
<p>Any traffic to 10.10.2.17 will now be logged in messages and the lines will be prefixed with "OLD SRV1".</p>
<p><em>Note about file paths:</em> I'm getting an odd error when posting Linux file paths in WordPress - putting a leading / in the path gives a 404 error. The paths I mentioned above should have a leading forwardslash "/".</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2009/06/04/set-up-a-honeypot-router-using-netfilter-iptables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get system stats automatically on SSH login</title>
		<link>http://ukstokes.com/blog/2009/04/10/get-system-stats-automatically-on-ssh-login/</link>
		<comments>http://ukstokes.com/blog/2009/04/10/get-system-stats-automatically-on-ssh-login/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 22:22:46 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Bash scripting]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=126</guid>
		<description><![CDATA[I noticed in recent versions of Ubuntu you get some system stats in a banner message when you connect using SSH. I thought this was pretty useful so have implemented my own version on our Red Hat servers at work. This runs every 5 minutes as a cron job and updates the file /etc/motd (Message [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed in recent versions of Ubuntu you get some system stats in a banner message when you connect using SSH. I thought this was pretty useful so have implemented my own version on our Red Hat servers at work.</p>
<p>This runs every 5 minutes as a cron job and updates the file /etc/motd (Message Of The Day) which is shown when a user logs in. Our servers already have a 5 line banner message with information including the server name and purpose of the server, hence the first 5 lines being saved and readded into a new /etc/motd each time.</p>
<pre><code>
<pre class="brush: bash;">#!/bin/bash
cat /etc/motd | head -n 5 &gt; /tmp/file &amp;&amp; cat /tmp/file &gt; /etc/motd

CPUTIME=$(ps -eo pcpu | awk 'NR&gt;1' | awk '{tot=tot+$1} END {print tot}')
CPUCORES=$(cat /proc/cpuinfo | grep -c processor)

echo &quot;System summary (collected `date`)

 - CPU Usage (total average) = `echo $CPUTIME / $CPUCORES | bc`%
 - Memory free (real)        = `free -m | head -n 2 | tail -n 1 | awk {'print $4'}` Mb
 - Memory free (cache)       = `free -m | head -n 3 | tail -n 1 | awk {'print $3'}` Mb
 - Swap in use               = `free -m | tail -n 1 | awk {'print $3'}` Mb
&quot; &gt;&gt; /etc/motd</pre>
<p></code></pre>
<p>Now when we log in we get a summary like this:</p>
<p><img src="http://ukstokes.com/images/stats.png" alt="SSH Server Stats" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2009/04/10/get-system-stats-automatically-on-ssh-login/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Logical Volumes</title>
		<link>http://ukstokes.com/blog/2009/04/01/working-with-logical-volumes/</link>
		<comments>http://ukstokes.com/blog/2009/04/01/working-with-logical-volumes/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 21:20:48 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Logical Volumes]]></category>
		<category><![CDATA[LVM]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=221</guid>
		<description><![CDATA[I'm actually coming around to Linux LVM - once you get the hang of the concepts and the associated commands it can be a straightforward exercise to extend your existing volumes after adding new physical disks. This differs from software RAID, as you have the ability to lay an LVM filesystem over a single disk [...]]]></description>
			<content:encoded><![CDATA[<p>I'm actually coming around to Linux LVM - once you get the hang of the concepts and the associated commands it can be a straightforward exercise to extend your existing volumes after adding new physical disks. This differs from software RAID, as you have the ability to lay an LVM filesystem over a single disk and later take advantage of the LVM commands to resize your volumes if you so desire.</p>
<p>I recently was confronted with a VM that was out of space on /usr/local. The filesystem was already using LVM so I just added a new virtual disk and stretched the /usr/local volume over the new disk. The whole process is even easier in VMware as you can add the new disk while the machine is running and run through the whole process without a reboot, providing you don't have daemons or processes running in /usr/local that stop it from being unmounted. Here's how I did it:</p>
<pre class="brush: plain;">init 1
umount /usr/local</pre>
<p>Going to runlevel 1 may not always be necessary but was in my case.<strong> pvcreate </strong>enables the new physical disk for use with LVM. Then <strong>vgextend </strong>extends the volume group, and <strong>lvresze</strong> resizes the logical volume. In my case the new disk that was added became known to the system as /dev/sdc.</p>
<pre class="brush: plain;">pvcreate /dev/sdc
vgextend VolGroup00 /dev/sdc
lvresize /dev/VolGroup/lvol0 -L 12.7G</pre>
<p>Then use <strong>resize2fs </strong>to extend the file system into the free space. You are required to fun a filesystem check first.</p>
<pre class="brush: plain;">e2fsck -f /dev/VolGroup/lvol0
resize2fs /dev/VolGroup00/lvol0 12700M
mount -a
init 3</pre>
<p>In my example the previous size was 7.7Gb, I added a 5Gb disk and extended to 12.7Gb.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2009/04/01/working-with-logical-volumes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resize swap partitions on Red Hat Linux</title>
		<link>http://ukstokes.com/blog/2008/08/12/resize-swap-partitions-on-red-hat-linux/</link>
		<comments>http://ukstokes.com/blog/2008/08/12/resize-swap-partitions-on-red-hat-linux/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 20:58:49 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Red Hat]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=99</guid>
		<description><![CDATA[First of all a little disclaimer - although I've done this a few times and never had any problems, one should never consider resizing partitions a completely foolproof exercise. Things can go wrong. With regards to swap though, don't worry if your swap partition is destroyed as this will not harm your system - most [...]]]></description>
			<content:encoded><![CDATA[<p>First of all a little disclaimer - although I've done this a few times and never had any problems, one should never consider resizing partitions a completely foolproof exercise. Things can go wrong. With regards to swap though, don't worry if your swap partition is destroyed as this will not harm your system - most healthy systems will not ever need swap and unlike Windows, Linux only starts using swap when it needs it and can quite easily survive without it. You can trash it and format it as many times as you like <span style="text-decoration: underline;">as long as it's not in use</span>. And of course take backups of any important data first!</p>
<p><strong>Resize swap partition in Red Hat Linux</strong></p>
<ul>
<li>Is your swap on a logical volume (LVM)? If so then skip below to the LVM section. If not then read on:</li>
<li>Download gparted (<a href="http://gparted.sourceforge.net/" target="_self">Gnome Partition Manager</a>), burn the iso and then boot into it.</li>
<li>Gparted will identify the filesystems on each partition so your target will be clearly labelled as swap.</li>
<li>Reize your partitions as required. Try to minimise the overall number of resize and move operations as this can take several hours to complete.</li>
</ul>
<p>When you reboot swap not be enabled - if you check using <strong>top</strong> (or <strong>htop</strong>) or <strong>free -m</strong>, you will see 0 mb of swap available. The reason for this is the UUID of the partition changed when it was resized by GParted, and this confuses the system when it tries to mount the volumes in /etc/fstab. The solution is to relabel your swap partition, by reformatting it as swap and specifying the correct label.</p>
<pre class="brush: plain;">fdisk -l | grep swap</pre>
<p>Note down the device name of your swap partition. e.g:</p>
<pre class="brush: plain;">/dev/cciss/c0d0p3 1926 3837 15358140 82 Linux swap</pre>
<p>Make a note of the label for the swap partition from fstab:</p>
<pre class="brush: plain;">cat /etc/fstab | grep swap</pre>
<p>e.g.</p>
<pre class="brush: plain;">LABEL=SW-cciss/c0d0p3 swap</pre>
<p>Now format your partition as swap, specifiying the label exactly as shown in the fstab.</p>
<pre class="brush: plain;">mkswap /dev/cciss/c0d0p3 -L SW-cciss/c0d0p3</pre>
<p>You can then enable the swap space straight away by using <strong>swapon </strong><em>devicename</em>, or just reboot and check with<strong> free -m</strong> again, and all should be ok.</p>
<p><strong>Resizing swap on LVM</strong><br />
If your swap partition is on a logical volume it can be resized without rebooting your system. However you will need free space to extend into, if you do not have free space you will need to shrink another volume or add another physical disk into your volume group (see <a href="http://ukstokes.com/blog/2009/04/01/working-with-logical-volumes/">this post</a> which explains how to do this).</p>
<pre class="brush: plain;">cat /etc/fstab | grep swap
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0</pre>
<p><strong>lvdisplay </strong>will show you the size of your logical volume:</p>
<pre class="brush: plain;">lvdisplay /dev/VolGroup00/LogVol01

--- Logical volume ---
LV Name                /dev/VolGroup00/LogVol01
VG Name                VolGroup00
LV UUID                RVIFz3-B8kp-z9KV-JYtG-N997-JOQ6-ETaJaJ
LV Write Access        read/write
LV Status              available
# open                 1
LV Size                512.00 MB
Current LE             24
Segments               1
Allocation             inherit
Read ahead sectors     0
Block device           253:1</pre>
<p>To resize an LVM you need to unmount it, or in this case <strong>swapoff</strong>.</p>
<pre class="brush: plain;">swapoff /dev/VolGroup00/LogVol01</pre>
<p>Resizing the volume to 768Mb (assuming you have the space to extend into)</p>
<pre class="brush: plain;">lvresize /dev/VolGroup00/LogVol01 -L 768M
Extending logical volume LogVol01 to 768.00 MB
Logical volume LogVol01 successfully resized

swapon /dev/VolGroup00/LogVol01
free -m
total       used       free     shared    buffers     cached
Mem:           375        343         32          0         48        120
-/+ buffers/cache:        174        201
Swap:          767          0        767</pre>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2008/08/12/resize-swap-partitions-on-red-hat-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Oracle RAC, CentOS and GFS</title>
		<link>http://ukstokes.com/blog/2008/06/24/oracle-rac-centos-and-gfs/</link>
		<comments>http://ukstokes.com/blog/2008/06/24/oracle-rac-centos-and-gfs/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 21:54:31 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=96</guid>
		<description><![CDATA[One thing I'm currently working on is a 2 node CentOS cluster using GFS as the shared file system, with the storage on a fibre attached HP MSA SAN. This is a proof of concept before investing in RHEL AS licences (which will be the better part of £2000). CentOS is free and is intended to clone RHEL as closly [...]]]></description>
			<content:encoded><![CDATA[<p>One thing I'm currently working on is a 2 node CentOS cluster using GFS as the shared file system, with the storage on a fibre attached HP MSA SAN. This is a proof of concept before investing in RHEL AS licences (which will be the better part of £2000). CentOS is free and is intended to clone RHEL as closly as possible, removing the Red Hat branding and of course professional support. The cluster suite and GFS are available in CentOS as they are both open source.</p>
<p>The hardware I am using is 2 HP DL580 G4 servers with 12GB of RAM, Qlogic HBA's, and an MSA1000 SAN. I'm using <a href="http://www.redhat.com/docs/manuals/csgfs/Oracle_GFS-en-US/ch_Installation_Cluster_Suite4.html">this guide</a> on Red Hat's website and have been making my own notes along the way. I've got as far as installing cluster suite on one node but I'm unable to choose the grand unified lock manager as it doesn't appear as an option. I expect this may take a bit of reading to get working ... I'll post a mini howto here when I make some decent progress.</p>
<p>A while ago I undertook a similar exercise and had problems getting the HP ACU to see the SAN under Red Hat, I had to get HP involved as there were specific versions of the kernel and drivers required for it to work properly. I've noticed I have the same problem time time, but now I am on CentOS and it's the x64bit version, so it looks like I will have to experiment with driver versions and see what I can get to work without any support this time.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2008/06/24/oracle-rac-centos-and-gfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Red Hat Summit 2008 &#8211; closing post</title>
		<link>http://ukstokes.com/blog/2008/06/20/red-hat-summit-2008-closing-post/</link>
		<comments>http://ukstokes.com/blog/2008/06/20/red-hat-summit-2008-closing-post/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 21:43:31 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Red Hat]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=95</guid>
		<description><![CDATA[In short - it's been good, a valuable use of my time. The presentation throughout the summit was of a very high standard, and this included the catering too. If I had to summarise the summit I would do so using the following 5 buzzwords: 1. Virtualisation. Guess what ...? Red Hat has their own [...]]]></description>
			<content:encoded><![CDATA[<p>In short - it's been good, a valuable use of my time. The presentation throughout the summit was of a very high standard, and this included the catering too.</p>
<p>If I had to summarise the summit I would do so using the following 5 buzzwords:</p>
<p><strong>1. Virtualisation</strong>. Guess what ...? Red Hat has their own virtualisation product. It looks very promising but if I am brutally honest (and Red Hat would kill me for saying this), they are pretty much in the same boat as Microsoft. By that I mean they are leagues behind what VMWare are offering right now. But it wasn't just Red Hat banging on about virtualisation. All the vendors in the exhibition hall were touting their products with the big V in mind.</p>
<p><strong>2. Green/Energy saving</strong>. Everyone is working towards making their products consume less energy, while giving the user much more back. Red Hat and intel are working towards more closely unifying hardware and software, so that their OS can have much greater control of how much power a device on the system should consume.</p>
<p><strong>3. Cloud computing</strong>. Everyone was talking about this. Offload your computing power to other computers in the cloud when you have extreme amounts of processing to do. It's a bit like clustering except you only dip into the cloud when you need to, and the computers in the cloud don't have to be on your network.</p>
<p><strong>4. Red Hat Satellite</strong>. A lot of the speakers talked about how they use Satellite to administer their Red Hat servers. And of course there was the big announcement about Spacewalk.</p>
<p><strong>5. Open Source.</strong> Red Hat love talking about it and they are very proud about being open source. They even talked about the importance of CentOS and Ubuntu, which surprised me! Moreover, I was astonished that CentOS will be a supported product by Spacewalk. When questioned about Ubuntu, the reply was Ubuntu is not a rival of Red Hat ... as it's going to take more than one player to topple Microsoft!</p>
<p>I'm off home now, but first I'm due a visit to the duty free shop for an extremely large bottle of whisky. Thank you very much HP (but sorry, I'm not keeping the t-shirt) <img src='http://ukstokes.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2008/06/20/red-hat-summit-2008-closing-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spacewalk &#8211; Red Hat Satellite for free!</title>
		<link>http://ukstokes.com/blog/2008/06/19/spacewalk-red-hat-satellite-for-free/</link>
		<comments>http://ukstokes.com/blog/2008/06/19/spacewalk-red-hat-satellite-for-free/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 23:53:48 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=94</guid>
		<description><![CDATA[Red Hat have made another important announcement at this years Summit - RH Satellite has been made open source! At first I was excited, because: Red Hat customers can save hundreds of dollars as it's now free - you don't have to buy an RHAS licence for a RH Satellite (that is, unless you want [...]]]></description>
			<content:encoded><![CDATA[<p>Red Hat have made another important announcement at this years Summit - <a href="http://www.redhat.com/spacewalk/">RH Satellite has been made open source</a>! At first I was excited, because:</p>
<ul>
<li>Red Hat customers can save hundreds of dollars as it's now free - you don't have to buy an RHAS licence for a RH Satellite (that is, unless you want support for it).</li>
<li>You can run it on Fedora!</li>
<li>Community users can add to the code and make it better. By this I mean they can (and will) fix bugs and add enhancements.</li>
<li>This is beneficial for Red Hat as these improvements can (and will in due course) be loaded back into the paid RHAS Satellite packages.</li>
</ul>
<p><strong>BUT</strong> .... what you can't do with Spacewalk is update RHEL systems with it - you can only use it to manage  Fedora and CentOS systems for now (<a href="http://www.redhat.com/spacewalk/faq.html#entitlements">according to the FAQ</a>). So it's no use to me at the moment as we're a Red Hat shop only .... I guess I'll be waiting for my RHAS system after all.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2008/06/19/spacewalk-red-hat-satellite-for-free/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
