<?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>Linux</title> <atom:link href="http://linux.sjolshagen.net/feed/" rel="self" type="application/rss+xml" /><link>http://linux.sjolshagen.net</link> <description>Linux for Businesses</description> <lastBuildDate>Thu, 07 Mar 2013 13:57:41 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.5.1</generator> <item><title>Configuring your Google Latitude API Plug-in on Vera</title><link>http://linux.sjolshagen.net/2013/03/06/configuring-your-google-latitude-api-plug-in-on-vera/</link> <comments>http://linux.sjolshagen.net/2013/03/06/configuring-your-google-latitude-api-plug-in-on-vera/#comments</comments> <pubDate>Wed, 06 Mar 2013 21:58:36 +0000</pubDate> <dc:creator>Thomas S</dc:creator> <category><![CDATA[Home Automation]]></category> <category><![CDATA[google latitude]]></category> <category><![CDATA[google latitude plugin]]></category> <category><![CDATA[micasaverde]]></category> <category><![CDATA[plugin]]></category> <category><![CDATA[vera]]></category><guid
isPermaLink="false">http://linux.sjolshagen.net/?p=561</guid> <description><![CDATA[You&#8217;re probably here because you saw the warning/error on the alerts panel of your your Micasaverde Vera page and/or are looking for information on how to properly configure the device? Well, look no further! (real soon now) Under construction]]></description> <content:encoded><![CDATA[<p>You&#8217;re probably here because you saw the warning/error on the alerts panel of your your Micasaverde Vera page and/or are looking for information on how to properly configure the device?</p><p>Well, look no further! (real soon now)</p><h1>Under construction</h1> ]]></content:encoded> <wfw:commentRss>http://linux.sjolshagen.net/2013/03/06/configuring-your-google-latitude-api-plug-in-on-vera/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Not really about Linux&#8230; (But a little about Google Calendar &amp; Apple iPhone/iPad)</title><link>http://linux.sjolshagen.net/2012/02/18/not-really-about-linux/</link> <comments>http://linux.sjolshagen.net/2012/02/18/not-really-about-linux/#comments</comments> <pubDate>Sat, 18 Feb 2012 17:04:23 +0000</pubDate> <dc:creator>Thomas S</dc:creator> <category><![CDATA[Google Calendar]]></category> <category><![CDATA[iPad]]></category> <category><![CDATA[iPhone]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Virtualization]]></category> <category><![CDATA[Apple]]></category><guid
isPermaLink="false">http://linux.sjolshagen.net/?p=554</guid> <description><![CDATA[Although I enjoy Linux, and my home infrastructure relies on it: Self hosted (Fedora 16) 2 node KVM/RH Cluster (for hosting KVM Guests/VMs) 2 KVM instances running Fedora 15 (soon to be upgraded) Keepalived (IPVS) to ensure seamless connectivity from external hosts 2nd Cluster between the two KVM guest instances Guests/VMs running IMAPD (Dovecot 2)...]]></description> <content:encoded><![CDATA[<p>Although I enjoy Linux, and my home infrastructure relies on it:</p><ul><li>Self hosted (Fedora 16)</li><li>2 node KVM/RH Cluster (for hosting KVM Guests/VMs)</li><li>2 KVM instances running Fedora 15 (soon to be upgraded)</li><li>Keepalived (IPVS) to ensure seamless connectivity from external hosts</li><li>2nd Cluster between the two KVM guest instances</li><ul><li>Guests/VMs running IMAPD (Dovecot 2) based webmail instances (Multi-instance or &#8220;Active/Active&#8221;)</li><li>Postfix 2.x based SMTP instances (Multi-instance or &#8220;Active/Active&#8221;)</li><li>Replicated Master-Master MySQL instances (Multi-instance or &#8220;Active/Active&#8221;)</li><li>Apache 2.x instance in each KVM (Multi-instance or &#8220;Active/Active&#8221;)</li></ul><li>Roundcube and Horde as webmail options for users</li></ul><p>I also happen to have a few Apple products deployed in my environment. Basically, I got tired of tinkering with Linux for things like music/media/etc and just wanted a plug &#8216;n play ecosystem where the components &#8220;just worked&#8221; together with no interaction from me.</p><p>I also have a home automation system (Vera2 from <a
href="http://www.micasaverde.com">www.micasaverde.com</a>) which I have integrated with the Google Calendar service to wake me up in the morning (the lights in the bedroom are gradually made brighter based on a trigger &#8211; alert &#8211; from Google Calendar). So, I obviously need to be able to edit my calendar alerts based on when I need/want to get up in the morning. And I don&#8217;t want to have to bring a laptop to bed in order to do so.</p><p>Also, since the wake-up alerter isn&#8217;t really an appointment I&#8217;d like to keep in my regular calendar, I created a secondary private Google Calendar instance for this purpose.</p><p>Then I attempted to make my iPhone access this secondary Google Calendar&#8230;</p><p>It took a little searching (there are a lot of incorrect, old, articles on this subject it seems), but I managed to find the following link which helps me <a
href="http://www.google.com/calendar/iphoneselect">select which of the calendars should be visible on an Apple iPad or iPhone device</a>.</p><p>&nbsp;</p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://linux.sjolshagen.net/2012/02/18/not-really-about-linux/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <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>Quick &amp; Dirty Disaster Recovery: eSATA + iSCSI + RAID-1 + BackupPC</title><link>http://linux.sjolshagen.net/2010/09/23/quick-dirty-disaster-recovery-esata-iscsi-raid-1-backuppc/</link> <comments>http://linux.sjolshagen.net/2010/09/23/quick-dirty-disaster-recovery-esata-iscsi-raid-1-backuppc/#comments</comments> <pubDate>Thu, 23 Sep 2010 16:59:14 +0000</pubDate> <dc:creator>Thomas S</dc:creator> <category><![CDATA[Backup]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Mission Critical Computing]]></category> <category><![CDATA[Storage]]></category> <category><![CDATA[BackupPC]]></category> <category><![CDATA[disaster recovery]]></category> <category><![CDATA[Fedora 13]]></category> <category><![CDATA[iscsi]]></category> <category><![CDATA[mdadm]]></category> <category><![CDATA[raid-1]]></category><guid
isPermaLink="false">http://linux.sjolshagen.net/?p=493</guid> <description><![CDATA[Scripts &#038; ideas for a sneaker-net based Disaster Recovery solution using BackupPC, iSCSI RAID Array(s) and hot-plug capable eSATA drive docks.]]></description> <content:encoded><![CDATA[<p>With the purchase of 4x 1TB Western Digital Caviar (Black) drives, my trusty iSCSI RAID &#8220;array&#8221;, an eSATA external drive (hotplug) and a car, I&#8217;ve got myself the hardware infrastructure to enable offsite backups.</p><p>Two of the 1TB drives are mirrored in my iSCSI RAID. The iSCSI RAID array exports this volume to my backup master host and I use this iSCSI volume as 1/2 of a MD based Raid-1 mirror that hosts the backup spool for my environment. Every morning, I&#8217;ve got a script to stop the backup software, sync the drive and unmount the ext4 file system hosting the spool before splitting the MD Raid-1 mirror and disconnecting the eSATA connected 3d drive. I can then safely remove the drive, put it in protective packaging and bring it to my office where I swap this 3rd drive with a 4th that was stored in my office overnight.</p><p>At night, the reverse process is scripted to connect the &#8220;office-drive&#8221; to the backup volume. Scanning the bus for the eSATA device triggers a udev action to join the office drive to the /dev/md device and thus start the resync of the two volumes. This is fully non-disruptive, if you ignore the performance &#8216;hit&#8217;, and the goal is that before the morning &#8220;split&#8221; job starts running, the mirror will be merged and a new fresh copy can go to the office.</p><p>I recognize the fact that the /usr/local/bin/{add,drop}-device scripts are very quick &amp; dirty and can stand to be cleaned up quite a bit. For instance, the retry logic could be pulled out in bash functions and called in a loop with a configurable number of retries, etc, etc, etc. But, the point is it was &#8220;quick and dirty&#8221;.<span
id="more-493"></span></p><p><span
style="color: #0000ff;">In /etc/mdadm.conf</span></p><pre class="crayon-plain-tag">MAILADDR root@sjolshagen.net
DEVICE /dev/raid-mirror0-p1
DEVICE /dev/raid-backup4-p1
ARRAY /dev/md/127 metadata=1.2 UUID=56a8ce1e:294930a4:72073552:3f6dd2a7 name=virt1-backup.sjolshagen.net:127</pre><p><span
style="color: #0000ff;">To start the host mirror (RAID-1) containing the iSCSI volume &amp; the eSATA drive (/dev/md127 in my case) I&#8217;ve included the following in /etc/rc.local and disabled the BackupPC init service (# chkconfig backuppc stop ):</span></p><pre class="crayon-plain-tag">/sbin/mdadm /dev/md127 --assemble --force --auto=yes --bitmap=/var/lib/md-bitmaps/md127.bitmap /dev/raid-mirror0-p1
mount /dev/md127 /var/lib/BackupPC
res=$?
if [ ${res} -ne 0 ]
then
     echo &quot;Mount of /dev/md127 to /var/lib/Backup failed!&quot;
     exit 1
fi
service backuppc start</pre><p><span
style="color: #0000ff;">Additionally, I&#8217;ve created the following udev rules to add the eSATA drive to the mirror when the drive(s) are detected by the kernel:</span></p><pre class="crayon-plain-tag"># Saved in /etc/udev/rules.d/10-local.rules
#
KERNEL==&quot;*[0-9]&quot;, IMPORT{parent}==&quot;ID_*&quot;

# ESATA drives (using their serial numbers/IDs)
KERNEL==&quot;sd*&quot;, ENV{ID_SERIAL_SHORT}==&quot;WD-WMATV3081234&quot;, SYMLINK+=&quot;raid-backup0-p%n&quot;, RUN+=&quot;/usr/local/bin/attach_raid.sh /dev/md127 /dev/raid-backup0-p%n&quot;
KERNEL==&quot;sd*&quot;, ENV{ID_SERIAL_SHORT}==&quot;WD-WMATV3131170&quot;, SYMLINK+=&quot;raid-backup1-p%n&quot;, RUN+=&quot;/usr/local/bin/attach_raid.sh /dev/md127 /dev/raid-backup1-p%n&quot;

# For the iSCSI volume
KERNEL==&quot;sd*&quot;, ENV{ID_SERIAL_SHORT}==&quot;WD-WCATR0362494&quot;, SYMLINK+=&quot;raid-iscsi-mirror-p%n&quot;, RUN+=&quot;/usr/local/bin/attach_raid.sh /dev/md127 /dev/raid-iscsi-mirror-p%n&quot;</pre><p><span
style="color: #0000ff;">The /usr/local/bin/add-device script that runs multiple times on weekday nights:</span></p><pre class="crayon-plain-tag">#!/bin/bash
#
DATE=$(date +%c)
echo &quot;**************** ${DATE} *******************&quot;
/bin/ls /dev/raid-backup* &amp;gt;&amp;gt;/dev/null 2&amp;gt;&amp;amp;1
res=$?

if [ ${res} -ne 0 ]
then
	echo &quot;The drive is not connected yet&quot;
	echo &quot;- - -&quot; &amp;gt; /sys/class/scsi_host/host6/scan
	echo &quot;- - -&quot; &amp;gt; /sys/class/scsi_host/host7/scan
	exit 0
else
	echo &quot;The drive is already connected - no need to look (scan) for it&quot;
        exit 0
fi</pre><p><span
style="color: #0000ff;">The /usr/local/bin/drop-device script that runs every weekday morning:</span></p><pre class="crayon-plain-tag">#!/bin/bash
#
DEV=$(ls -l /dev/raid-backup?-p1 | awk '{ print $11 }' | cut -c 1-3)
MD_DEV=$(cat /proc/mdstat | grep md |grep -v bitmap | awk '{ print $1 }')

DATE=$(date +%c)
MAIL_ADM=&quot;root@host.com&quot;

# Add &quot;header&quot;
echo &quot;*********** ${DATE} ***********&quot;

/bin/ls /dev/raid-backup* &amp;gt;&amp;gt;/dev/null 2&amp;gt;&amp;amp;1
res=$?

if [ ${res} -ne 0 ]
then
     echo &quot;Drive not connected - nothing to do&quot;
     echo &quot;Exiting&quot;
     exit
fi

echo &quot;---------------------------------------&quot;
/bin/cat /proc/mdstat
echo &quot;---------------------------------------&quot;

RAID_STATE=$(/sbin/mdadm --misc -t --detail /dev/${MD_DEV} &amp;gt;/dev/null)
res=$?

if [ ${res} -ne 0 ]
then
        echo &quot;The array is not clean &amp;amp; rebuilt&quot;
        echo &quot;Rescheduling and will try again in 15 minutes&quot;
        /usr/bin/at -f /usr/local/bin/drop-device now + 15 minutes &amp;gt;&amp;gt; /var/log/drop-device.log 2&amp;gt;&amp;amp;1
        exit 1
fi

/sbin/service backuppc stop
res=$?

if [ ${res} -ne 0 ]
then
        echo &quot;Unable to stop BackupPC service - Exiting&quot;
        exit 1
fi

sync ; sync ; sync
umount /var/lib/BackupPC
res=$?

if [ ${res} -ne 0 ]
then
        echo &quot;Failed to unmount ${BACKUP_LOC}&quot;
        echo &quot;Restarting service and quitting&quot;
        service backuppc start
        exit 1
fi

/sbin/mdadm /dev/${MD_DEV} --fail /dev/${DEV}1
res=$?

if [ ${res} -ne 0 ]
then
        echo &quot;Failed to remove /dev/${DEV}1 from /dev/${MD_DEV}&quot;
        sleep 5
        echo &quot;Retrying....&quot;
        /sbin/mdadm /dev/${MD_DEV} --fail /dev/${DEV}1
        res=$?

        if [ ${res} -ne 0 ]
        then
                echo &quot;Removal of /dev/${DEV}1 from /dev/${MD_DEV} failed&quot; | mail -s &quot;Failed mirror operation&quot; ${MAIL_ADM}
                exit 1
        fi
fi

sleep 15
/sbin/mdadm /dev/${MD_DEV} --remove /dev/${DEV}1
res=$?

if [ ${res} -ne 0 ]
then
        echo &quot;Failed to hotplug /dev/${DEV}1 from /dev/${MD_DEV}&quot;
        sleep 5
        echo &quot;Retrying....&quot;
        /sbin/mdadm /dev/${MD_DEV} --fail /dev/${DEV}1
        res=$?

        if [ ${res} -ne 0 ]
        then
                echo &quot;Still no luck on the hotplug operation&quot;
                echo &quot;giving up and quitting&quot;
                echo &quot;Unplug of /dev/${DEV}1 from /dev/${MD_DEV} failed&quot; | mail -s &quot;Failed mirror operation&quot; ${MAIL_ADM}
                exit 1
        fi
fi

/bin/mount /dev/${MD_DEV} /var/lib/BackupPC
res=$?

if [ ${res} -ne 0 ]
then
        echo &quot;Unable to mount /dev/${MD_DEV} to /var/lib/BackupPC&quot;
        exit 1
else
        /sbin/service backuppc start
fi

# Remove the block device from the system
echo 1 &amp;gt; /sys/block/${DEV}/device/delete</pre><p><span
style="color: #0000ff;">The cron entry for the two scripts:</span></p><pre class="crayon-plain-tag"># sudo crontab -l
45 05 * * 1-5 /usr/local/bin/drop-device &amp;gt;&amp;gt; /var/log/drop-device.log 2&amp;gt;&amp;amp;1
0,15,30,45 17-23 * * 1-5 /usr/local/bin/add-device &amp;gt;&amp;gt; /var/log/add-device.log 2&amp;gt;&amp;amp;1</pre><p></p> ]]></content:encoded> <wfw:commentRss>http://linux.sjolshagen.net/2010/09/23/quick-dirty-disaster-recovery-esata-iscsi-raid-1-backuppc/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 class="crayon-plain-tag"># Intel Corporation 82571EB Gigabit Ethernet Controller
DEVICE=eth2
BOOTPROTO=none
HWADDR=00:15:17:6C:97:94
&lt;strong&gt;#IPADDR=X.X.Z.231
#NETMASK=255.255.255.0
#PREFIX=24
#DEFROUTE=yes&lt;/strong&gt;
ONBOOT=yes
TYPE=Ethernet
&lt;strong&gt;#DNS1=[DNS-SERVER1]
#DNS2=[DNS-SERVER2]&lt;/strong&gt;
IPV6INIT=no
USERCTL=no
IPV4_FAILURE_FATAL=yes
NAME=&quot;System eth2&quot;
&lt;strong&gt;BRIDGE=iscsi-bridge0&lt;/strong&gt;
&lt;strong&gt;MTU=9000&lt;/strong&gt;</pre><p><span
style="font-family: courier new,courier;">/etc/sysconfig/network-scripts/ifcfg-eth3:</span></p><pre class="crayon-plain-tag"># Intel Corporation 82571EB Gigabit Ethernet Controller
DEVICE=eth3
&lt;strong&gt;#IPADDR=X.Y.Z.232
#NETMASK=255.255.255.0
#PREFIX=24
#DEFROUTE=yes
#IPV4_FAILURE_FATAL=yes&lt;/strong&gt;
HWADDR=00:15:17:6C:97:95
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
&lt;strong&gt;BRIDGE=iscsi-bridge1&lt;/strong&gt;
IPV6INIT=no
USERCTL=no
NAME=&quot;System eth3&quot;
&lt;strong&gt;MTU=9000&lt;/strong&gt;</pre><p><span
style="font-family: courier new,courier;">/etc/sysconfig/network-scripts/ifcfg-iscsi-bridge0:</span></p><pre class="crayon-plain-tag">&lt;strong&gt;DEVICE=iscsi-bridge0
ONBOOT=yes
TYPE=Bridge
IPADDR=X.Y.Z.231
NETMASK=255.255.255.0
STP=off
MTU=9000
DELAY=0&lt;/strong&gt;</pre><p><span
style="font-family: courier new,courier;">/etc/sysconfig/network-scripts/ifcfg-iscsi-bridge1:</span></p><pre class="crayon-plain-tag">&lt;strong&gt;DEVICE=iscsi-bridge1
ONBOOT=yes
TYPE=Bridge
IPADDR=X.Y.Z.232
NETMASK=255.255.255.0
MTU=9000
STP=off
DELAY=0&lt;/strong&gt;</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 class="crayon-plain-tag"># 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 class="crayon-plain-tag"># ping -I iscsi-bridge0</pre><p></p><pre class="crayon-plain-tag"># 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><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;color: #0000ff;&quot;&gt;&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;# iscsiadm --mode iface --op=new --interface iscsi-0&lt;/span&gt;&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;color: #0000ff;&quot;&gt;&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;# iscsiadm --mode iface --op=new --interface iscsi-1&lt;/span&gt;&lt;/span&gt;</pre><p></p></blockquote><p>Validate that the new interfaces are stored</p><blockquote><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# iscsiadm --mode iface&lt;/span&gt;&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;default tcp,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;
iser iser,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;
iscsi-0 tcp,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;
iscsi-1 tcp,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;
&lt;/span&gt;</pre><p></p></blockquote><p>Bind the physical NICs to the newly created initiator interfaces</p><blockquote><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;color: #0000ff;&quot;&gt;&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;# iscsiadm --mode iface --op=update --interface iscsi-0 --name=iface.net_ifacename --value=eth2&lt;/span&gt;&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;color: #0000ff;&quot;&gt;&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;# iscsiadm --mode iface --op=update --interface iscsi-1 --name=iface.net_ifacename --value=eth3&lt;/span&gt;&lt;/span&gt;</pre><p></p></blockquote><p>Validate the bindings</p><blockquote><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# iscsiadm --mode iface --interface iscsi-0&lt;/span&gt;&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;# BEGIN RECORD 2.0-872
iface.iscsi_ifacename = iscsi-0
&lt;em&gt;&lt;strong&gt;iface.net_ifacename = eth2&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt; &lt;span style=&quot;font-family: courier new,courier;&quot;&gt;
iface.ipaddress = &amp;lt;empty&amp;gt;
iface.hwaddress = &amp;lt;empty&amp;gt;
iface.transport_name = tcp
iface.initiatorname = &amp;lt;empty&amp;gt;
# END RECORD&lt;/span&gt;</pre><p></p></blockquote><blockquote><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# iscsiadm --mode iface --interface iscsi-1&lt;/span&gt;&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;# BEGIN RECORD 2.0-872
iface.iscsi_ifacename = iscsi-1
&lt;em&gt;&lt;strong&gt;iface.net_ifacename = eth3&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt; &lt;span style=&quot;font-family: courier new,courier;&quot;&gt;
iface.ipaddress = &amp;lt;empty&amp;gt;
iface.hwaddress = &amp;lt;empty&amp;gt;
iface.transport_name = tcp
iface.initiatorname = &amp;lt;empty&amp;gt;
# END RECORD&lt;/span&gt;</pre><p></p></blockquote><blockquote><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;color: #0000ff;&quot;&gt;&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;# iscsiadm --mode iface&lt;/span&gt;&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;default tcp,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;
iser iser,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;
iscsi-0 tcp,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,eth2,&amp;lt;empty&amp;gt;
iscsi-1 tcp,&amp;lt;empty&amp;gt;,&amp;lt;empty&amp;gt;,eth3,&amp;lt;empty&amp;gt;&lt;/span&gt;</pre><p></p></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 class="crayon-plain-tag">## 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 &quot;multipathed&quot;)
blacklist {
     wwid scsi-SATA_WDC_WD800AAJS-1_WD-WMAM9ANC0895
     devnode &quot;^sd[a]$&quot;
     devnode &quot;^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*&quot;
     devnode &quot;^hd[a-z]&quot;
     devnode &quot;^cciss!c[0-9]d[0-9]*[p[0-9]*]&quot;
}

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

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

multipaths {
     multipath {
          wwid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 36090a01850e08bd883c4a45bfa0330ba
          alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; benchmark2
     }
     multipath {
          wwid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 36090a01850e04bd683c4745bfa03b07c
          alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; benchmark1
     }
}</pre><p></p></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><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;color: #0000ff;&quot;&gt;&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;# service multipathd start
# chkconfig multipathd on&lt;/span&gt;&lt;/span&gt;</pre><p></p></blockquote><p>Verify that the device mapper multipath configuration is &#8216;complete&#8217; with the following commands:</p><blockquote><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;color: #0000ff;&quot;&gt;&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;# multipath -v2
# multipath -ll&lt;/span&gt;&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;strong&gt;benchmark2 (36090a01850e08bd883c4a45bfa0330ba) dm-0 EQLOGIC,100E-00&lt;/strong&gt;
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
&lt;strong&gt;benchmark1 (36090a01850e04bd683c4745bfa03b07c) dm-1 EQLOGIC,100E-00&lt;/strong&gt;
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&lt;/span&gt;</pre><p></p></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>Fedora 13: Multi-NIC and IP traffic problems</title><link>http://linux.sjolshagen.net/2010/07/23/linux-multi-nic-and-ip-traffic-routing/</link> <comments>http://linux.sjolshagen.net/2010/07/23/linux-multi-nic-and-ip-traffic-routing/#comments</comments> <pubDate>Fri, 23 Jul 2010 13:25:09 +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 13]]></category> <category><![CDATA[ip]]></category> <category><![CDATA[ipv4]]></category> <category><![CDATA[iscsi]]></category> <category><![CDATA[multi-homed]]></category> <category><![CDATA[nic]]></category> <category><![CDATA[Performance]]></category> <category><![CDATA[rp_filter]]></category> <category><![CDATA[sysctl]]></category> <category><![CDATA[tcpdump]]></category><guid
isPermaLink="false">http://linux.sjolshagen.net/?p=349</guid> <description><![CDATA[Problems with getting all devices to accept IP traffic in multi-homed network configurations (in the same subnet) without using the Linux bonding driver? ]]></description> <content:encoded><![CDATA[<p>Are you only seeing IP traffic on one of two (or more) interfaces in a Fedora 13 environment? I was, and here I&#8217;ll try to explain how I went about resolving (at least working around) the problem for my multi-homed dedicated iSCSI network.</p><p>So, as part of playing in my lab environment to configure <a
href="http://www.fedoraproject.org/">Fedora 13</a> and an iSCSI RAID array (<a
href="http://www.equallogic.com/products/">EqualLogic PS Series array</a>) for multipathing, I ran into a bit of a snag:<span
id="more-349"></span></p><h4>Successful ping to [group-ip] from first iSCSI NIC</h4><blockquote><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# ping -I eth2 [group-ip]&lt;/span&gt;
PING [group-ip] ([group-ip]) from [eth2-ip] eth2: 56(84) bytes of data.
64 bytes from [group-ip]: icmp_seq=1 ttl=255 time=0.103 ms
64 bytes from [group-ip]: icmp_seq=2 ttl=255 time=0.075 ms
64 bytes from [group-ip]: icmp_seq=3 ttl=255 time=0.093 ms
^C
--- [group-ip] ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2927ms
rtt min/avg/max/mdev = 0.075/0.090/0.103/0.013 ms&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# tcpdump -i eth2 icmp[icmptype] == icmp-echo or icmp[icmptype] == icmp-echoreply&lt;/span&gt;
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 65535 bytes
08:30:55.601799 IP [eth2-ip] &amp;gt; [group-ip]: ICMP echo request, id 1650, seq 1, length 64
08:30:55.601933 IP [group-ip] &amp;gt; [eth2-ip]: ICMP echo reply, id 1650, seq 1, length 64
08:30:56.602616 IP [eth2-ip] &amp;gt; [group-ip]: ICMP echo request, id 1650, seq 2, length 64
08:30:56.602693 IP [group-ip] &amp;gt; [eth2-ip]: ICMP echo reply, id 1650, seq 2, length 64
08:30:57.602755 IP [eth2-ip] &amp;gt; [group-ip]: ICMP echo request, id 1650, seq 3, length 64
08:30:57.602831 IP [group-ip] &amp;gt; [eth2-ip]: ICMP echo reply, id 1650, seq 3, length 64&lt;/span&gt;</pre><p></p></blockquote><h4>But failed ping to [group-ip] from second iSCSI NIC</h4><blockquote><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# ping -I eth3 [group-ip]&lt;/span&gt;
PING [group-ip] ([group-ip]) from [eth3-ip] eth3: 56(84) bytes of data.
^C
--- [group-ip] ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2630ms&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# tcpdump -i eth3 icmp[icmptype] == icmp-echo or icmp[icmptype] == icmp-echoreply&lt;/span&gt;
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth3, link-type EN10MB (Ethernet), capture size 65535 bytes
08:31:01.496852 IP [eth3-ip] &amp;gt; [group-ip]: ICMP echo request, id 1906, seq 1, length 64
08:31:01.496970 IP [group-ip] &amp;gt; [eth3-ip]: ICMP echo reply, id 1906, seq 1, length 64
08:31:02.496568 IP [eth3-ip] &amp;gt; [group-ip]: ICMP echo request, id 1906, seq 2, length 64
08:31:02.496660 IP [group-ip] &amp;gt; [eth3-ip]: ICMP echo reply, id 1906, seq 2, length 64
08:31:03.496591 IP [eth3-ip] &amp;gt; [group-ip]: ICMP echo request, id 1906, seq 3, length 64
08:31:03.496650 IP [group-ip] &amp;gt; [eth3-ip]: ICMP echo reply, id 1906, seq 3, length 64&lt;/span&gt;</pre><p></p></blockquote><p>Being, what appears to be, above average dense about this, I spent hours trying to figure out what was wrong. I&#8217;m still not convinced I figured out why this is happening (root cause), but basically the <span
style="color: #0000ff;"><span
style="font-family: courier new,courier;">sysctl</span> </span>tunable <span
style="color: #0000ff;"><span
style="font-family: courier new,courier;">net.ipv4.conf.{all,eth*,default}.rp_filter</span></span> seemingly <strong>defaulting to 1</strong> in Fedora 13, running version 2.6.33.6-147.fc13.x86_64 of the kernel, results in only one of the two NICs connected and configured for the dedicated iSCSI network in my lab environment responding to ICMP or TCP traffic (responses) from the group IP.</p><p>For some reason, if my Fedora host communicates with another (any?) host on the same subnet, it exhibits none of this behavior!</p><p>To work around this problem set you&#8217;ve got a few commands to issue:</p><p>The least work intensive (yet most disruptive and a whole lot like using a sledge hammer for the finishing touches!) option is to change <span
style="color: #0000ff;"><span
style="font-family: courier new,courier;">net.ipv4.conf.default.rp_filter = 1</span></span> to 0 (zero) in <span
style="color: #0000ff;"><span
style="font-family: courier new,courier;">/etc/sysctl.conf</span></span>, and reboot. One (big) problem with this is the case where you&#8217;ve got other multi-homed networks connected to the same host and you <em>want</em> traffic filtering between NICs on the same subnet (not sure why you&#8217;d want that <em>and</em> you&#8217;re not using the bonding driver, but&#8230;).</p><p>Alternatively, you can issue the following command for each of your iSCSI network-facing NICs  (<span
style="color: #0000ff;"><span
style="font-family: courier new,courier;"># sysctl -w net.ipv4.conf.eth{0,1..N}.rp_filter=0</span></span>) and keep your systems and workloads running. Basically, issue the above command for each of your <span
style="font-family: courier new,courier;">eth</span>, <span
style="font-family: courier new,courier;">bridge</span> or <span
style="font-family: courier new,courier;">bond</span> device attached to your dedicated IP network (and expected to read/write to/from the EqualLogic group) and voila(!)  the NICs will &#8220;permit&#8221; packets from the group IP again. NOTE: <em>This (</em><span
style="font-family: courier new,courier;"><span
style="color: #0000ff;"># sysctl -w</span></span> <em>&#8230;) isn&#8217;t persistent across reboots</em>!)</p><h4>Successful ping to [group-ip] from second iSCSI NIC</h4><blockquote><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# ping -I eth2 [group-ip]&lt;/span&gt;
PING [group-ip] ([group-ip]) from [eth2-ip] eth2: 56(84) bytes of data.
64 bytes from [group-ip]: icmp_seq=1 ttl=255 time=0.103 ms
64 bytes from [group-ip]: icmp_seq=2 ttl=255 time=0.075 ms
64 bytes from [group-ip]: icmp_seq=3 ttl=255 time=0.093 ms
^C
--- [group-ip] ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2927ms
rtt min/avg/max/mdev = 0.075/0.090/0.103/0.013 ms&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# tcpdump -i eth2 icmp[icmptype] == icmp-echo or icmp[icmptype] ==  icmp-echoreply&lt;/span&gt;
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 65535 bytes
08:11:38.006766 IP [eth2-ip] &amp;gt; [group-ip]: ICMP echo request, id 19057, seq 1, length 64
08:11:38.006861 IP [group-ip] &amp;gt; [eth2-ip]: ICMP echo reply, id 19057, seq 1,length 64
08:11:39.007030 IP [eth2-ip] &amp;gt; [group-ip]: ICMP echo request, id 19057, seq 3, length 64
08:11:39.007098 IP [group-ip] &amp;gt; [eth2-ip]: ICMP echo reply, id 19057, seq 2,length 64
08:11:40.006615 IP [eth2-ip] &amp;gt; [group-ip]: ICMP echo request, id 19057, seq 3, length 64
08:11:40.006688 IP [group-ip] &amp;gt; [eth2-ip]: ICMP echo reply, id 19057, seq 3,length 64&lt;/span&gt;</pre><p></p></blockquote><h4>AND successful ping to [group-ip] from second iSCSI NIC</h4><blockquote><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# ping -I eth3 [group-ip]&lt;/span&gt;
PING [group-ip] ([group-ip]) from [eth3-ip] eth3: 56(84) bytes of data.
64 bytes from [group-ip]: icmp_seq=1 ttl=255 time=0.103 ms
64 bytes from [group-ip]: icmp_seq=2 ttl=255 time=0.075 ms
64 bytes from [group-ip]: icmp_seq=3 ttl=255 time=0.093 ms
^C
--- [group-ip] ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2927ms
rtt min/avg/max/mdev = 0.075/0.090/0.103/0.013 ms&lt;/span&gt;</pre><p></p><pre class="crayon-plain-tag">&lt;span style=&quot;font-family: courier new,courier;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;# tcpdump -i eth3 icmp[icmptype] == icmp-echo or icmp[icmptype] == icmp-echoreply&lt;/span&gt;
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth3, link-type EN10MB (Ethernet), capture size 65535 bytes
08:11:44.074841 IP [eth3-ip] &amp;gt; [group-ip]: ICMP echo request, id 19313, seq 1, length 64
08:11:44.074938 IP [group-ip] &amp;gt; [eth3-ip]: ICMP echo reply, id 19313, seq 1,length 64
08:11:45.075025 IP [eth3-ip] &amp;gt; [group-ip]: ICMP echo request, id 19313, seq 2, length 64
08:11:45.075123 IP [group-ip] &amp;gt; [eth3-ip]: ICMP echo reply, id 19313, seq 2, length 64&lt;/span&gt;</pre><p></p></blockquote><p><span
style="color: #0000ff;"><strong>Update just to make sure I dot the i&#8217;s, etc;</strong></span> The sysctl settings do not cascade up to bridges built on top of a physical interface that&#8217;s had a specific setting, like <span
style="font-family: courier new,courier;">net.ipv4.conf.[NIC].rp_filter</span> configured. Thus you have to set <span
style="font-family: courier new,courier;">.rp_filter=0</span> for all bridges as well.</p> ]]></content:encoded> <wfw:commentRss>http://linux.sjolshagen.net/2010/07/23/linux-multi-nic-and-ip-traffic-routing/feed/</wfw:commentRss> <slash:comments>1</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>The iPad&#124;iPhone&#124;iPod approach to enterprise storage?</title><link>http://linux.sjolshagen.net/2010/07/16/the-ipadiphoneipod-approach-to-enterprise-storage/</link> <comments>http://linux.sjolshagen.net/2010/07/16/the-ipadiphoneipod-approach-to-enterprise-storage/#comments</comments> <pubDate>Fri, 16 Jul 2010 16:35:23 +0000</pubDate> <dc:creator>Thomas S</dc:creator> <category><![CDATA[Storage]]></category> <category><![CDATA[Future]]></category> <category><![CDATA[iPad]]></category> <category><![CDATA[iPhone]]></category> <category><![CDATA[iPod]]></category><guid
isPermaLink="false">http://linux.sjolshagen.net/?p=267</guid> <description><![CDATA[Looking for input on where storage should/needs to go...]]></description> <content:encoded><![CDATA[<blockquote><p>[...] when someone can take storage out of a box, “install, use and protect it” on any O/S, virtualization environment with nothing more than a poster with 5 to 7 blocks as an guide, such “Apple-like” storage will have arrived.</p><p><span
style="font-size: x-small;">From <a
href="http://silvertonconsulting.com/blog/2010/07/16/better-storage-through-hardware/">RayOnStorageBlog</a></span></p></blockquote><p>Who else thinks this should be a goal? Why? Why not?</p> ]]></content:encoded> <wfw:commentRss>http://linux.sjolshagen.net/2010/07/16/the-ipadiphoneipod-approach-to-enterprise-storage/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

 Served from: linux.sjolshagen.net @ 2013-06-30 20:51:49 by W3 Total Cache -->