[rhelv6-list] LVM question about filter option in lvm.conf file and persistent disk name format

george application applicgs at gmail.com
Wed Aug 29 08:13:36 UTC 2012


Hi,

Let me describe an strange issue that I had before a month to a customer

I had two disks with two paths per disk and I wanted to create a LVM volume
on both of them (different volume and diffente volume group).

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.

BR,
George
2012/8/29 george application <applicgs at gmail.com>

> Hi,
>
> Let me describe an strange issue that I had before a month to a customer.
>
> I had two disks with two paths per disk and I wanted to create a LVM
> volume on both of them (different volume and
> diffente volume group).
> 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.
>
>
> Regards,
> George
>
> 2012/8/21 george application <applicgs at gmail.com>
>
>> Hi,
>>
>> 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?
>>
>> 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.
>>
>> Thanks in advance,
>> AGS
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20120829/2f8e28ee/attachment.htm>


More information about the rhelv6-list mailing list