<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Hi,</span><div><font color="#222222" face="arial, sans-serif"><br></font><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Let me describe an strange issue that I had before a month to a customer</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">I had two disks with two paths per disk and I wanted to create a LVM volume on both of them (different volume and </span><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap">diffente volume group).</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap"><br>
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap">So, I had to edit the lvm.conf file to  add on the FILTER option the disks that volume manager will scan for volumes.</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap"><br>
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">In my configuration I had an internal disk (sda which had the root & swap logical volumes) and two external (storage) disks with two paths per disk:</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap"><br>
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap">external disk 1 (mpath0) paths:</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">sdb</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap">sdc</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap">external disk2 (mpath1) paths:</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap">sdd</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap">sde </span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap"><br>
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap"><br>
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">For the external disks I had enabled the multipathd and I had mpath0 for sdb,sdc and mpath1 for sdd, sde.</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace"><br>
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">Sudd</span><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap">enly, my internal disk sda changed to sdc. I checked it by the pvscan command.</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">And the sdc path changed to sda.</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap"><br>
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace;line-height:17.27272605895996px;white-space:pre-wrap">That time, I had the default FILTER option enabled on lvm.conf.</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">I guess that this was the reason that I didn't lose my root volume which I had on internal disk.
Also I didn't had any volumes on mpath0 and mpath1.</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace"><br>
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">Finally, after a reboot, my internal disk name switched back to the initial name (sda).</span></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace"><br>
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">
I believe that I have to change the default filter option:  filter = [ "a/.*/" ]  to filter = [ "a|/dev/sda|", "a|/dev/mapper/mpath.*|" ]
which means that volume manager will scan the /dev/sda and /dev/mapper/mpath* for LVM volumes.
Also I would like to notice that with the filter = [ "a|/dev/sda|", "a|/dev/mapper/mpath.*|" ] I will not have any "found duplicate pv" warnings, on pvscan execution command.</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">
If I change the default filter option to  [ "a|/dev/sda|", "a|/dev/mapper/mpath.*|" ], then what will happen to my logical volumes in the future if suddenly the sda became sdc again?
In this condition first of all I will loose my root disk. 
I don't know if I will have any other consequences on the  volumes on my  mpath* devices.</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">
My question is what  persistent disk name I can use  instead of /dev/sda on filter option of lvm.conf file, because if the sda became sdc then I will have problems with my logical volumes.</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace"><br></span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">
</span></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">BR, </span></div>
George<br><div class="gmail_quote">2012/8/29 george application <span dir="ltr"><<a href="mailto:applicgs@gmail.com" target="_blank">applicgs@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Hi, </span><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Let me describe an strange issue that I had before a month to a customer.</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">I had two disks with two paths per disk and I wanted to create a LVM volume on both of them (different volume and</span></div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">diffente volume group). 
<br></span></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">So, I had to edit the lvm.conf file to  add on the FILTER option the disks that volume manager will scan for volumes. 
In my configuration I had an internal disk (sda which had the root & swap logical volumes) and two external (storage) disks with two paths per disk:
external disk 1 (mpath0) paths:
sdb
sdc
external disk2 (mpath1) paths:
sdd
sde 

For the external disks I had enabled the multipathd and I had mpath0 for sdb,sdc and mpath1 for sdd, sde.

Suddenly, my internal disk sda changed to sdc. I checked it by the pvscan command.
And the sdc path changed to sda.

That time, I had the default FILTER option enabled on lvm.conf.
I guess that this was the reason that I didn't lose my root volume which I had on internal disk.
Also I didn't had any volumes on mpath0 and mpath1.

Finally, after a reboot, my internal disk name switched back to the initial name (sda).

I believe that I have to change the default filter option:  filter = [ "a/.*/" ]  to filter = [ "a|/dev/sda|", "a|/dev/mapper/mpath.*|" ]
which means that volume manager will scan the /dev/sda and /dev/mapper/mpath* for LVM volumes.
Also I would like to notice that with the filter = [ "a|/dev/sda|", "a|/dev/mapper/mpath.*|" ] I will not have any 
"found duplicate pv" warnings, on pvscan execution command.

If I change the default filter option to  [ "a|/dev/sda|", "a|/dev/mapper/mpath.*|" ], then what will happen to my logical volumes in the future if suddenly the sda became sdc again?
In this condition first of all I will loose my root disk. 
I don't know if I will have any other consequences on the  volumes on my  mpath* devices.

My question is what  persistent disk name I can use  instead of /dev/sda on filter option of lvm.conf file, because if the sda became sdc then I will have problems with my logical volumes.
</span></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace"><br>

</span></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace"><br>


</span></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">Regards, </span></div>
<span class="HOEnZb"><font color="#888888">
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="line-height:17.27272605895996px;white-space:pre-wrap;font-family:'Courier New',Courier,'DejaVu Sans Mono',monospace">George</span></div>
</font></span><div class="HOEnZb"><div class="h5">
<br><div class="gmail_quote">2012/8/21 george application <span dir="ltr"><<a href="mailto:applicgs@gmail.com" target="_blank">applicgs@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<span style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif">Hi, </span><br style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif">
<br style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif"><span style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif">Does anyone know if I can use the disk name /dev/disk/by-id/scsi-xxxx format on the FILTER option of lvm.conf file instead of /dev/sdX? </span><br style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif">


<br style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif"><span style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif">For example, I don't want to use the disk name "/dev/sda", because it is not persistent, and some times my sda changes to sdc. </span><br style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif">


<br style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif"><span style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif">Thanks in advance, </span><br style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif">


<span style="color:rgb(34,34,34);font-size:13px;font-family:Arial,Helvetica,sans-serif">AGS </span>
</blockquote></div><br>
</div></div></blockquote></div><br></div>