<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Rhel on Geeky Schmidt</title><link>https://geekyschmidt.com/tags/rhel/</link><description>Recent content in Rhel on Geeky Schmidt</description><image><title>Geeky Schmidt</title><url>https://geekyschmidt.com/images/papermod-cover.png</url><link>https://geekyschmidt.com/images/papermod-cover.png</link></image><generator>Hugo</generator><language>en</language><copyright>Copyright ©2002-2026, Nicholas Schmidt; all rights reserved.</copyright><lastBuildDate>Mon, 15 Sep 2008 10:30:51 +0000</lastBuildDate><atom:link href="https://geekyschmidt.com/tags/rhel/index.xml" rel="self" type="application/rss+xml"/><item><title>Multipath and Redhat Linux 5</title><link>https://geekyschmidt.com/2008/09/15/multipath-and-redhat-linux-5/</link><pubDate>Mon, 15 Sep 2008 10:30:51 +0000</pubDate><guid>https://geekyschmidt.com/2008/09/15/multipath-and-redhat-linux-5/</guid><description>&lt;p>As many of you know, multipath was finally integrated into Redhat Linux with the 5 series. This is great when you have multipath enabled during an install as you will see /dev/mapper/mpath0, but what happens post install when you attach new LUN? Here is the howto for what happens behind the scenes during a RHEL install:&lt;/p>
&lt;ol>
&lt;li>After the filer has attached and presented the new LUN reboot the machine allowing for the HBA card to recognize them&lt;/li>
&lt;li>Post-reboot login and verify with the drivers are present with the correct capacity: &lt;em>dmesg | grep sd&lt;/em>&lt;/li>
&lt;li>Next we need the WWID for the new path. For this example assume that sdh is one of our newly presented multipath drives: &lt;em>scsi_id -gus /block/sdh&lt;/em>&lt;/li>
&lt;li>Copy this output down and have it ready to input into a config file. I recommend pipping or copying down the results withing GNOME/vim&lt;/li>
&lt;li>Edit the /etc/multipath.conf with your editor of choice and look for the blacklist exception list. You will see a WWID “923847089123908u2389” already listed. Copy that line and replace the “218934708912374” with the output of command #3&lt;/li>
&lt;li>Reboot the box&lt;/li>
&lt;li>After the reboot login and cd /dev/mapper and verify that there is a newly listed mpath1. If this is not the case stop what you are doing and wash-rinse-repeat steps 1-6&lt;/li>
&lt;li>If there is a mpath1 we need to create a new partition. Since Linux sees the device as a new block, use fdisk as you would with any other drive: &lt;em>fdisk /dev/mapper/mpath1&lt;/em>&lt;/li>
&lt;li>Since the drive is freshly paritioned you will need to reboot to allow the kernel to recognize the new parition table.&lt;/li>
&lt;li>Post reboot we can create a filesystem. I am going to assume you created one parition and are going to use ext3: &lt;em>mkfs.ext3 /dev/mapper/mpath1p1&lt;/em>&lt;/li>
&lt;li>Next edit your /etc/fstab and point the new drive to a path you want the new mapping mounted to: &lt;em>/dev/mapper/mpath1p1 /storage ext3 defaults 1 1&lt;/em>&lt;/li>
&lt;li>For the next portion I will operate under the assumption you are attaching more storage to your /opt directory for a new commercial install. As root drop to run level 2: &lt;em>init 2&lt;/em> This is the lowest run level where the / filesystem is mounted r/w and multipathd is running&lt;/li>
&lt;li>We will move /opt as it is current substatianted to /opt2: &lt;em>mv /opt /opt2&lt;/em>&lt;/li>
&lt;li>Create the mount for the SAN LUN: &lt;em>mkdir /opt&lt;/em>&lt;/li>
&lt;li>Mount the LUN: &lt;em>mount /opt&lt;/em> &amp;lt;–read from the /etc/fstab entry&lt;/li>
&lt;li>Now we sync the directories with rsync: &lt;em>rsync -avh /opt2/* /opt&lt;/em> I recommend holding onto the /opt2 until everything is tested after a reboot&lt;/li>
&lt;li>Done!&lt;/li>
&lt;/ol></description></item></channel></rss>