<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 08:46:24 Wednesday, 1 May 2013 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.f758a8b8-08bf-4bab-8d22-45dba9e71175 {
        MARGIN: 0cm 0cm 0pt
}
LI.f758a8b8-08bf-4bab-8d22-45dba9e71175 {
        MARGIN: 0cm 0cm 0pt
}
DIV.f758a8b8-08bf-4bab-8d22-45dba9e71175 {
        MARGIN: 0cm 0cm 0pt
}
TABLE.f758a8b8-08bf-4bab-8d22-45dba9e71175Table {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style>
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"></p>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If you’re using multipathing you can create rules in /etc/multipath.conf to make your device names persistent and use those rather than the dm-* device names.
You can even make the rules based on the UUID so that at short glance you can tell something about the UUID (At least in RHEL5 where I just did it.)
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">For example I wanted to have persistent names to use in a Hitachi HORCM control file so added the following:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">multipaths {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> # 29-Apr-2013 jlightner - Aliases for Hitachi HORCM command devices(CMD)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> # NOT in any VG and can NOT be used for data<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> multipath {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> wwid 360060e8006d142000000d1420000fe0f<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> alias hctl1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> multipath {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> wwid 360060e8006d142000000d1420000fe10<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> alias hctl2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">For the rest of my Hitachi devices I wanted to use names that include the last 4 characters of the UUID (WWID) so before the last curly brace above I inserted:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> multipath {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> wwid 360060e8006d142000000d142000025b6<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> alias hldev25b6<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> multipath {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> wwid 360060e8006d142000000d142000025b7<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> alias hldev25b7<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The reason for using the last 4 characters is for my Hitachi array those always correspond to the CU:LDEV ID I see within the array itself. It allows me
to write scripts to do vgimportclone using persistent device names for my nightly disk mirroring/splitting (Shadow Image/BCV) process.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">On reboot multipath creates the devices in both /dev/mapper and /dev/mpath:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">brw-rw---- 1 root disk 253, 37 Apr 29 15:41 /dev/mapper/hctl1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">brw-rw---- 1 root disk 253, 38 Apr 29 15:41 /dev/mapper/hctl2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">lrwxrwxrwx 1 root root 8 Apr 29 15:41 /dev/mpath/hctl1 -> ../dm-37<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">lrwxrwxrwx 1 root root 8 Apr 29 15:41 /dev/mpath/hctl2 -> ../dm-38<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">On another reboot the dm-* device linked on right side in /dev/mpath might have changed but the left side of the link won’t and whatever the dm-* is WILL still
be the WWID (UUID) you had defined in multipath.conf. Note the /dev/dm* device whatever it is will have the same major/minor as see in the /dev/mapper device which is one way to confirm it is what you think it is. This means you can use either the /dev/mpath/*
or the /dev/mapper/* device.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">At some point I’ll probably work out a global substitution rule for this kind of thing but at present I’m simply using the scsi_id command to determine WWID
(UUID) of the devices and hard coding each into multipath.conf. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> ale-bounces@ale.org [mailto:ale-bounces@ale.org]
<b>On Behalf Of </b>Jim Kinney<br>
<b>Sent:</b> Tuesday, April 30, 2013 10:17 PM<br>
<b>To:</b> Atlanta Linux Enthusiasts<br>
<b>Subject:</b> Re: [ale] Kubuntu 13.04 danger: beware /dev/dm-*<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Sorry to hear about this. UUIDs suck to work with (too long for normal short term memory - too non-associative for long-term memory) but they as certainly stable and definitive.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Apr 30, 2013 at 8:42 PM, George Allen <<a href="mailto:glallen01@gmail.com" target="_blank">glallen01@gmail.com</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">So, I just finished recovering from a data-loss causing error in the new ubuntu:<br>
<br>
I had one hard drive with 12.10, and a new one with a fresh install of 13.04.<br>
Both used LVM, with slightly different custom setups...<br>
<br>
In transferring the files from the old to new drives, via rsync and an<br>
external usb adapter, the transfer suddenly errored out after several<br>
GBs.<br>
<br>
I don't have the logs handy to give better notes (specific errors),<br>
but basically:<br>
- sometime late in the rsync the computer decided to write something to swap.<br>
- 13.04 had created the cryptswap device using /dev/dm-3 instead of<br>
/dev/mapper/vg-swap or a UUID (in /etc/crypttab)<br>
- sometime in my modifying the partitions/lvm and adding a usb drive<br>
that also contained lvm volumes, /dev/dm-* were re-numbered<br>
<br>
So as soon as the computer touched swap, it corrupted my /dev/vg/home<br>
logical volume<br>
<br>
It took me a while to figure out what was going on... then with blkid<br>
and lots of googling I managed to find out by comparing UUIDs for each<br>
device.<br>
<br>
To avoid further problems - grep -rE '/dev/(sd.|mapper|disk|dm)' * on<br>
both systems confirmed that '/etc/crypttab' on the 13.04 install was<br>
the only important file that referenced anything by dm-* but that one<br>
file can hose your system if somehow dmsetup renumbers things after<br>
changes.<br>
<br>
-George<br>
</p>
</div>
</div>
</div>
<p></p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"> </p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"> </p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"></p>
<div class="WordSection1">
<div>
<div>
<p class="MsoNormal">_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
-- <br>
James P. Kinney III<br>
<i><br>
</i>Every time you stop a school, you will have to build a jail. What you gain at one end you lose at the other. It's like feeding a dog on his own tail. It won't fatten the dog.<br>
- Speech 11/23/1900 Mark Twain<br>
<i><br>
</i><a href="http://electjimkinney.org" target="_blank"><i>http://electjimkinney.org</i></a><i><br>
</i><a href="http://heretothereideas.blogspot.com/" target="_blank"><i>http://heretothereideas.blogspot.com/</i></a><o:p></o:p></p>
</div>
</div>
<p></p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"><font face="Arial"><font color="fuchsia"><font style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" size="2"></font></font></font> </p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"> </p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"><font face="Arial"><font color="fuchsia"><font style="FONT-FAMILY: Arial; FONT-SIZE: 10pt" size="2">Athena<font size="1">®</font>, Created for the Cause</font><font size="1">™
</font></font></font></p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"><font size="2" face="Arial">Making a Difference in the Fight Against Breast Cancer</font></p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"><font size="2" face="Arial"></font> </p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"><font size="2" face="Arial"></font> </p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"><font face="Arial"><font size="2"><strong>How and Why I Should Support Bottled Water!<br>
</strong>Do not relinquish your right to choose bottled water as a healthy alternative to beverages that contain sugar, calories, etc. Your support of bottled water will make a difference! Your signatures count! Go to
<a href="http://www.bottledwatermatters.org/luv-bottledwater-iframe/dswaters">http://www.bottledwatermatters.org/luv-bottledwater-iframe/dswaters</a> and sign a petition to support your right to always choose bottled water. Help fight federal and state issues,
such as bottle deposits (or taxes) and organizations that want to ban the sale of bottled water. Support community curbside recycling programs. Support bottled water as a healthy way to maintain proper hydration. Our goal is 50,000 signatures. Share this petition
with your friends and family today!</font></font></p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"><font size="2" face="Arial"></font> </p>
<p class="f758a8b8-08bf-4bab-8d22-45dba9e71175"><span style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">---------------------------------<br>
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information
is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.<br>
----------------------------------</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 9pt"><o:p></o:p></span></p>
<p> </p>
<p></p>
<p></p>
</body>
</html>