<?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>LinuxLinux | Linux</title>
	<atom:link href="http://linux.sjolshagen.net/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://linux.sjolshagen.net</link>
	<description>Linux for Businesses</description>
	<lastBuildDate>Wed, 01 Feb 2012 17:33:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SELinux: httpd_sys_rw_content_t vs. httpd_sys_content_rw_t</title>
		<link>http://linux.sjolshagen.net/2011/02/08/selinux-the-difference-between-httpd_sys_rw_content_t-and-httpd_sys_content_rw_t/</link>
		<comments>http://linux.sjolshagen.net/2011/02/08/selinux-the-difference-between-httpd_sys_rw_content_t-and-httpd_sys_content_rw_t/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 22:52:03 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[fcontext]]></category>
		<category><![CDATA[httpd_sys_content_rw_t]]></category>
		<category><![CDATA[httpd_sys_rw_content_t]]></category>
		<category><![CDATA[selinux]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=539</guid>
		<description><![CDATA[SELinux file context (fcontext) confusion: httpd_sys_rw_content_t and httpd_sys_content_rw_t - They're the same but (not really) different.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been spending a few hours making sure my multi-instance Apache servers play nice with SELinux in &#8220;Enforcing&#8221; mode and accidentally stumbled across something that got me all quizzical.</p>
<p>A quick request on the #selinux-fedora IRC channel on freenode.net clarified the whole thing, but I thought it worth posting so I won&#8217;t forget.<span id="more-539"></span></p>
<p>You may have realized, if you&#8217;ve read any of the other posts in this blog, that I have a multi-instance Apache Server configuration that shares a single GFS2 file system between two OS instances (they&#8217;re actually VMs) and I hosts a few different WordPress blogs and a Photo Gallery using this configuration. The pictures and source files for the blogs and gallery are mounted at a non-standard location (non-standard in a Fedora/httpd context) and since I recently re-enabled SELinux in my environment and set it to &#8220;Enforcing&#8221;, I&#8217;ve had to make some additions to the file context (fcontext) portions of the SELinux policy so as to ensure that any &#8220;.autorelabel&#8221; and # restorecon commands will set the wordpress and gallery source files to the correct file context (fcontext).</p>
<p>Basically, I&#8217;ve been creating file context regular expressions that align with my web server layout using the # semanage fcontext -a -t &lt;context&gt; &#8220;&lt;file path regex&gt;&#8221; command. At the time I created the contexts, I never noticed the fact that I was using two different contexts (they both worked, so it wasn&#8217;t obvious to me that I&#8217;d done this);</p>
<blockquote><p><span style="font-family: 'courier new', courier;">httpd_sys_rw_context_t</span></p>
<p><span style="font-family: 'courier new', courier;">httpd_sys_content_rw_t</span></p></blockquote>
<p>But, when I ran &#8221; #restorecon -RFv &lt;path to html root&gt;&#8221; from both of my OS instances, I noticed that they were both labeling the same (shared) directories with the two different fcontexts. And that made me wonder&#8230;  What on earth was/is the difference between the two (and, secondarily, why do they both exist)?</p>
<p>To answer the first question first; &#8220;What on earth is the difference between the httpd_sys_rw_content_t fcontext and the httpd_sys_content_rw_t fcontext?&#8221;;</p>
<p>None! Zip! Nada! They&#8217;re aliases of each other and have the exact same meaning. Thus, if you have a directory where you wish to let the httpd (Apache) server write to &#8211; for instance an &#8220;upload&#8221; folder &#8211; you can set it to either context and SELinux will let the HTTPD Daemon write to the location as long as the remaining UNIX permissions are correct.</p>
<p>The 2nd question is harder to answer (or, in other words; I don&#8217;t have an authoritative answer to that question), but I can speculate that it&#8217;s a compatibility &#8220;play&#8221; to not break previously set fcontexts (&#8220;previously&#8221; being &#8220;fcontexts set by other selinux-policy versions and/or previous versions of the Fedora distribution itself&#8221;).</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2011/02/08/selinux-the-difference-between-httpd_sys_rw_content_t-and-httpd_sys_content_rw_t/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is your network playing nice?</title>
		<link>http://linux.sjolshagen.net/2010/08/27/is-your-network-playing-nice/</link>
		<comments>http://linux.sjolshagen.net/2010/08/27/is-your-network-playing-nice/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 11:08:12 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[EqualLogic]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mission Critical Computing]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[bonding]]></category>
		<category><![CDATA[disk i/o]]></category>
		<category><![CDATA[dm-multipath]]></category>
		<category><![CDATA[equallogic]]></category>
		<category><![CDATA[half the expected performance]]></category>
		<category><![CDATA[infrastructure]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[iscsi-initiator-utils]]></category>
		<category><![CDATA[multipath]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[RHEL 5.4]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=477</guid>
		<description><![CDATA[Get stuck with odd performance in your iSCSI SAN? Try the obvious!]]></description>
			<content:encoded><![CDATA[<p>The other day I was working for a couple of hours with a colleague on trying to figure out why, regardless of what we did in terms of multipath configuration (bonded IP network+multiple virtual openiscsi initiator ports per bond + dm-multipath or multiple NICs on the same subnet + one openiscsi initiator per physical nic + dm-multipath), we were unable to get more than  between 110 &amp; 125MB/sec of throughput from our RHEL 5.4 host to our EqualLogic iSCSI SAN volumes.The expectation was to see more than 200MB/sec throughput but of course, we were essentially seeing about 1 paths&#8217; worth of throughput. <span id="more-477"></span></p>
<p>We tried everything. Different bonding algorithms (balanced-alb, 802.3ad, balanced-rr, etc), different IO testing tools, different network configurations, messing with the rr_io_min settings, tuning the network stack itself (increasing read/write buffer sizes) and then we got desperate and changed the IO schedulers (For the record: I consider that &#8220;an act of desperation&#8221; since I would never expect an IO scheduler change to give us a 100% increase).</p>
<p>Since we didn&#8217;t configure the physical aspects of the network and we&#8217;re playing with equipment hosted in a rather large and very established Lab SAN, it took me a while to think of and accept that it might be a physical problem and not a host configuration one. It was probably about time to walk to the switches and get a visual on the port status for the host links, the Controller port lights and any ISLs or (if present) stacking links.</p>
<p>Guess what&#8230; the ISL between the switch connected to the test host and the switch connected to the EqualLogic group was operating at 1/2 its intended capacity.</p>
<p>&#8220;Mystery&#8221; solved.</p>
<p>You know, sometimes the blinking lights are the most important troubleshooting tool. Sometimes, the color of the blinking lights are the difference between wasting 3 hours and not. And, sometimes, a person with more than 10 years experience designing, configuring and reviewing SANs in mission critical environments can be reminded &#8211; in very embarrassing ways &#8211; that you should always verify the physical aspects of the configuration first and that simple is more often than not better than the alternative(s). Even if the simple approach includes a hike, a flight of stairs and entering into the noisy data center.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2010/08/27/is-your-network-playing-nice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: Configure &#8220;bridge at boot&#8221; for NIC(s) in Fedora 13</title>
		<link>http://linux.sjolshagen.net/2010/07/28/linux-configure-bridge-at-boot-for-nics-in-fedora-13/</link>
		<comments>http://linux.sjolshagen.net/2010/07/28/linux-configure-bridge-at-boot-for-nics-in-fedora-13/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 14:31:51 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[EqualLogic]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mission Critical Computing]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[Fedora 13]]></category>
		<category><![CDATA[ipv4]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[network tuning]]></category>
		<category><![CDATA[NetworkManager]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[virsh]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=385</guid>
		<description><![CDATA[Sometimes, for instance when having a limited number of Network Interface Cards (NICs) on a system that will be used for a Linux hosted platform virtualization solution (and you&#8217;re running Fedora 13), the easiest approach to giving each of the guests &#8220;direct&#8221; access to a network is to configure the physical devices as bridges on...]]></description>
			<content:encoded><![CDATA[<p>Sometimes, for instance when having a limited number of Network Interface Cards (NICs) on a system that will be used for a Linux hosted<a href="http://en.wikipedia.org/wiki/Hardware_virtualization#Concept"> platform virtualization</a> solution (and you&#8217;re running Fedora 13), the easiest approach to giving each of the guests &#8220;direct&#8221; access to a network is to configure the physical devices as <a href="http://gd.tuwien.ac.at/linuxcommand.org/man_pages/brctl8.html">bridge</a>s on the host.</p>
<p>This will permit the <a href="http://www.libvirt.org/">libvirt virtualization (management) abstraction interface</a> to easily build &#8220;briges of bridges&#8221; that in turn let a<a href="http://www.linux-kvm.com/"> Kernel Virtual Machine (KVM)</a> guest get it&#8217;s own &#8220;public&#8221; (only in quotes because I happen to think the average bear would not be so silly as to put their Linux/KVM host directly onto the internet. Right???) IP address and route its traffic directly onto the ether (via the lower levels of the IP stack of the host environment).</p>
<p>There are, as is the case with all things Linux or UNIX, a couple of ways to skin this particular bear (sorry, that&#8217;s bad!), but the one that makes the most sense to me is to have <span style="font-family: courier new,courier;">init</span> take care of the configuration as part of the system boot process (when the <span style="font-family: courier new,courier;">network </span>service executes). And doing that, although in its simplest form requires access to a terminal window and a text editor on the Fedora host, is actually very simple, once you know what you&#8217;re doing. Hopefully, the following will help you learn (if you don&#8217;t already know and are only reading this because you&#8217;re looking around and are a very bored individual).<span id="more-385"></span></p>
<p>At a high level, all you have to do is edit the <span style="font-family: courier new,courier;">/etc/sysconfig/network-scripts/ifcfg-ethX</span> file for the Ethernet (eth) device you want to bridge, specify that the device will belong to a bridge named &lt;bridgename&gt; and then create a <span style="font-family: courier new,courier;">/etc/sysconfig/network-scripts/ifcfg-&lt;bridgename&gt;</span> file that configures the bridge (assigning it a way to obtain an IP address &#8211; probably static, routing and DNS configuration information).</p>
<p>Prior to configuring the system to use bridging, I had configured static IP addresses on the two physical interfaces I will be creating bridges for. Since that configuration was being obsoleted in order to use the same interfaces for guest-to-iSCSI-SAN traffic, I edited and created the above mentioned configuration files. All of the <strong>edited items are in bold</strong>. Before you edit and create these files, life gets a little easier if you:</p>
<ol>
<li>Back up the original <span style="font-family: courier new,courier;">ifcfg-eth[N]</span> files to some other location than <span style="font-family: courier new,courier;">/etc/sysconfig/network-scripts/</span></li>
<li><span style="font-family: courier new,courier;"># ifdown eth[N]</span></li>
</ol>
<p>Then, as an example, the two-to-four files you need (ifcfg-eth[N], ifcfg-eth[N+1] and ifcfg-bridge[N] and ifcfg-bridge[N+1]).</p>
<p><span style="font-family: courier new,courier;">/etc/sysconfig/network-scripts/ifcfg-eth2:</span></p>
<pre># Intel Corporation 82571EB Gigabit Ethernet Controller
DEVICE=eth2
BOOTPROTO=none
HWADDR=00:15:17:6C:97:94
<strong>#IPADDR=X.X.Z.231
#NETMASK=255.255.255.0
#PREFIX=24
#DEFROUTE=yes</strong>
ONBOOT=yes
TYPE=Ethernet
<strong>#DNS1=[DNS-SERVER1]
#DNS2=[DNS-SERVER2]</strong>
IPV6INIT=no
USERCTL=no
IPV4_FAILURE_FATAL=yes
NAME="System eth2"
<strong>BRIDGE=iscsi-bridge0</strong>
<strong>MTU=9000</strong></pre>
<p><span style="font-family: courier new,courier;">/etc/sysconfig/network-scripts/ifcfg-eth3:</span></p>
<pre># Intel Corporation 82571EB Gigabit Ethernet Controller
DEVICE=eth3
<strong>#IPADDR=X.Y.Z.232
#NETMASK=255.255.255.0
#PREFIX=24
#DEFROUTE=yes
#IPV4_FAILURE_FATAL=yes</strong>
HWADDR=00:15:17:6C:97:95
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
<strong>BRIDGE=iscsi-bridge1</strong>
IPV6INIT=no
USERCTL=no
NAME="System eth3"
<strong>MTU=9000</strong></pre>
<p><span style="font-family: courier new,courier;">/etc/sysconfig/network-scripts/ifcfg-iscsi-bridge0:</span></p>
<pre><strong>DEVICE=iscsi-bridge0
ONBOOT=yes
TYPE=Bridge
IPADDR=X.Y.Z.231
NETMASK=255.255.255.0
STP=off
MTU=9000
DELAY=0</strong></pre>
<p><span style="font-family: courier new,courier;">/etc/sysconfig/network-scripts/ifcfg-iscsi-bridge1:</span></p>
<pre><strong>DEVICE=iscsi-bridge1
ONBOOT=yes
TYPE=Bridge
IPADDR=X.Y.Z.232
NETMASK=255.255.255.0
MTU=9000
STP=off
DELAY=0</strong></pre>
<p>Although there&#8217;s a perfectly valid way of achieving the same thing through the <span style="font-family: courier new,courier;">virsh/libvirtd</span> management interface to <span style="font-family: courier new,courier;">libvirt </span>as well as with the <a href="http://projects.gnome.org/NetworkManager/">Network Manager</a> tools, my preference is to make this configuration &#8220;stick&#8221; using the old <span style="font-family: courier new,courier;">network </span>init service. The problem(s) I see with the<span style="font-family: courier new,courier;"> NetworkManager</span>/<span style="font-family: courier new,courier;">libvirtd </span>approach is twofold:</p>
<ul>
<li>Timing of <span style="font-family: courier new,courier;">NetworkManager</span> start-up (not all that early) relative to the Open-iSCSI stack startup (early)</li>
<li>Timing of <span style="font-family: courier new,courier;">libvirtd </span>start-up (one of the last services to get called) relative to other iSCSI volumes needing to be available for the host environment.</li>
</ul>
<p>So, for this example, disable <span style="font-family: courier new,courier;">NetworkManager</span> as a boot service and enable the <span style="font-family: courier new,courier;">network</span> service:</p>
<pre># service NetworkManager stop
# chkconfig NetworkManager off
# chkconfig network on
# ifup iscsi-bridge0
# ifup iscsi-bridge1</pre>
<p>And, Bob&#8217;s yer uncle (or, at least, he should be!). To verify that everything is working properly, ping an IP target that should be reachable from the bridge device interface(s) only:</p>
<pre># ping -I iscsi-bridge0</pre>
<pre># ping -I iscsi-bridge1</pre>
<p>By the way: If you use bridged interfaces, no iSCSI volumes on the host (for guests only, in other words) and have iptables enabled on the host (which you should), make sure to configure your host iptables to leave the bridged interfaces alone. For details, see the &#8211; soon to be created, I promise &#8211; post about performance tuning the Linux IPv4 environment for iSCSI-initiators on this site. Alternatively, you can grab the information pertaining to the relevant bridge sysctl.conf entries from the <a href="https://inquiries.redhat.com/go/redhat/rhel-hp-proliant">KVM scalability white paper</a> Red Hat published (and I provided most of the content for in my previous career).</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2010/07/28/linux-configure-bridge-at-boot-for-nics-in-fedora-13/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux: Using multipath to improve performance for your iSCSI array</title>
		<link>http://linux.sjolshagen.net/2010/07/23/linux-using-multipath-to-improve-performance-for-your-iscsi-array/</link>
		<comments>http://linux.sjolshagen.net/2010/07/23/linux-using-multipath-to-improve-performance-for-your-iscsi-array/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 17:33:07 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[EqualLogic]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[device mapper]]></category>
		<category><![CDATA[equallogic]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[iscsi-initiator-utils]]></category>
		<category><![CDATA[iscsiadm]]></category>
		<category><![CDATA[lun]]></category>
		<category><![CDATA[multipath]]></category>
		<category><![CDATA[multipath.conf]]></category>
		<category><![CDATA[multipathd]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[PS Series]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=311</guid>
		<description><![CDATA[Configuring Fedora 13 for Device Mapper Multipath with an EqualLogic PS series RAID array]]></description>
			<content:encoded><![CDATA[<p>As part of my self-learning activities at work, I&#8217;m playing with a multi-homed EM64T based server, Linux (<a href="http://www.fedoraproject.org/">Fedora 13</a>), the<a href="http://linux.die.net/man/8/iscsiadm"> iscsi-initiator-utils</a> and an <a href="http://www.equallogic.com/products/">EqualLogic PS series RAID array</a>. In the<a href="http://linux.sjolshagen.net/2010/07/iscsi-on-fedora-13/"> previous installment</a>, I gave an overview on how to make the Volume(s)/LUN(s) exported from the array appear on and be usable from the Linux host. In this installment I&#8217;ll discuss how to configure the dm-multipath sub-system to aggregate multiple network paths for availability and load-balancing purposes.</p>
<p>But before we get into the nitty-gritty of that, I just wanted to touch on a problem I&#8217;ve been having in setting up multipath over IPv4 on my Fedora 13 host. Now, keep in mind that the Fedora host I&#8217;m using has been &#8220;tweaked&#8221; and &#8220;messed with&#8221; (a lot), so it ain&#8217;t no &#8220;fresh install&#8221; here&#8230; That said, <a href="http://linux.sjolshagen.net/2010/07/linux-multi-nic-and-ip-traffic-routing/">I&#8217;ve been having problems getting both of my array-facing NICs to successfully ping the EqualLogic Group IP address</a>.</p>
<p>So, if you&#8217;re able to ping the EqualLogic array&#8217;s group IP address from both Ethernet NICs, setting up the iSCSI initiator as well as the DM multipath module(s) is very much a &#8220;straight forward&#8221; exercise.<span id="more-311"></span></p>
<p>Create two new open-iscsi initiator interfaces</p>
<blockquote>
<pre><span style="color: #0000ff;"><span style="font-family: courier new,courier;"># iscsiadm --mode iface --op=new --interface iscsi-0</span></span></pre>
<pre><span style="color: #0000ff;"><span style="font-family: courier new,courier;"># iscsiadm --mode iface --op=new --interface iscsi-1</span></span></pre>
</blockquote>
<p>Validate that the new interfaces are stored</p>
<blockquote>
<pre><span style="font-family: courier new,courier;"><span style="color: #0000ff;"># iscsiadm --mode iface</span></span></pre>
<pre><span style="font-family: courier new,courier;">default tcp,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;
iser iser,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;
iscsi-0 tcp,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;
iscsi-1 tcp,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;
</span></pre>
</blockquote>
<p>Bind the physical NICs to the newly created initiator interfaces</p>
<blockquote>
<pre><span style="color: #0000ff;"><span style="font-family: courier new,courier;"># iscsiadm --mode iface --op=update --interface iscsi-0 --name=iface.net_ifacename --value=eth2</span></span></pre>
<pre><span style="color: #0000ff;"><span style="font-family: courier new,courier;"># iscsiadm --mode iface --op=update --interface iscsi-1 --name=iface.net_ifacename --value=eth3</span></span></pre>
</blockquote>
<p>Validate the bindings</p>
<blockquote>
<pre><span style="font-family: courier new,courier;"><span style="color: #0000ff;"># iscsiadm --mode iface --interface iscsi-0</span></span></pre>
<pre><span style="font-family: courier new,courier;"># BEGIN RECORD 2.0-872
iface.iscsi_ifacename = iscsi-0
<em><strong>iface.net_ifacename = eth2</strong></em></span> <span style="font-family: courier new,courier;">
iface.ipaddress = &lt;empty&gt;
iface.hwaddress = &lt;empty&gt;
iface.transport_name = tcp
iface.initiatorname = &lt;empty&gt;
# END RECORD</span></pre>
</blockquote>
<blockquote>
<pre><span style="font-family: courier new,courier;"><span style="color: #0000ff;"># iscsiadm --mode iface --interface iscsi-1</span></span></pre>
<pre><span style="font-family: courier new,courier;"># BEGIN RECORD 2.0-872
iface.iscsi_ifacename = iscsi-1
<em><strong>iface.net_ifacename = eth3</strong></em></span> <span style="font-family: courier new,courier;">
iface.ipaddress = &lt;empty&gt;
iface.hwaddress = &lt;empty&gt;
iface.transport_name = tcp
iface.initiatorname = &lt;empty&gt;
# END RECORD</span></pre>
</blockquote>
<blockquote>
<pre><span style="color: #0000ff;"><span style="font-family: courier new,courier;"># iscsiadm --mode iface</span></span></pre>
<pre><span style="font-family: courier new,courier;">default tcp,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;
iser iser,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;,&lt;empty&gt;
iscsi-0 tcp,&lt;empty&gt;,&lt;empty&gt;,eth2,&lt;empty&gt;
iscsi-1 tcp,&lt;empty&gt;,&lt;empty&gt;,eth3,&lt;empty&gt;</span></pre>
</blockquote>
<p>Now that we&#8217;ve got the initiator interfaces configured and bound to the physical 1 or 10 GigE NICs, we need to make sure every initiator NIC is logged into the available targets. By the way, <a href="http://linux.sjolshagen.net/2010/07/linux-configure-bridge-at-boot-for-nics-in-fedora-13">you can also configure your Fedora host environment to use bridged interfaces</a> if you&#8217;ve got a limited number of NICs in the system and want to use  KVM/libvirt to import LUNs directly to a virtualized guest instance.</p>
<p>The easiest way to log in all of the interfaces you&#8217;ve defined above to the available (the LUNs/Volumes are &#8220;available&#8221; and &#8220;seen&#8221; because you&#8217;ve set up the ACL on the LUN/Volume to permit access from this host, right?) targets  is to simply list<span style="color: #993300;"><sup>[1]</sup></span> the target(s) <a href="http://linux.sjolshagen.net/2010/07/iscsi-on-fedora-13/">you&#8217;ve discovered previously</a> and re-issue the<span style="color: #0000ff;"> <span style="font-family: courier new,courier;"># iscsiadm &#8211;mode node &#8211;login &#8211;target iqn.2001-05.com.equallogic:&lt;ID of Volume/LUN&gt;</span></span> command.</p>
<p>The next step now is to edit/add the contents of the <span style="font-family: courier new,courier;">/etc/multipath.conf</span> (or, if you&#8217;re so inclined: <span style="font-family: courier new,courier;">/etc/multipath/multipath.conf </span>which can represent a symlink target for <span style="font-family: courier new,courier;">/etc/multipath.conf</span>) file, assign an alias that can be access from <span style="font-family: courier new,courier;">/dev/mapper/&lt;alias&gt;</span> for a given (multipathed) device and &#8220;do something&#8221; (use as an LVM2 volume, a raw device, host a file system on or whatever)</p>
<p>So, before we &#8220;do the work&#8221; to configure the Multipath environment, we&#8217;ll need to either add (or ensure) the following information is present in the <span style="font-family: courier new,courier;">/etc/multipath.conf</span> file (by the way, the multipath utilities assume [expect] its configuration file to be readable from the<span style="font-family: courier new,courier;"> /etc/multipath.conf</span> location!):</p>
<blockquote><p><span style="font-family: courier new,courier;"> </span></p>
<pre>## Use user friendly names, instead of using WWIDs as names.
defaults {
     user_friendly_names yes
     find_multipaths yes
}

## Blacklist local devices (no need to have them accidentally "multipathed")
blacklist {
     wwid scsi-SATA_WDC_WD800AAJS-1_WD-WMAM9ANC0895
     devnode "^sd[a]$"
     devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
     devnode "^hd[a-z]"
     devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]"
}

## For EqualLogic PS series RAID arrays
devices {
     device {
          vendor                  "EQLOGIC"
          product                 "100E-00"
          path_grouping_policy    multibus
          getuid_callout          "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
          features                "1 queue_if_no_path"
          path_checker            readsector0
          path_selector           "round-robin 0"
          failback                immediate
          rr_min_io               10
          rr_weight               priorities
     }
}

## Assign human-readable name  (aliases) to the World-Wide ID's (names) of the devices we're wanting to manage
## Identify the WWID by issuing <span style="color: #0000ff;"># scsi_id --whitelisted --page=0x83 /dev/&lt;path to sdX for one of the device paths&gt;</span>

multipaths {
     multipath {
          wwid                    36090a01850e08bd883c4a45bfa0330ba
          alias                     benchmark2
     }
     multipath {
          wwid                    36090a01850e04bd683c4745bfa03b07c
          alias                     benchmark1
     }
}
</pre>
</blockquote>
<div>And now we&#8217;re ready to let the Device Mapper tools locate and configure the LUNs/Volume(s) we&#8217;ve got multiple paths to access,  as well as create device nodes in /dev/mapper/ based on the alias configuration we&#8217;ve set up above. Simply starting the multipathd service <em>should</em> configure the multipath devices.</div>
<blockquote>
<pre><span style="color: #0000ff;"><span style="font-family: courier new,courier;"># service multipathd start
# chkconfig multipathd on</span></span></pre>
</blockquote>
<p>Verify that the device mapper multipath configuration is &#8216;complete&#8217; with the following commands:</p>
<blockquote>
<pre><span style="color: #0000ff;"><span style="font-family: courier new,courier;"># multipath -v2
# multipath -ll</span></span></pre>
<pre><span style="font-family: courier new,courier;"><strong>benchmark2 (36090a01850e08bd883c4a45bfa0330ba) dm-0 EQLOGIC,100E-00</strong>
size=100G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=2 status=active
   |- 6:0:0:0 sdd 8:48 active ready running
   `- 5:0:0:0 sdb 8:16 active ready running
<strong>benchmark1 (36090a01850e04bd683c4745bfa03b07c) dm-1 EQLOGIC,100E-00</strong>
size=100G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=2 status=active
   |- 4:0:0:0 sde 8:64 active ready running
   `- 3:0:0:0 sdc 8:32 active ready running</span></pre>
</blockquote>
<p><span style="color: #993300;">[1]</span> = <span style="font-family: courier new,courier;"><span style="color: #0000ff;"># iscsiadm &#8211;mode node</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2010/07/23/linux-using-multipath-to-improve-performance-for-your-iscsi-array/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>EqualLogic storage (iSCSI) on Fedora 13</title>
		<link>http://linux.sjolshagen.net/2010/07/21/iscsi-on-fedora-13/</link>
		<comments>http://linux.sjolshagen.net/2010/07/21/iscsi-on-fedora-13/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 13:14:34 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[EqualLogic]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[equallogic]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[Fedora 13]]></category>
		<category><![CDATA[initiatorname.iscsi]]></category>
		<category><![CDATA[iscsi]]></category>
		<category><![CDATA[iscsi-initiator-utils]]></category>
		<category><![CDATA[iscsiadm]]></category>
		<category><![CDATA[lun]]></category>
		<category><![CDATA[PS Series]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=251</guid>
		<description><![CDATA[Short summary of configuring your Linux (Fedora 13) host to configure, access and use a Volume (LUN) hosted on an EqualLogic PS Series iSCSI array. ]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started playing with iSCSI devices in earnest. Specifically, I&#8217;m having a lot of fun playing around with an <a href="http://www.equallogic.com/">EqualLogic array</a> (<a href="http://www.equallogic.com/products/">PS Series array</a>) at work and getting a Linux (Fedora 13) environment up and running.</p>
<p>It&#8217;s pretty straight forward, really.</p>
<p>At its simplest and  highest(ish) level:<span id="more-251"></span></p>
<ol>
<li>Install the iSCSI initiator management utilities for Fedora 13 (<span style="font-family: courier new,courier;"># yum install iscsi-initiator-utils</span>)</li>
<li>Identify (change) the <a href="http://en.wikipedia.org/wiki/ISCSI#Addressing">iqn</a> for your Fedora 13 host (<span style="font-family: courier new,courier;"># {cat|vi} /etc/iscsi/initiatorname.iscsi</span>)</li>
<li>Configure your target(s), define LUN(s) and set up ACLs for the LUNs (Volumes) you&#8217;re wanting to use in your EqualLogic group</li>
<li>Scan the <a href="http://en.wikipedia.org/wiki/ISCSI#Target">iSCSI target</a> (EqualLogic group) (<span style="font-family: courier new,courier;">#<a href="http://linux.die.net/man/8/iscsiadm"> iscsiadm</a> &#8211;mode discovery &#8211;type sendtargets &#8211;portal &lt;ip for EQL group&gt;:3260</span>)</li>
<li>Log in to the target &amp; volume (LUN) you&#8217;re wanting to use (<span style="font-family: courier new,courier;"># iscsiadm &#8211;mode node &#8211;login &#8211;target &lt;iqn for LUN/Volume on EQL array&gt; </span>)</li>
<li>Repeat for all of the volumes/LUNs you&#8217;re wanting to access from the Fedora 13 host</li>
<li>Use the volumes/LUNs you&#8217;ve &#8220;imported&#8221;</li>
<li>Optionally (I recommend doing this for clarity), log out and remove (delete) all of the Volumes (LUNs) you&#8217;re not using on the Fedora host
<ol>
<li>List all of the discovered volumes/LUNs from the target: (<span style="font-family: courier new,courier;"># iscsiadm &#8211;mode node</span>)</li>
<li>Log out the volumes/LUN&#8217;s you do not intend to access from the host (<span style="font-family: courier new,courier;"># iscsiadm &#8211;mode node &#8211;logout &#8211;target &lt;iqn of Volume/LUN&gt; </span>)</li>
<li>Delete the volume(s)/LUN(s) you don&#8217;t want: (<span style="font-family: courier new,courier;"># iscsiadm &#8211;mode node &#8211;target &lt;iqn of Volume/LUN&gt; &#8211;op delete</span> )</li>
</ol>
</li>
</ol>
<p>If you don&#8217;t like &#8220;long&#8221; option names, substitute;</p>
<ul>
<li><span style="font-family: courier new,courier;">&#8211;mode</span> with <span style="font-family: courier new,courier;">-m</span></li>
<li><span style="font-family: courier new,courier;">&#8211;target</span> with <span style="font-family: courier new,courier;">-T</span></li>
<li>&#8211;login with <span style="font-family: courier new,courier;">-l</span></li>
<li><span style="font-family: courier new,courier;">&#8211;logout </span>with <span style="font-family: courier new,courier;">-u</span></li>
<li><span style="font-family: courier new,courier;">&#8211;op</span> with<span style="font-family: courier new,courier;"> -o</span></li>
<li>&#8216;<span style="font-family: courier new,courier;">sendtargets</span>&#8216; with &#8216;<span style="font-family: courier new,courier;">st</span>&#8216;</li>
</ul>
<p>From now on, whenever the<span style="font-family: courier new,courier;"> iscsid</span> daemon is started during boot, the host will log on to the volume(s)/LUNs during boot, the <span style="font-family: courier new,courier;">/dev/</span> entries will be created &#8211; but not be persistent across boots, so make sure you use these LUNs with either LVM or use the <span style="font-family: courier new,courier;">UUID=</span> or file system <span style="font-family: courier new,courier;">LABEL=&lt;name&gt;</span> when mounting file systems hosted on these Volume(s)/LUNs! &#8211; and the devices will be accessible from the host.  More on creating UDEV rules for your iSCSI Volume(s)/LUN(s) in the next  installment of the series.</p>
<p>Of course, now there&#8217;s configuring for Volume/LUN path availability, etc, etc. Multipath configuration which is <a href="https://www.equallogic.com/WorkArea/showcontent.aspx?id=8727&amp;LangType=1033">documented by DELL in a tech report paper on our EqualLogic support web site</a> (<em>requires a valid support contract/warranty for login</em>)- and I&#8217;ll summarize in another post.</p>
<p>I&#8217;ve got a configuration in mind which I&#8217;ll document over time, probably. Sorry for being so incredibly vague on the time-line, but my job isn&#8217;t to document Linux and EqualLogic configurations so I&#8217;m only doing this &#8220;for fun&#8221; between learning about the PS Series arrays (have to do a live demo &#8220;soon&#8221;) and various other job tasks.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2010/07/21/iscsi-on-fedora-13/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Can PeeCees (PC) ever be used for mission critical workloads?</title>
		<link>http://linux.sjolshagen.net/2010/04/22/can-peecees-pc-ever-be-used-for-mission-critical-workloads/</link>
		<comments>http://linux.sjolshagen.net/2010/04/22/can-peecees-pc-ever-be-used-for-mission-critical-workloads/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 20:38:23 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mission Critical Computing]]></category>
		<category><![CDATA[mission critical]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=205</guid>
		<description><![CDATA[Heresy! I think PCs are ready to host truly mission-critical workloads today...]]></description>
			<content:encoded><![CDATA[<p>Obviously, I&#8217;m not referring to the &#8220;BestBuy&#8221; version of computers we all tend to have in our own homes. I&#8217;m referring to servers built on the either the 64-bit x86 processors from AMD or Intel. Forgive me, as I tend to get a little agitated when people attempt to define &#8220;Mission Critical&#8221; from a perspective of server hardware. To me, doing so is utter nonsense, since it&#8217;s really how the hardware is used that defines whether it&#8217;s part of a &#8220;Mission Critical&#8221; (or &#8220;Business Critical&#8221;) solution or not.</p>
<p><span id="more-205"></span></p>
<p>There are plenty of people out there, using hardware that the hardware vendors have not classified as &#8220;Mission Critical&#8221;, for what amounts to being highly &#8220;mission critical&#8221; solutions for their businesses, and vice versa (people using servers that are &#8220;mission-critical&#8221; for workloads that really aren&#8217;t). Examples of this use could include mail servers, firewalls, small but critical databases, etc, etc. There are also examples that are time dependent in nature; For instance, what would happen if a file and print service that was being used by the finance department to generate various time sensitive reports went off-line during the end of quarter or year processing&#8230;?</p>
<p>I know, it&#8217;s a contrived example, but it does actually demonstrate the point. It is how a  given system is used within the business that defines its degree of criticality, not the server it runs on!</p>
<p>I&#8217;ll be the first to concede that hardware certainly can help ensure that a mission critical service/workload remains available to its end users (and can, sometimes, be very good at ensuring the service/workload is <em>not</em> available too!) but it&#8217;s by no means the only or most critical component in that equation!</p>
<p>What defines &#8220;availability&#8221;?</p>
<p>To some, the &#8220;number of nines&#8221; &#8211; i.e. &#8220;five nines&#8221; means 99.999% availability &#8211; is the gold standard. I tend to agree that the &#8220;number of nines&#8221; is certainly not only one of the best known metrics for availability, it&#8217;s also a very good one. It captures the essence of the problem; How much time did my service spend being available to its consumers versus the amount of time it was <strong>un</strong>available. And a typical &#8220;Mission Critical&#8221; environment tends to operate within the 4-5 &#8220;nines&#8221; range.</p>
<p>Since &#8220;four nines&#8221; represents about 52 minutes of downtime, and &#8220;five nines&#8221; about 5 minutes of downtime per year, most people tend to only think in terms of large, expensive, &#8220;enterprise class&#8221; servers when thinking about architecting for mission critical workloads. Why? Because, historically speaking, these systems were the only ones where it was technologically feasible to include the level of silicon and hardware designs containing the capabilities needed in order to guarantee four or five nines at a price point customers (you) were willing to accept.</p>
<p>However, with the  growing acceptance of virtualization technologies such as VM Ware, Microsoft hyper B., Citrix and server and the various open source virtualization technologies included in the major commercial Linux distributions, the picture of what a &#8220;mission-critical&#8221; server looks like has changed.</p>
<p>It&#8217;s now possible to quickly build &#8220;always on&#8221; system architectures based on industry-standard hardware and extremely flexible hypervisor&#8217;s and management software. And you can do it for  what amounts to pennies on the dollar compared to the traditionally very expensive and often proprietary systems from the likes of Bull, Fujitsu, NEC, IBM,  Sun (now Oracle), HP, etc.</p>
<p>In my view, the greatest paradigm shift in terms of highly available mission-critical workload designs, follows on the heels of <em>one</em> key enabling technology. The advent and acceptance of live-migration in production environments, basically means that there are no  technological limits to how flexible your application environment can be. If you were to pair &#8220;always-on&#8221; live migration, resource management, high availability services, data replication and a little bit of ingenuity, you could with relative ease have a fault tolerant solution for your application environment.  Or, if your resource needs aren&#8217;t too great, you could leverage the VMware ESX 4.0 fault tolerance capability. Basically the sky&#8217;s the limit!</p>
<p>So, to answer my first question, yes PCs can be used for mission-critical workloads. The introduction of virtualization technologies to the x86 platform only makes your job of ensuring availability for those mission-critical workloads a whole lot easier. At least, that&#8217;s my opinion.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2010/04/22/can-peecees-pc-ever-be-used-for-mission-critical-workloads/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scaling up your virtualization solution on 8-socket HP ProLiant Servers</title>
		<link>http://linux.sjolshagen.net/2010/03/01/scaling-up-your-virtualization-solution-on-8-socket-hp-proliant-servers/</link>
		<comments>http://linux.sjolshagen.net/2010/03/01/scaling-up-your-virtualization-solution-on-8-socket-hp-proliant-servers/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 19:10:28 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[8-socket]]></category>
		<category><![CDATA[DL 785]]></category>
		<category><![CDATA[HP ProLiant]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[RHEL 5.4]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=145</guid>
		<description><![CDATA[Some of the things we've learned while testing the KVM based virtualization solution in RHEL 5.4 on an 8-socket HP ProLiant server.]]></description>
			<content:encoded><![CDATA[<p>These days, when wearing my “Linux planner” hat, and with Virtualization being the “phrase that pays”, I’m often asked to help provide guidance on how to best take advantage of the technology included in our 8-socket HP ProLiant server offerings for Linux based virtualization solutions like Red Hat Enterprise Virtualization or Suse Linux Enterprise Server Xen (there’s a plethora of information out there about VMware ESX/ESXi 3.5.x and vSphere 4.0, so I’m not going to talk about that, this time around.)</p>
<p>The problem I’ve had, until recently, was providing actual – objective &#8211; data as a means to help illustrate my points.  For instance, I could not clearly illustrate how a snoop filter on the CPU interconnect can improve the linearity of the workload scalability in a virtualized environment (see Fig. 1).</p>
<div id="attachment_143" class="wp-caption aligncenter" style="width: 310px"><a href="http://linux.sjolshagen.net/wp-content/uploads/2010/03/Best-run-pinned-vs-unpinned.png"><img class="size-medium wp-image-143" title="Pinned and un-pinned tiles" src="http://linux.sjolshagen.net/wp-content/uploads/2010/03/Best-run-pinned-vs-unpinned-300x192.png" alt="" width="300" height="192" /></a><p class="wp-caption-text">Fig. 1: Average response time with pinned vs. un-pinned processors</p></div>
<p>I was unable to demonstrate benefits of the NUMA aware scheduler that the Linux kernel uses and how it <em>does</em> improve performance. (In figure 2, it’s represented by the improvement in average response times from the web-servers included in the workload) when your workloads run with memory interleaving disabled – see Fig. 2 and 3. Unless, for support reasons, your application vendor explicitly tells you otherwise, of course!</p>
<div id="attachment_151" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-151" href="http://linux.sjolshagen.net/2010/03/scaling-up-your-virtualization-solution-on-8-socket-hp-proliant-servers/non-interleaved-memory-avg_response/"><img class="size-medium wp-image-151" title="Non-interleaved Memory Config" src="http://linux.sjolshagen.net/wp-content/uploads/2010/03/non-interleaved-memory-avg_response-300x192.png" alt="" width="300" height="192" /></a><p class="wp-caption-text">Fig. 2: Average Response Times - Non-interleaved Memory Config</p></div>
<div id="attachment_153" class="wp-caption aligncenter" style="width: 310px"><a href="http://linux.sjolshagen.net/wp-content/uploads/2010/03/Interleaved-memory-avg-response.png"><img class="size-medium wp-image-153" title="Average Response Times - Interleaved RAM" src="http://linux.sjolshagen.net/wp-content/uploads/2010/03/Interleaved-memory-avg-response-300x225.png" alt="" width="300" height="225" /></a><p class="wp-caption-text">Fig. 3: Average Response Times - Interleaved memory</p></div>
<p>I also used to have a hard time explaining how and why to tune the Linux kernel for these systems. For instance, I only suspected how little (none) tuning of the host platform is required in order to drive pretty significant numbers of guests  (98) in these environments &#8211; see Fig. 4. But, if you engage in some very minor tuning activities of the network stack, how those very same workload performance results can be extended even further (to 256 guests) – see Fig. 5:</p>
<div id="attachment_161" class="wp-caption aligncenter" style="width: 310px"><a href="http://linux.sjolshagen.net/wp-content/uploads/2010/03/forgot-to-tune-linearity-graph.png"><img class="size-medium wp-image-161" title="Default tuning for Host server" src="http://linux.sjolshagen.net/wp-content/uploads/2010/03/forgot-to-tune-linearity-graph-300x192.png" alt="" width="300" height="192" /></a><p class="wp-caption-text">Fig. 4: The system has not been tuned beyond it&#39;s &quot;out of the box&quot; state.</p></div>
<div id="attachment_163" class="wp-caption aligncenter" style="width: 310px"><a href="http://linux.sjolshagen.net/wp-content/uploads/2010/03/tuned-slice.png"><img class="size-medium wp-image-163" title="Fully tuned and linear scalability" src="http://linux.sjolshagen.net/wp-content/uploads/2010/03/tuned-slice-300x192.png" alt="" width="300" height="192" /></a><p class="wp-caption-text">Fig. 5: System is tuned and exhibiting linear scalability to 256 KVM guests</p></div>
<p>As part of a joint documentation effort with Red Hat, all of the data collected has been brought together in a <a href="https://inquiries.redhat.com/go/redhat/rhel-hp-proliant">Reference Architecture document  &#8211; “Scaling RHEL 5.4 + KVM up to 256 Guests&#8221;</a> available for free from Red Hat’s website.</p>
<p>We obviously picked the guest density to prove a point about the platform, however it’s worth mentioning that <strong><em>256 guests</em></strong> <strong><em>does not represent the upper bound for the platform</em></strong>. It only represents where we thought the density went (far) beyond what is reasonable to expect in a production environment this day in age.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2010/03/01/scaling-up-your-virtualization-solution-on-8-socket-hp-proliant-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;GFS2 rindex not found&#8221; when running gfs2-grow from gfs2-utils-3.0.6 in Fedora 12</title>
		<link>http://linux.sjolshagen.net/2010/01/21/gfs2-rindex-not-found-when-running-gfs2-grow-from-gfs2-utils-3-0-6-in-fedora-12/</link>
		<comments>http://linux.sjolshagen.net/2010/01/21/gfs2-rindex-not-found-when-running-gfs2-grow-from-gfs2-utils-3-0-6-in-fedora-12/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 18:39:42 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora 12]]></category>
		<category><![CDATA[GFS2]]></category>
		<category><![CDATA[gfs2_grow]]></category>
		<category><![CDATA[rindex not found]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=121</guid>
		<description><![CDATA[GFS2 file system can't grow due to rindex not found" error with version 3.0.6 of gfs2-utils. Updated .rpm for Fedora 12 is linked.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve come across a minor annoyance that I figured it was worth documenting.</p>
<p>I was looking to grow a shared (clustered) GFS2 file system I&#8217;m using for my web server and did the &#8220;usual&#8221; magic of extending the underlying logical volume (clvm managed), extend the disk label with fdisk and fsck -f the device so as to ensure there&#8217;s nothing latent in the metadata or data to cause my &#8220;grow&#8221; command to fail.</p>
<p>Then I issued</p>
<blockquote>
<pre># gfs2_growfs /webroot</pre>
</blockquote>
<p>Which failed with the following error:</p>
<blockquote>
<pre>[snip] GFS2 rindex not found.  Please run gfs2_fsck</pre>
</blockquote>
<p>Well, that&#8217;s interesting&#8230;.</p>
<p>Turns out an update to  GFS2 didn&#8217;t get reflected in gfs2_grow, so it&#8217;s looking in the wrong place for the rindex. The problem has been addressed upstreamand you can (I hope) expect to see the next version of the gfs2-utils (3.0.7) contain the fix.</p>
<p><strong><em><span style="color: #008000;">UPDATE:</span></em></strong> <em>The <a href="http://linux.sjolshagen.net/documents/index.php?dir=RPM%2F">linked .rpm </a>for Fedora 12 resolves the problem. The bug is a minor fix, thankfully, so I&#8217;d be surprised if a fixed version of the gfs2-utils package will not be included when they make the Cluster v3.0.7 packages available in the fedora-updates repository. </em></p>
<p>Thanks to the stellar help from the folks in the #linux-cluster channel on the Freenode IRC network! (fabbione, bob_home and abhi)</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2010/01/21/gfs2-rindex-not-found-when-running-gfs2-grow-from-gfs2-utils-3-0-6-in-fedora-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KVM/Qemu and caching of I/O</title>
		<link>http://linux.sjolshagen.net/2010/01/10/kvmqemu-and-caching-of-io/</link>
		<comments>http://linux.sjolshagen.net/2010/01/10/kvmqemu-and-caching-of-io/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 15:00:36 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[disk i/o]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=97</guid>
		<description><![CDATA[A feeble(ish) attempt at documenting the 'cache' properties for the Kernel Virtual Machine when managed by libvirtd.]]></description>
			<content:encoded><![CDATA[<p>I like to live &#8220;on the edge&#8221;. At least technologically speaking.</p>
<p>As a consequence, in my environment, I&#8217;ve got a couple of KVM guests that are running Fedora 12 with Red Hat Cluster v3.0.6 installed. That&#8217;s not really &#8220;living on the edge&#8221;. The &#8220;living on the edge&#8221; part of that configuration is that the two guests share a clustered file system. This clustered file system is hosted on a DRDB replicated volume between two standard internal SATA drives hosted on two different KVM host systems. And these host systems are, in turn their own Fedora 12 based Red Hat Cluster.</p>
<p>Obviously, there are plenty of opportunities for data to go &#8220;missing&#8221; (get corrupted/get lost/disappear/etc) in a configuration like this. And I thought I&#8217;d been able to eliminate them all.</p>
<p>That was what I thought, until I ran one of the KVM guests on one of the hosts, and the other on the other. My GFS2 file system wasn&#8217;t impressed! And I was stumped. DRBD had been configured with synchronous replication (let&#8217;s not talk about the performance impact of that decision, shall we&#8230;?) but obviously the data wasn&#8217;t being committed simultaneously to both drives<sup>[1]</sup>.</p>
<p>I now suspect that&#8217;s happening because the KVM hosts were caching the data on the guests behalf. Could be a very spiffy performance boost<sup>[2]</sup> but causes all sorts of problems for my clustered applications that rely on the data in the file system being where it&#8217;s supposed to be.</p>
<p>So, I had to dig around a little and discovered  that Qemu/KVM/libvirt actually supports setting the caching properties for the &#8216;physical&#8217; devices backing its virtual hard drives (i.e. the hard drives or container files exported to the guest as &#8220;disks&#8221;). And it&#8217;s &#8211; if you&#8217;re using the CLI interfaces for managing KVM, libvirtd &amp; virsh &#8211; fairly easy to set it to what you want/need it to be.</p>
<p>The caching properties you can set are:</p>
<ul>
<li>writeback</li>
<li>writethrough</li>
<li>none</li>
<li>default</li>
</ul>
<p>Unfortunately, I&#8217;ve not been able to locate some way to set this while creating the guest with virt-manager. However, virt-install does let you set it, and if the guest is inactive (i.e. not running), you can set it by editing the &lt;driver&gt; tag.</p>
<p>For example:</p>
<blockquote>
<pre>&lt;disk type='block' device='disk'&gt;
   &lt;driver name='qemu' cache='none'/&gt;
   &lt;source dev='/dev/mapper/sharedVG01-www--local'/&gt;
   &lt;target dev='vde' bus='virtio'/&gt;
&lt;/disk&gt;</pre>
</blockquote>
<div><span style="color: #800000;">NOTE: </span><span style="color: #000080;">Early versions of libvirtd may </span><strong><em><span style="color: #000080;">not</span></em><span style="font-weight: normal;"><span style="color: #000080;"> support the &lt;driver cache=&#8221;&gt; nomenclature.</span> I&#8217;m using 0.7.5 in my environment, but I believe any recent (0.7 and later, for sure) of libvirtd include support for this. To check your libvirt version, issue the command:</span></strong></div>
<blockquote>
<pre># virsh version</pre>
</blockquote>
<pre></pre>
<h3>Apropos:</h3>
<pre></pre>
<p>[1] = I know, I know. A DRBD mirror set up to use &#8220;protocol C&#8221; doesn&#8217;t, technically, commit the data simultaneously to both devices. It only &#8220;looks&#8221; like that because the write() operation does not return success until the data has been successfully written on the &#8220;remote&#8221; device as well as the local one.</p>
<p>[2] = It is, actually. As an example, the reason why the likes of Xen, KVM, etc have been able to post IO benchmarks that are more than 100% the performance of the underlying hardware is because the host environment caches the data on the guests behalf. Looks good on benchmarks. Not so much if your host fails before the data have been flushed from the host cache onto the physical disk devices. Applications tend to get cranky when data they &#8220;know&#8221; was committed to persistent storage is missing&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2010/01/10/kvmqemu-and-caching-of-io/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting ready for an industry conference</title>
		<link>http://linux.sjolshagen.net/2009/05/09/getting-ready-for-an-industry-conference/</link>
		<comments>http://linux.sjolshagen.net/2009/05/09/getting-ready-for-an-industry-conference/#comments</comments>
		<pubDate>Sat, 09 May 2009 17:44:10 +0000</pubDate>
		<dc:creator>Thomas S</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://linux.sjolshagen.net/?p=6</guid>
		<description><![CDATA[I wound up with more work on my plate this week in order to get ready for a large conference this summer where I need to talk about scalability, performance and virtualization of large scale-up platforms. ]]></description>
			<content:encoded><![CDATA[<p>This week was one of those &#8220;in spite of the best laid plans of mice and men&#8221; weeks.</p>
<p>One of the engineers I&#8217;ve been working with to help me get a better understanding for what the performance and scalability of a scale-up environment when being used to run Red Hat Virtualization (Xen) as well as the Kernel Virtual Machine (KVM) is changing roles within the company. Good for him!</p>
<p>Unfortunately, this means that I&#8217;ll have to do some of the data-collection work on my own. On top of my daily responsibilities. So, we met this week to try and figure out how we could compress what&#8217;s been, thus far, a multi-month effort into something a bit more schedule friendly for the both of us. And I think we&#8217;ve got a reasonable plan, all things considered.</p>
<p>One of the achilles heels of almost any of the virtualization solutions, thus far, has been the IO throughput (and latency) for disk related IO operations. If you look at testing done by various vendors and the Open Source community at large, the throughput has been either &#8220;not great&#8221; or inconsistent. The &#8220;not great&#8221; element of this hasn&#8217;t, historically, really been that huge of a deal for customers, since they seem to have planned around it by not including disk IO intensive workloads into their consolidation/virtualization plans.</p>
<p>However, more and more customers are looking to virtualize <em>everything</em> running on their server platforms in an effort to save power, cooling and management costs. As a result, the &#8220;not great&#8221; performance behavior has become enough of an issue that all of the virtualization vendors now support (or will in the near future), minimally, para-virtualized IO drivers and/or other performance optimizations.</p>
<p>Consequently, they also appear to be pushing Linux (and Windows) further &#8220;back&#8221; into their data centers and looking to use the two for more and more critical tasks, even in a virtualized/consolidated context. An on-going problem for myself and our customers has been the amount of fact-based information available in terms of how to best configure these environments to optimize IO performance or to help customers understand the actual limitations and benefits of the various IO options in a virtualized environment.</p>
<p>Also, there&#8217;s very little in terms of stated best practices for using things like raw devices, volume manager backed devices, file systems or file containers for the various types of workloads. So, I was hoping we&#8217;d be able to provide some of that in a presentation at a large conference this summer.  And my original plan was that I&#8217;d only be the consumer of the data, not the creator of it. Thus the &#8220;best laid plans of mice and men&#8221; statement early on.</p>
<p>So, for the next couple of weeks, I&#8217;ll be trying to collect whatever the engineer is unable to collect. Then I&#8217;ll have to graph it, &#8216;gussy it up&#8217; (with pretty colors), add some configuration recommendations and bring it all with me to the sessions I have planned for the conference.</p>
]]></content:encoded>
			<wfw:commentRss>http://linux.sjolshagen.net/2009/05/09/getting-ready-for-an-industry-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

