<?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>Walker News &#187; RHEL</title>
	<atom:link href="http://www.walkernews.net/tag/rhel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.walkernews.net</link>
	<description>A capsule of walker's experience in life...</description>
	<lastBuildDate>Tue, 07 Sep 2010 15:53:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Red Hat Enterprise Linux Swap Size Recommendation</title>
		<link>http://www.walkernews.net/2010/05/02/red-hat-enterprise-linux-swap-size-recommendation/</link>
		<comments>http://www.walkernews.net/2010/05/02/red-hat-enterprise-linux-swap-size-recommendation/#comments</comments>
		<pubDate>Sun, 02 May 2010 15:22:34 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=4468</guid>
		<description><![CDATA[How much the size of Linux swap partition should be allocated? ]]></description>
			<content:encoded><![CDATA[Are you looking for the recommended Linux swap partition size for a server with huge amount of RAM installed? Well, I have just stumbled upon one of such recommendation from RHEL documentation while I was actually looking for reference of previous topic.<br />
<span id="more-4468"></span><br />
Some of you, especially the veterans, might know there is this good old formula that suggest swap space size should be at least 1.5 times (some even said 2 times) of the RAM installed.<br />
<br />Nowadays, most of the brand new servers easily come with few tens to hundred gigabytes of RAM installed. Apparently, the required Linux swap file system size will be darn huge if to apply this formula and you wonder is this really needed and justified.<br />
<br />With reference to <a href="http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.5/html/Installation_Guide/ch04s19s04s02.html" target="_blank">RHEL 5.5 installation guide</a>, the new study suggests that the amount of swap space needed by a system is much depends on the memory workload running on that system.<br />
<br />This sound reasonable but not practical, as it is not easy to gauge memory workload before the system is running. Thus, the RHEL engineers suggest their own recommended swap space:<br />
<ul>
<li>Min. 2GB of swap space for system installed with 4GB of RAM or less</li>
<li>Min. 4GB of swap space for system installed with 4GB to 16GB of RAM</li>
<li>Min. 8GB of swap space for system installed with 16GB to 64GB of RAM</li>
<li>Min. 16GB of swap space for system installed with 64GB to 256GB of RAM</li>
<li>Min. 32GB of swap space for system installed with 256GB to 512GB of RAM</li>
</ul>
<br />In addition, the swap space should be spanned across multiple disk drives for the performance&#8217;s sake. <br />
<br />Although the reference is made for RHEL 5.5 running on x86, AMD64, and Intel64 system, I think it is worth for reference or applied with little adjustment if you&#8217;re not working with RHEL. But for CentOS users, you probably know that this reference should works too :-)<br />
<ul class="related_post"><li><a href="http://www.walkernews.net/2009/05/11/how-to-use-putty-generated-rsa-key-to-login-linux-openssh-server/" title="How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?">How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?</a></li><li><a href="http://www.walkernews.net/2009/04/06/how-to-fix-scp-and-ssh-login-prompt-is-very-slow-in-linux/" title="How To Fix: SCP And SSH Login Prompt Is Very Slow In Linux">How To Fix: SCP And SSH Login Prompt Is Very Slow In Linux</a></li><li><a href="http://www.walkernews.net/2009/02/08/using-ibm-db2-monitoring-tool-db2pd-to-document-database-server-profile/" title="Using IBM DB2 Monitoring Tool db2pd To Document Database Server Profile">Using IBM DB2 Monitoring Tool db2pd To Document Database Server Profile</a></li><li><a href="http://www.walkernews.net/2008/07/05/how-to-read-iso-image-file-in-linux/" title="How To Read ISO Image File In Linux">How To Read ISO Image File In Linux</a></li><li><a href="http://www.walkernews.net/2010/09/01/shortcut-to-remove-installed-application-from-nokia-5800-or-s60v5/" title="Shortcut To Remove Installed Application From Nokia 5800 Or S60v5">Shortcut To Remove Installed Application From Nokia 5800 Or S60v5</a></li><li><a href="http://www.walkernews.net/2010/08/30/how-to-display-sound-or-speaker-icon-in-windows-7-notification-area/" title="How To Display Sound Or Speaker Icon In Windows 7 Notification Area?">How To Display Sound Or Speaker Icon In Windows 7 Notification Area?</a></li><li><a href="http://www.walkernews.net/2010/08/16/windows-7-tip-add-playlists-to-windows-media-player-jump-list/" title="Windows 7 Tip: Add Playlists To Windows Media Player Jump List">Windows 7 Tip: Add Playlists To Windows Media Player Jump List</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2010/05/02/red-hat-enterprise-linux-swap-size-recommendation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Find The Lost RHEL5 Installation Number?</title>
		<link>http://www.walkernews.net/2010/05/02/how-to-find-the-lost-rhel5-installation-number/</link>
		<comments>http://www.walkernews.net/2010/05/02/how-to-find-the-lost-rhel5-installation-number/#comments</comments>
		<pubDate>Sun, 02 May 2010 10:51:18 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[OS]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[RHEL]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=4461</guid>
		<description><![CDATA[You may able to find the installation number from Red Hat Enterprise Linux 5 system itself if you lost it for whatever reasons.]]></description>
			<content:encoded><![CDATA[Let&#8217;s say a brand new Dell server preinstalled RHEL 5.5 with a valid subscription number (a.k.a. installation number or registration number) has just been delivered to SA team.<br />
<span id="more-4461"></span><br />
Then, the developers (users of that new machine) require Red Hat Enterprise Linux to be reinstalled (for whatever reasons).<br />
<br />You, as one of the Linux system administrator, found out that the RHEL 5 installation number is missing or misplaced at somewhere. Oh no, God knows they (the developers, and maybe your teammate) will have all fingers pointing to you.<br />
<br /><span class="subhead2">The trick to recover the lost RHEL installation number</span><br />
<br />This trick MAY or may NOT work. Since this DELL server is known to have preinstalled RHEL 5.5 with a valid subscription number, the chance to recover RHEL installation number is high:<br />
<br />1) Login to the system as root<br />
<br />2) Change directory to /etc/sysconfig/rhn and uses cat command to display the install-num file. Alternatively, you can just cat the file as this:<br />
<pre>
cat /etc/sysconfig/rhn/install-num
</pre>
<br />According to <a href="http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/release-notes/RELEASE-NOTES-ia64-en.html" target="_blank">RHEL 5 Release Notes</a>, the installation number is saved in /etc/sysconfig/rhn/install-num, if entered during RHEL installation. This install-num file is referred by rhn_register when registering with Red Hat Network.<br />
<ul class="related_post"><li><a href="http://www.walkernews.net/2009/05/11/how-to-use-putty-generated-rsa-key-to-login-linux-openssh-server/" title="How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?">How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?</a></li><li><a href="http://www.walkernews.net/2009/04/06/how-to-fix-scp-and-ssh-login-prompt-is-very-slow-in-linux/" title="How To Fix: SCP And SSH Login Prompt Is Very Slow In Linux">How To Fix: SCP And SSH Login Prompt Is Very Slow In Linux</a></li><li><a href="http://www.walkernews.net/2009/03/07/how-to-create-volume-group-and-file-system-with-lvm2-in-linux/" title="How To Create Volume Group And File System With LVM2 In Linux?">How To Create Volume Group And File System With LVM2 In Linux?</a></li><li><a href="http://www.walkernews.net/2009/02/08/using-ibm-db2-monitoring-tool-db2pd-to-document-database-server-profile/" title="Using IBM DB2 Monitoring Tool db2pd To Document Database Server Profile">Using IBM DB2 Monitoring Tool db2pd To Document Database Server Profile</a></li><li><a href="http://www.walkernews.net/2008/07/06/how-to-create-iso-image-of-directory-or-filesystem-in-linux/" title="How To Create An ISO Image Of Directory / Filesystem In Linux">How To Create An ISO Image Of Directory / Filesystem In Linux</a></li><li><a href="http://www.walkernews.net/2008/07/05/how-to-read-iso-image-file-in-linux/" title="How To Read ISO Image File In Linux">How To Read ISO Image File In Linux</a></li><li><a href="http://www.walkernews.net/2008/03/01/excel-trend-line-to-predict-db2-tablespaces-free-page/" title="Excel Trend Line To Predict DB2 Tablespaces Free Page">Excel Trend Line To Predict DB2 Tablespaces Free Page</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2010/05/02/how-to-find-the-lost-rhel5-installation-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?</title>
		<link>http://www.walkernews.net/2009/05/11/how-to-use-putty-generated-rsa-key-to-login-linux-openssh-server/</link>
		<comments>http://www.walkernews.net/2009/05/11/how-to-use-putty-generated-rsa-key-to-login-linux-openssh-server/#comments</comments>
		<pubDate>Sun, 10 May 2009 16:28:04 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[Putty]]></category>
		<category><![CDATA[Puttygen]]></category>
		<category><![CDATA[Remote Access]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=2601</guid>
		<description><![CDATA[You have to make changes to Putty-generated RSA public key in order to remotely access Linux server over SSH protocol.]]></description>
			<content:encoded><![CDATA[In order for Windows users to remotely login Linux servers via SSH protocol, I suggest the Putty freeware (a SSH client for Windows that is also supporting legacy, insecure telnet and rlogin protocol).<br />
<span id="more-2601"></span><br />
<!--wgadh-->For the sake of better security, most system administrators enforce SSH authentication over Public-key cryptography based on RSA algorithm.<br />
<br />(Sounds complicated and high-tech? No worry. You don&#8217;t have to know all these scary terms to make this trick works &#8211; engineer is applying what the scientists have found).<br />
<br />So, <span class="subhead">How to use Putty-based RSA public-key with OpenSSH server?</span><br />
<br />The public-key generated by Puttygen is not compatible with the one generated by OpenSSH.<br />
<br />However, you can manually modify the Putty-based public key before appending it to authorized_keys file:<br />
<br />1) Open Puttygen (Putty Key Generator), click Generate button and move the mouse cursor randomly within the <span class="subhead2">key</span> section/frame to create the key with default settings (e.g. SSH-2 RSA  of 1024 bits).<br />
<br />2) When the key generation completes, create a strong passphrase in the text box provided.<br />
<br />3) Then, click save Public Key and Save Private Key button, one after another, to save the pair of key to local hard disk.<br />
<br />4) Transfer the Puttygen-created public key to Linux server (in my test case, it&#8217;s RHEL 5.2).<br />
<br />Let&#8217;s say this public key is only meant for Walker user account, save that public key in Walker&#8217;s $HOME/.ssh directory.<br />
<br />5) Open the Putty public key with Vi editor (any text editor of your choice):<br />
<ul>
<li>Delete the lines initial with four dash and &#8220;Comment&#8221;.</li>
<li>Join the remain lines into one, single line.</li>
<li>Initial that single line with <code>ssh-rsa </code> keyword (a space at the end).</li>
</ul>
<br />Not get it? Take a look at my &#8220;silent&#8221; screencast:<br />
<br /><object width="500" height="405"><param name="movie" value="http://www.youtube-nocookie.com/v/j7N7n_VqeJI&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999&#038;border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/j7N7n_VqeJI&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999&#038;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object><br />

<ul class="related_post"><li><a href="http://www.walkernews.net/2009/05/03/how-to-create-putty-based-rsa-public-key-for-openssh-server/" title="How To Create Putty-based RSA Public-key For OpenSSH Server?">How To Create Putty-based RSA Public-key For OpenSSH Server?</a></li><li><a href="http://www.walkernews.net/2009/03/22/how-to-fix-server-refused-our-key-error-that-caused-by-putty-generated-rsa-public-key/" title="How To Fix &#8220;Server Refused Our Key&#8221; Error That Caused By Putty Generated RSA Public Key?">How To Fix &#8220;Server Refused Our Key&#8221; Error That Caused By Putty Generated RSA Public Key?</a></li><li><a href="http://www.walkernews.net/2009/05/02/how-to-regenerate-putty-based-rsa-public-key-from-its-private-key/" title="How To Regenerate Putty-based RSA Public-key From Its Private-key?">How To Regenerate Putty-based RSA Public-key From Its Private-key?</a></li><li><a href="http://www.walkernews.net/2009/04/06/how-to-fix-scp-and-ssh-login-prompt-is-very-slow-in-linux/" title="How To Fix: SCP And SSH Login Prompt Is Very Slow In Linux">How To Fix: SCP And SSH Login Prompt Is Very Slow In Linux</a></li><li><a href="http://www.walkernews.net/2008/06/06/how-to-setup-non-interactive-ssh-login/" title="How To Setup Non-Interactive SSH Login">How To Setup Non-Interactive SSH Login</a></li><li><a href="http://www.walkernews.net/2008/06/05/configure-putty-to-support-password-less-ssh-login/" title="Configure Putty To Support Password-less SSH Login">Configure Putty To Support Password-less SSH Login</a></li><li><a href="http://www.walkernews.net/2009/03/18/how-to-allow-root-login-to-telnet-server-in-linux/" title="How To Allow Root Login To Telnet Server In Linux?">How To Allow Root Login To Telnet Server In Linux?</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2009/05/11/how-to-use-putty-generated-rsa-key-to-login-linux-openssh-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Fix: SCP And SSH Login Prompt Is Very Slow In Linux</title>
		<link>http://www.walkernews.net/2009/04/06/how-to-fix-scp-and-ssh-login-prompt-is-very-slow-in-linux/</link>
		<comments>http://www.walkernews.net/2009/04/06/how-to-fix-scp-and-ssh-login-prompt-is-very-slow-in-linux/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 15:48:11 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[SCP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=2332</guid>
		<description><![CDATA[Do you know what causes the SSH or SCP slow login prompt problem? Check this out.]]></description>
			<content:encoded><![CDATA[Apparently, today is not a good day for me. But it&#8217;s not too bad too as I still have enough fingers to count all these bad incidents :-)<br />
<span id="more-2332"></span><br />
OK, back to topic. How to find out that what cause the SSH or SCP login prompt to slowdown? How could you fix this so-called slow or delayed SSH and SCP login prompt?<br />
<br /><!--wgadh-->This is one of the &#8220;bad incident&#8221; happened on me today &#8211; as the boss was looking at me to scp program patches to a remote Linux-based application server, the SSH login prompt took more than <span class="subhead2">1 minute</span> to appear on screen.<br />
<br />To be precise, the stopwatch showed that it took exactly 1 minute and 25 seconds to display SSH login prompt!<br />
<br />Luckily, I do not have to Google for more than a minute to find the cause and solution :-)<br />
<br /><span class="subhead">What causes SCP and SSH login prompt to slowdown?</span> <br />
<br />For my case, the GSSAPI authentication feature was causing the delayed SSH login prompt!<br />
<br />You can confirm the causes of your case by using the -v option switch. For example, the following is the verbose response of SSH login process started with -v option:<br />
<pre>
dev01 [/home/devstl]$ ssh <span style="color:#FF6666;">-v</span> appssupp@10.50.100.111
......
......
......
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: Next authentication method: publickey
debug1: Trying private key: /home/devstl/.ssh/identity
debug1: Trying private key: /home/devstl/.ssh/id_rsa
debug1: Trying private key: /home/devstl/.ssh/id_dsa
debug1: Next authentication method: password
appssupp@10.50.100.111's password:
</pre>
<br /><span class="subhead">How to fix SCP and SSH delayed login prompt?</span><br />
<br />The answer for my case is apparently by disabling GSSAPI authentication, which can be done in one of these three ways:<br />
<blockquote><br />
The &#8220;fix&#8221; is tested with SSH clients installed by <span class="fpath">openssh-clients-3.9p1-8.RHEL4.15</span> RPM file.
<br /></blockquote>
<br />1) Specify the option to disable GSSAPI authentication when using SSH or SCP command, e.g.:<br />
<pre>
ssh <span style="color:#FF6666;">-o GSSAPIAuthentication=no</span> appssupp@10.50.100.111
</pre>
<br />2) Explicitly disable GSSAPI authentication in SSH client program configuration file, i.e. edit the <span class="fpath">/etc/ssh/ssh_config</span> and add in this configuration (if it&#8217;s not already in the config file):<br />
<pre>
GSSAPIAuthentication no
</pre>
<br />3) Create a file called <span class="fpath">config</span> in .ssh directory of respective user home directory (or whichever user home directory that need to get rid of this show login prompt). For example, edit <span class="fpath">/home/devstl/.ssh/config</span> (create the config file if it&#8217;s not currently exist) and add in the <code>GSSAPIAuthentication no</code> option.<br />
<blockquote><br />
1) <span class="fpath">/etc/ssh/ssh_config</span> is a global SSH client configuration file that affects all system users who are using SSH client programs.<br />
<br />2) <span class="fpath">/home/devstl/.ssh/config</span> is local SSH client configuration file that only affects the user account called devstl. Whatever SSH client options specified in this local file overwrite the options stated in global SSH client configuration file.
<br /></blockquote>
<br />After disabling GSSAPI authentication, SSH login prompt is back to &#8220;normal&#8221; now:<br />
<pre>
dev01 [/home/devstl]$ ssh <span style="color:#FF6666;">-v</span> appssupp@10.50.100.111
......
......
......
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/devstl/.ssh/identity
debug1: Trying private key: /home/devstl/.ssh/id_rsa
debug1: Trying private key: /home/devstl/.ssh/id_dsa
debug1: Next authentication method: password
appssupp@10.50.100.111's password:
</pre>
<br />As you can see, the SSH login is not currently authenticated via public key cryptography method, which I&#8217;ve to fix it later :-(<br />

<ul class="related_post"><li><a href="http://www.walkernews.net/2009/05/11/how-to-use-putty-generated-rsa-key-to-login-linux-openssh-server/" title="How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?">How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?</a></li><li><a href="http://www.walkernews.net/2009/05/03/how-to-create-putty-based-rsa-public-key-for-openssh-server/" title="How To Create Putty-based RSA Public-key For OpenSSH Server?">How To Create Putty-based RSA Public-key For OpenSSH Server?</a></li><li><a href="http://www.walkernews.net/2009/05/02/how-to-regenerate-putty-based-rsa-public-key-from-its-private-key/" title="How To Regenerate Putty-based RSA Public-key From Its Private-key?">How To Regenerate Putty-based RSA Public-key From Its Private-key?</a></li><li><a href="http://www.walkernews.net/2009/03/22/how-to-fix-server-refused-our-key-error-that-caused-by-putty-generated-rsa-public-key/" title="How To Fix &#8220;Server Refused Our Key&#8221; Error That Caused By Putty Generated RSA Public Key?">How To Fix &#8220;Server Refused Our Key&#8221; Error That Caused By Putty Generated RSA Public Key?</a></li><li><a href="http://www.walkernews.net/2009/03/18/how-to-allow-root-login-to-telnet-server-in-linux/" title="How To Allow Root Login To Telnet Server In Linux?">How To Allow Root Login To Telnet Server In Linux?</a></li><li><a href="http://www.walkernews.net/2008/06/06/how-to-setup-non-interactive-ssh-login/" title="How To Setup Non-Interactive SSH Login">How To Setup Non-Interactive SSH Login</a></li><li><a href="http://www.walkernews.net/2009/04/03/how-to-restart-vnc-server-after-vnc-service-hangs-or-stops-unexpectedly/" title="How To Restart VNC Server After VNC Service Hangs or Stops Unexpectedly?">How To Restart VNC Server After VNC Service Hangs or Stops Unexpectedly?</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2009/04/06/how-to-fix-scp-and-ssh-login-prompt-is-very-slow-in-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To Create Volume Group And File System With LVM2 In Linux?</title>
		<link>http://www.walkernews.net/2009/03/07/how-to-create-volume-group-and-file-system-with-lvm2-in-linux/</link>
		<comments>http://www.walkernews.net/2009/03/07/how-to-create-volume-group-and-file-system-with-lvm2-in-linux/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 09:43:32 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[3-Minutes]]></category>
		<category><![CDATA[Disk Management]]></category>
		<category><![CDATA[Dummy]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[RHEL]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=2046</guid>
		<description><![CDATA[This is another attempt to document a simple guide, about how to create a new Volume Group and build a new file system on a Logical Volume, base on Red Hat Enterprise Linux 4 and LVM2 toolkits.]]></description>
			<content:encoded><![CDATA[<a href="http://www.walkernews.net/2007/02/27/extend-lvm-disk-space-with-new-hard-disk/" title="How to extend the size of a LVM Volume Group with more hard disk?" rel="bookmark">LVM</a>, shorts for Logical Volume Management, is available in most modern Linux distributions. If I recall correctly, the disk layout for file systems of Red Hat Enterprise Linux 4 default installation is based on Logical Volume Management.<br />
<span id="more-2046"></span><br />
<!--wgadh-->As the name implies, <a href="http://www.walkernews.net/2007/07/02/how-to-create-linux-lvm-in-3-minutes/" title="How to create a new Linux volume group in 3-minutes?" rel="bookmark">LVM</a> is a software technique to consolidate a group multiple block devices (hard disk or disk partition) and present them to OS as a single disk volume. In other words, system administrator can build or create a 500GB file system with 2 units of 250GB hard disk.<br />
<br />Another advantage of using LVM implementation is flexibility to perform on-the-fly resize for the file system that built on this virtual disk partition, by adding in more physical hard disks and disk partitions.<br />
<br /><img src='http://www.walkernews.net/wp-content/uploads/2007/07/lvm-digram.jpg' alt='A visualized concept diagram of the Linux Logical Volume Manager or LVM.' /><br />
<sup>A visualized concept diagram of the Linux Logical Volume Manager or LVM</sup><br />
<br /><span class="subhead">How to create a new volume group (VG) and file system on Logical Volume (LV)?</span><br />
<br />Base on <span class="subhead2">RHEL4 and LVM2</span> as the platform, here is the summary of steps to build a new volume group (VG), create a Logical Volume (LV), followed by making new file system on it.<br />
<blockquote><br />
As with most Linux commands, the LVM and file system related commands come with number of option switches to extend or overwrite the command default behaviour.<br />
<br />Obviously, this general guide doesn&#8217;t cover detail of all option switches. For your own good sake, just vet through the command manual page to see if any of those option switches applicable to your environment.
<br /></blockquote>
<br />1) Use <code>lvmdiskscan</code> to find out how many block devices (hard disks or disk partitions) seen by OS are currently used for LVM:<br />
<br /><img src="http://www.walkernews.net/wp-content/uploads/2009/03/lvm-disk.jpg" alt="Using lvmdiskscan to check the number of hard disks detected by OS." title="Using lvmdiskscan to check the number of hard disks detected by OS." /><br />
<br />2) With reference to lvmdiskscan output, the <span class="fpath">/dev/sda2</span> disk partition is not currently used for LVM. However, it might be used by Red Hat.<br />
<br />So, you&#8217;ve to verify or confirm which of the non-LVM block devices are not currently used by Red Hat with the <a href="http://www.walkernews.net/2007/07/13/df-and-du-command-show-different-used-disk-space/" title="Why the Linux df and du commands show different used disk space?" rel="bookmark">df command</a>. For example, this following <code>df -h</code> output clearly indicates that <span class="fpath">/dev/sda2</span> and <span class="fpath">/dev/sda3</span> are actually mounted as root and boot file system respectively:<br />
<br /><img src="http://www.walkernews.net/wp-content/uploads/2009/03/linux-file-system.jpg" alt="Using df -h command to check Linux file system size and free disk space." title="Using df -h command to check Linux file system size and free disk space." /><br />
<br />3) Now, let say I decides to create the new Volume Group (VG) with two unused SCSI hard disks, <span class="fpath">/dev/sdh</span> and <span class="fpath">/dev/sdi</span>. So, let&#8217;s use the pvcreate command to initialize these two SCSI hard disks for use by LVM:<br />
<pre>
pvcreate /dev/sdh /dev/sdi
</pre>
<br />The pvcreate command creates the VGDA, shorts of Volume Group Descriptor Area, for LVM to keep track Physical Extent (PE) allocation history, among other things. The initialized hard disk is known as Physical Volume (PV).<br />

<blockquote><br />
The manual page suggests setting a DOS disk partition to Linux LVM partition type (0x8e) prior to execute pvcreate command. But, why not to keep a standard by explicitly creating or changing non-LVM partition to LVM partition type?<br />
<br />1) To change existing, non-LVM disk partition to <span class="subhead2">LVM partition type (0x8e)</span> by using fdisk command:<br />
<br /><img src="http://www.walkernews.net/wp-content/uploads/2009/03/linux-lvm-fdisk-1.jpg" alt="Using Linux fdisk command to change a partition to LVM partition type." title="Using Linux fdisk command to change a partition to LVM partition type." /><br />
<br />2) To use the entire hard disk for LVM, simply proceed with fdisk to create one primary partition to take up whole hard disk space and then set the partition type to 0x8e.<br />
<br />The pvcreate manual page, however, suggest a faster approach by destroying the existing partition table, with this dd command:<br />
<pre>
dd if=/dev/zero of=/dev/sdi bs=512 count=1
</pre>
</blockquote>
<br />4) Now, use vgcreate command to create a new Volume Group called vg7, using the block devices (<span class="fpath">/dev/sdh</span> and <span class="fpath">/dev/sdi</span>) initialized by pvcreate command in previous step (you may run <code>pvdisplay</code> to see difference of before and after executing vgcreate command):<br />
<pre>
vgcreate -s 16M vg7 /dev/sdh /dev/sdi
</pre>
<br />A Volume Group can be thought of a container that house all the PV specified by <code>vgcreate</code> or <code>vgextend</code> command. Conceptually, you should regard Volume Group as a <span class="subhead2">virtual hard disk</span>, as you can see later that it&#8217;s possible to &#8220;partition&#8221; the Volume Group into Logical Volume (LV).<br />
<br />The <span class="fpath">-s</span> option switches specify the physical extent size (PE size) of the volume group. If this is not specifying, the default PE size is 4MB, which is best for most applications.<br />
<blockquote><br />
The maximum number of PE per Logical Volume (LV) is not applicable in LVM2. However, high number of PE could affect LVM tool performance.<br />
<br />As such, set a bigger PE size could effectively reducing number of PE per VG and LV (if the VG is big enough).
<br /></blockquote>
<br />Take note that the name of VG must not conflict with existing VG. To list existing VG in system, execute <code>vgscan</code><br />
<br />5) Next, we proceed to partition Volume Group into Logical Volume. A file system can only be built on Logical Volume (LV) but not Volume Group (VG). Therefore, at least one LV must be created per VG. For example, this lvcreate command create a 400MB Logical Volume (virtual disk partition) called lvol3 in the Volume Group called vg7:<br />
<pre>
lvcreate -L 400M -n lvol3 vg7
</pre>
<br />Similar to VG, the name of LV must not crash with the existing LV in the same VG. Again, this can be verified by executing <code>lvscan</code><br />
<blockquote><br />
To use all free Physical Extent in Volume Group for Logical Volume, you can use <span class="fpath">-l</span> option switch to specify the number of PE to create the LV. The number of free PE in Volume Group vg7 can be checked by executing <code>vgdisplay vg7</code>
<br /></blockquote>
<br />6) Now, with the new Logical Volume (lvol3), we can create file system on this virtual disk partition. For example, this mkfs command create the Linux EXT3 file system on Logical Volume <span class="fpath">/dev/vg7/lvol3</span>, with <span class="fpath">-m 2</span> option switch to specify 2% of the <a href="http://www.walkernews.net/2007/02/28/tune2fs-increase-linux-free-disk-space/" title="How to reduce file system reserved block for more free disk space in Linux?" rel="bookmark">file system blocks reserved for super-user</a>.:<br />
<pre>
mkfs -t ext3 -m 2 -v /dev/vg7/lvol3
</pre>
<br />The full path of logical volume can be checked by executing <code>lvscan</code> command.<br />
<br />7) Once the mkfs successfully creates EXT3 file system, it&#8217;s ready to mount the new file system. First, create a directory as mount point, let say this:<br />
<pre>
mkdir /NewVGMnt
</pre>
<br />8) Then execute the mount command to mount the new file system to /NewVGMnt:<br />
<pre>
mount -t ext3 /dev/vg7/lvol3 /mnt/NewVGMnt
</pre>
<br />To verify the mount point, just type <code>df -h</code> command to confirm it&#8217;s done successfully. To enable Linux automatically mount the new file system during boot-up, include this new file system to /etc/fstab system file.<br />

<ul class="related_post"><li><a href="http://www.walkernews.net/2009/02/08/using-ibm-db2-monitoring-tool-db2pd-to-document-database-server-profile/" title="Using IBM DB2 Monitoring Tool db2pd To Document Database Server Profile">Using IBM DB2 Monitoring Tool db2pd To Document Database Server Profile</a></li><li><a href="http://www.walkernews.net/2008/07/06/how-to-create-iso-image-of-directory-or-filesystem-in-linux/" title="How To Create An ISO Image Of Directory / Filesystem In Linux">How To Create An ISO Image Of Directory / Filesystem In Linux</a></li><li><a href="http://www.walkernews.net/2008/06/20/configure-vnc-server-to-auto-start-up-in-red-hat-linux/" title="Configure VNC Server To Auto Start Up In Red Hat Linux">Configure VNC Server To Auto Start Up In Red Hat Linux</a></li><li><a href="http://www.walkernews.net/2008/03/01/excel-trend-line-to-predict-db2-tablespaces-free-page/" title="Excel Trend Line To Predict DB2 Tablespaces Free Page">Excel Trend Line To Predict DB2 Tablespaces Free Page</a></li><li><a href="http://www.walkernews.net/2008/02/24/db2-sql-to-query-tablespace-free-pages-statistics/" title="DB2 SQL To Query Tablespace Free Pages Statistics">DB2 SQL To Query Tablespace Free Pages Statistics</a></li><li><a href="http://www.walkernews.net/2008/02/18/how-to-log-db2-tablespaces-free-pages-statistics/" title="How To Log DB2 Tablespaces Free Pages Statistics">How To Log DB2 Tablespaces Free Pages Statistics</a></li><li><a href="http://www.walkernews.net/2008/01/15/how-to-install-rhel4-in-hp-netserver-lh3000/" title="How To Install RHEL4 In HP NetServer LH3000">How To Install RHEL4 In HP NetServer LH3000</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2009/03/07/how-to-create-volume-group-and-file-system-with-lvm2-in-linux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How To Add Raw Device Mapping In Red Hat Enterprise Linux 5?</title>
		<link>http://www.walkernews.net/2009/02/09/how-to-add-raw-device-mapping-in-red-hat-enterprise-linux-5/</link>
		<comments>http://www.walkernews.net/2009/02/09/how-to-add-raw-device-mapping-in-red-hat-enterprise-linux-5/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 17:15:03 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[OS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[O_DIRECT]]></category>
		<category><![CDATA[Raw Device]]></category>
		<category><![CDATA[RawIO]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Udev Rule]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=1976</guid>
		<description><![CDATA[Red Hat Enterprise Linux 5 still supports rawio or raw device I/O. However, the ways to create raw device in RHEL 5 is not exactly the same as in Red Hat Linux 8 Professional.]]></description>
			<content:encoded><![CDATA[Although I can&#8217;t remember the detail of steps to create raw device in SCO UNIX for Informix DBMS, I do remember it was a scary process for me as junior administrator.<br />
<span id="more-1976"></span><br />
Then, we moved on to Red Hat Linux 8 Professional. With <a href="http://www.walkernews.net/2008/05/17/direct-download-fedora-and-red-hat-linux-iso-cd-image/" title="Direct download archive of official Red Hat Linux and Fedora ISO image." rel="bookmark">Red Hat Linux</a>, the process of <!--wgadh-->creating raw device for <a href="http://www.walkernews.net/2009/02/08/using-ibm-db2-monitoring-tool-db2pd-to-document-database-server-profile/" title="Using db2pd to document database server profile." rel="bookmark">DB2 database system</a> was pleasant.<br />
<br />However, there was a little change on how to properly and persistently define raw device permission mode, as the database application moved to <a href="http://www.walkernews.net/2008/01/15/how-to-install-rhel4-in-hp-netserver-lh3000/" title="How to install RHEL4 on an aging HP NetServer LH3000?" rel="bookmark">RHEL4 platform</a>.<br />
<br />Now, Red Hat Enterprise Linux 5 is again introduces different steps to create raw device, as I just came across this in an email subscription related to RHEL5.<br />
<br />On top of the configuration changes, there is even a short note to remind all raw device fans AGAIN that the rawio is deprecated and this interface is scheduled for removal from future releases.<br />
<br />The legacy applications (majority are DBMS) that rely on rawio for performance sake should have code changes to support opening block device with O_DIRECT flag.<br />
<br /><span class="subhead">How to create raw device mapping in RHEL 5?</span><br />
<br />According to <a href="http://magazine.redhat.com/2008/09/17/tips-and-tricks-how-do-i-add-raw-device-mapping-in-red-hat-enterprise-linux-5/" target="_blank" title="How to add raw device mapping in Red Hat Linux 5?">Red Hat Magazine article</a>, here is the simplified step for my reference when our infrastructure team decides to go ahead with the upgrade of RHEL 4 to RHEL 5.<br />
<br />First, edit <span class="fpath">/etc/udev/rules.d/60-raw.rules</span> to bind the hard disk to raw device, one line per record of mapping. (Consult Linux man page for udev related information).<br />
<br />There are two ways to define such mapping, but I prefer the easier way. For example, this line defines a mapping of first SCSI hard disk (/dev/sda) to first raw device (/dev/raw/raw1):<br />
<pre>ACTION=="add", KERNEL=="sda", RUN+="/bin/raw /dev/raw/raw1 %N"</pre>
<br />Next, add another line to define a persistent raw device permission mode (if the default permission mode is not suitable for my case):<br />
<pre>ACTION=="add", KERNEL=="raw*", OWNER=="root", GROUP=="disk", MODE=="0660"</pre>
<br />Lastly, to create the raw devices by executing <code>/sbin/start_udev</code> shell script. To check if the raw devices are created, execute <code>raw -qa</code><br />

<ul class="related_post"><li><a href="http://www.walkernews.net/2009/03/07/how-to-create-volume-group-and-file-system-with-lvm2-in-linux/" title="How To Create Volume Group And File System With LVM2 In Linux?">How To Create Volume Group And File System With LVM2 In Linux?</a></li><li><a href="http://www.walkernews.net/2009/02/08/using-ibm-db2-monitoring-tool-db2pd-to-document-database-server-profile/" title="Using IBM DB2 Monitoring Tool db2pd To Document Database Server Profile">Using IBM DB2 Monitoring Tool db2pd To Document Database Server Profile</a></li><li><a href="http://www.walkernews.net/2008/07/06/how-to-create-iso-image-of-directory-or-filesystem-in-linux/" title="How To Create An ISO Image Of Directory / Filesystem In Linux">How To Create An ISO Image Of Directory / Filesystem In Linux</a></li><li><a href="http://www.walkernews.net/2008/06/05/configure-putty-to-support-password-less-ssh-login/" title="Configure Putty To Support Password-less SSH Login">Configure Putty To Support Password-less SSH Login</a></li><li><a href="http://www.walkernews.net/2008/06/04/auto-ssh-login-by-using-public-key-cryptography/" title="Auto SSH Login By Using Public-key Cryptography">Auto SSH Login By Using Public-key Cryptography</a></li><li><a href="http://www.walkernews.net/2008/03/01/excel-trend-line-to-predict-db2-tablespaces-free-page/" title="Excel Trend Line To Predict DB2 Tablespaces Free Page">Excel Trend Line To Predict DB2 Tablespaces Free Page</a></li><li><a href="http://www.walkernews.net/2008/02/24/db2-sql-to-query-tablespace-free-pages-statistics/" title="DB2 SQL To Query Tablespace Free Pages Statistics">DB2 SQL To Query Tablespace Free Pages Statistics</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2009/02/09/how-to-add-raw-device-mapping-in-red-hat-enterprise-linux-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using IBM DB2 Monitoring Tool db2pd To Document Database Server Profile</title>
		<link>http://www.walkernews.net/2009/02/08/using-ibm-db2-monitoring-tool-db2pd-to-document-database-server-profile/</link>
		<comments>http://www.walkernews.net/2009/02/08/using-ibm-db2-monitoring-tool-db2pd-to-document-database-server-profile/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 08:52:21 +0000</pubDate>
		<dc:creator>Walker</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[DB2]]></category>
		<category><![CDATA[db2pd]]></category>
		<category><![CDATA[DBMS]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://www.walkernews.net/?p=1957</guid>
		<description><![CDATA[The db2pd program can be useful in collecting the database server profile that include the information related to OS, hardware, memory, DB2 fixpak and code level, buffer pools, memory set information, etc.]]></description>
			<content:encoded><![CDATA[One of the jobs of system administrator is to profile each server. This could be a simple job, but sometime it&#8217;s not as simple as it seems to be, especially for junior administrator.<br />
<span id="more-1957"></span><br />
<!--wgadh-->Strictly speaking, <span class="subhead2">db2pd is a monitoring tool</span>, not a special utility to generate database server profile.<br />
<br />However, this IBM DB2 utility retrieves information from database system memory sets which some of the information are useful for documenting server profile.<br />
<br />For example, <code>db2pd -osinfo</code> reports the number of physical CPU and related information (single core or multiple core, <a href="http://www.walkernews.net/2009/02/01/overheated-intel-core-2-duo-cpu-slows-down-processor-core-speed/" title="The Intel processor actual core speed might be lower when the processor overheated as a result of improper heatsink installation or poor heat dissipation system." rel="bookmark">CPU core speed</a>, CPU load, etc), free and used memory, IPC resource (shared memory, semaphore, and message queue), etc. (See &#8220;<a href="http://www.walkernews.net/2008/01/30/differentiate-between-single-and-multi-core-cpu-in-linux/" title="How To Differentiate Between Single And Multi-core CPU In Linux?" rel="bookmark">How to detect a single or multi-core CPU is installed in Linux</a>&#8220;).<br />
<br />Similar to db2level, <code>db2pd -V</code> or <code>db2pd -version</code> reports the DB2 version and FixPak level related information.<br />
<br />The <code>db2pd -inst</code> output the detail of DB2 instance level information, such as database uptime, database manager configuration, etc.<br />
<br />To view most information in single output, <code>db2pd -everything</code> tells you all information found on all database partitions.<br />
<br />If you only interested in a particular database called sample, first establish a connection to the target database, e.g. <code>db2 connect to sample</code> in this example. Then, proceed to db2pd command, such as:<br />
<br />To view buffer pools setup and related information (In DB2 version 9.1, db2pd also provides bufferpool statistics, such as hit ratio):<br />
<pre>db2pd -db sample -bufferpools</pre>
<br />To view table spaces type (SMS or DMS) and associated table space containers statistics (total useable pages, used pages, free pages). The db2pd command output seems to be easier for me to write a <a href="http://www.walkernews.net/2008/02/24/db2-sql-to-query-tablespace-free-pages-statistics/" title="DB2 SQL To Query Tablespace Free Pages Statistics" rel="bookmark">shell script to automatic recording table space utilization statistics</a> :-)<br />
<pre>db2pd -db sample -tablespaces</pre>
<br />For more db2pd related information, refer to IBM DB2 Information Center Home of respective version. For example:<br />
<br /><a href="http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb.doc/core/r0011729.htm" target="_blank" rel="nofollow">db2pd of DB2 version 8.2</a> for Linux, UNIX, and Windows operating systems (LUW).<br />
<a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.admin.doc/doc/r0011729.htm" target="_blank" rel="nofollow">db2pd of DB2 version 9.1</a> for Linux, UNIX, and Windows operating systems (LUW).<br />
<a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/topic/com.ibm.db2.luw.admin.cmd.doc/doc/r0011729.html" target="_blank" rel="nofollow">db2pd of DB2 version 9.5</a> for Linux, UNIX, and Windows operating systems (LUW).<br />

<ul class="related_post"><li><a href="http://www.walkernews.net/2009/02/02/using-linux-awk-regular-expression-to-read-big-log-file/" title="Using Linux Awk Regular Expression To Read Big Log File">Using Linux Awk Regular Expression To Read Big Log File</a></li><li><a href="http://www.walkernews.net/2009/02/08/how-to-check-ibm-db2-database-size/" title="How To Check IBM DB2 Database Size?">How To Check IBM DB2 Database Size?</a></li><li><a href="http://www.walkernews.net/2009/02/08/how-to-reset-db2-database-configuration-to-system-default/" title="How To Reset DB2 Database Configuration To System Default?">How To Reset DB2 Database Configuration To System Default?</a></li><li><a href="http://www.walkernews.net/2008/03/01/excel-trend-line-to-predict-db2-tablespaces-free-page/" title="Excel Trend Line To Predict DB2 Tablespaces Free Page">Excel Trend Line To Predict DB2 Tablespaces Free Page</a></li><li><a href="http://www.walkernews.net/2008/02/24/db2-sql-to-query-tablespace-free-pages-statistics/" title="DB2 SQL To Query Tablespace Free Pages Statistics">DB2 SQL To Query Tablespace Free Pages Statistics</a></li><li><a href="http://www.walkernews.net/2008/02/18/how-to-log-db2-tablespaces-free-pages-statistics/" title="How To Log DB2 Tablespaces Free Pages Statistics">How To Log DB2 Tablespaces Free Pages Statistics</a></li><li><a href="http://www.walkernews.net/2009/05/11/how-to-use-putty-generated-rsa-key-to-login-linux-openssh-server/" title="How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?">How To Use Putty-generated RSA Key To Login Linux OpenSSH Server?</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.walkernews.net/2009/02/08/using-ibm-db2-monitoring-tool-db2pd-to-document-database-server-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
