* [linux-lvm] How to convert a single path to a multipath after using dm-multipath
@ 2023-04-11 5:29 Zhiyong Ye
2023-04-11 13:31 ` David Teigland
0 siblings, 1 reply; 7+ messages in thread
From: Zhiyong Ye @ 2023-04-11 5:29 UTC (permalink / raw)
To: LVM general discussion and development
Dear all,
Dm-multipath (multipath-tools in the user-space) provides powerful
multipathing capabilities to aggregate multiple paths from the same
storage backend into a single disk device. However, it is difficult to
extend single paths into multipaths when LVM is already in use.
I used two physical machines to set up the POC environment for testing,
with one physical machine acting as the storage iscsi multipath server,
setting up the same LUN to have two paths to access. Another physical
machine acts as the iscsi client, first using a single path (/dev/sda)
and creating vg and lv on it. I then turn on the multipath function and
merge the two paths into a new device (/dev/mapper/matha), and I get the
following error when I execute the lvm command.
# pvs
WARNING: Not using device /dev/mapper/matha for PV
HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers device
/dev/sda because device is used by LV.
PV VG Fmt Attr PSize PFree
/dev/sda is-he57e6mr4wemb19kgf8i lvm2 a-- 10.00t 9.98t
To be able to use the multipathing capability, I tried to convert the
device from pv to matha using vgimportclone, but it failed since both
sda and matha were pointing to the same iscsi storage backend.
May you please advise how one can convert the pv used by vg from sda to
matha without affecting the current lv usage.
Regards
Zhiyong
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] How to convert a single path to a multipath after using dm-multipath
2023-04-11 5:29 [linux-lvm] How to convert a single path to a multipath after using dm-multipath Zhiyong Ye
@ 2023-04-11 13:31 ` David Teigland
2023-04-12 9:16 ` Zhiyong Ye
0 siblings, 1 reply; 7+ messages in thread
From: David Teigland @ 2023-04-11 13:31 UTC (permalink / raw)
To: Zhiyong Ye; +Cc: LVM general discussion and development
On Tue, Apr 11, 2023 at 01:29:42PM +0800, Zhiyong Ye wrote:
> and lv on it. I then turn on the multipath function and merge the two paths
> into a new device (/dev/mapper/matha), and I get the following error when I
> execute the lvm command.
>
> # pvs
> WARNING: Not using device /dev/mapper/matha for PV
> HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
> WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers device /dev/sda
> because device is used by LV.
> PV VG Fmt Attr PSize PFree
> /dev/sda is-he57e6mr4wemb19kgf8i lvm2 a-- 10.00t 9.98t
> May you please advise how one can convert the pv used by vg from sda to
> matha without affecting the current lv usage.
lvchange --refresh should refresh the active LV to use mpatha. To avoid
this, you might configure mpath on sda alone prior to adding the second
path.
Dave
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] How to convert a single path to a multipath after using dm-multipath
2023-04-11 13:31 ` David Teigland
@ 2023-04-12 9:16 ` Zhiyong Ye
2023-04-13 10:54 ` Giorgio Bersano
2023-04-13 20:28 ` David Teigland
0 siblings, 2 replies; 7+ messages in thread
From: Zhiyong Ye @ 2023-04-12 9:16 UTC (permalink / raw)
To: David Teigland; +Cc: LVM general discussion and development
Hi Dave,
Thank you for your reply.
Because I had not considered multi-pathing before, there is no way to
configure mpath on sda alone on the current stock of machines. And I
tested this in my environment using lvchange --refresh, but it doesn't
switch the active LV to use mpatha.
# lvchange --refresh is-he57e6mr4wemb19kgf8i
WARNING: Not using device /dev/mapper/mpatha for PV
HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers device
/dev/sda because device is used by LV.
# pvs
WARNING: Not using device /dev/mapper/mpatha for PV
HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers device
/dev/sda because device is used by LV.
PV VG Fmt Attr PSize PFree
/dev/sda is-he57e6mr4wemb19kgf8i lvm2 a-- 10.00t 9.98t
This is because duplicate PVs are encountered during the disk discovery
phase, but lvmcache tends to use sda because it is currently being used
by LV and mpatha will be dropped.
I debugged the _choose_duplicates function in lvmcache and printed the
following log:
lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25 compare duplicates:
/dev/mapper/mpatha 254:3. /dev/sda 8:16. device_hint /dev/sda.
vm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: size 21474836480.
/dev/mapper/mpatha is 21474836480. /dev/sda is 21474836480.
lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha
was prev <none>. /dev/sda was prev <none>.
lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha is
in subsystem. /dev/sda is not in subsystem.
lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha is
dm. /dev/sda is not dm.
lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha
has no mounted fs. /dev/sda has no mounted fs.
lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha is
not used for LV. /dev/sda is used for LV.
lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25 with duplicates will
change from /dev/mapper/mpatha to /dev/sda.
lvm[3352450]: Dropping unchosen duplicate /dev/mapper/mpatha
lvm[3352450]: Adding chosen duplicate /dev/sda
Is there any way to change the PV preference policy in _choose_duplicates?
Regards
Zhiyong
On 4/11/23 9:31 PM, David Teigland wrote:
> On Tue, Apr 11, 2023 at 01:29:42PM +0800, Zhiyong Ye wrote:
>> and lv on it. I then turn on the multipath function and merge the two paths
>> into a new device (/dev/mapper/matha), and I get the following error when I
>> execute the lvm command.
>>
>> # pvs
>> WARNING: Not using device /dev/mapper/matha for PV
>> HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
>> WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers device /dev/sda
>> because device is used by LV.
>> PV VG Fmt Attr PSize PFree
>> /dev/sda is-he57e6mr4wemb19kgf8i lvm2 a-- 10.00t 9.98t
>
>> May you please advise how one can convert the pv used by vg from sda to
>> matha without affecting the current lv usage.
>
> lvchange --refresh should refresh the active LV to use mpatha. To avoid
> this, you might configure mpath on sda alone prior to adding the second
> path.
>
> Dave
>
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] How to convert a single path to a multipath after using dm-multipath
2023-04-12 9:16 ` Zhiyong Ye
@ 2023-04-13 10:54 ` Giorgio Bersano
2023-04-14 3:48 ` Zhiyong Ye
2023-04-13 20:28 ` David Teigland
1 sibling, 1 reply; 7+ messages in thread
From: Giorgio Bersano @ 2023-04-13 10:54 UTC (permalink / raw)
To: yezhiyong; +Cc: LVM general discussion and development
[-- Attachment #1.1: Type: text/plain, Size: 3822 bytes --]
Hi Zhiyong,
did you filter out the device in lvm.conf ?
filter = [ ... , "r/sd.*/" , ... ]
or "r/sda/" if you want to only exclude sda
Regards,
Giorgio.
Il giorno gio 13 apr 2023 alle ore 08:55 Zhiyong Ye <yezhiyong@bytedance.com>
ha scritto:
>
> Hi Dave,
>
> Thank you for your reply.
>
> Because I had not considered multi-pathing before, there is no way to
> configure mpath on sda alone on the current stock of machines. And I
> tested this in my environment using lvchange --refresh, but it doesn't
> switch the active LV to use mpatha.
>
> # lvchange --refresh is-he57e6mr4wemb19kgf8i
> WARNING: Not using device /dev/mapper/mpatha for PV
> HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
> WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers device
> /dev/sda because device is used by LV.
>
> # pvs
> WARNING: Not using device /dev/mapper/mpatha for PV
> HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
> WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers device
> /dev/sda because device is used by LV.
> PV VG Fmt Attr PSize PFree
> /dev/sda is-he57e6mr4wemb19kgf8i lvm2 a-- 10.00t 9.98t
>
> This is because duplicate PVs are encountered during the disk discovery
> phase, but lvmcache tends to use sda because it is currently being used
> by LV and mpatha will be dropped.
>
> I debugged the _choose_duplicates function in lvmcache and printed the
> following log:
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25 compare duplicates:
> /dev/mapper/mpatha 254:3. /dev/sda 8:16. device_hint /dev/sda.
> vm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: size 21474836480.
> /dev/mapper/mpatha is 21474836480. /dev/sda is 21474836480.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha
> was prev <none>. /dev/sda was prev <none>.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha is
> in subsystem. /dev/sda is not in subsystem.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha is
> dm. /dev/sda is not dm.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha
> has no mounted fs. /dev/sda has no mounted fs.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha is
> not used for LV. /dev/sda is used for LV.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25 with duplicates will
> change from /dev/mapper/mpatha to /dev/sda.
> lvm[3352450]: Dropping unchosen duplicate /dev/mapper/mpatha
> lvm[3352450]: Adding chosen duplicate /dev/sda
>
> Is there any way to change the PV preference policy in _choose_duplicates?
>
>
> Regards
>
> Zhiyong
>
> On 4/11/23 9:31 PM, David Teigland wrote:
> > On Tue, Apr 11, 2023 at 01:29:42PM +0800, Zhiyong Ye wrote:
> >> and lv on it. I then turn on the multipath function and merge the two
> paths
> >> into a new device (/dev/mapper/matha), and I get the following error
> when I
> >> execute the lvm command.
> >>
> >> # pvs
> >> WARNING: Not using device /dev/mapper/matha for PV
> >> HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
> >> WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers device
> /dev/sda
> >> because device is used by LV.
> >> PV VG Fmt Attr PSize PFree
> >> /dev/sda is-he57e6mr4wemb19kgf8i lvm2 a-- 10.00t 9.98t
> >
> >> May you please advise how one can convert the pv used by vg from sda to
> >> matha without affecting the current lv usage.
> >
> > lvchange --refresh should refresh the active LV to use mpatha. To avoid
> > this, you might configure mpath on sda alone prior to adding the second
> > path.
> >
> > Dave
> >
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://listman.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>
[-- Attachment #1.2: Type: text/html, Size: 5130 bytes --]
[-- Attachment #2: Type: text/plain, Size: 202 bytes --]
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] How to convert a single path to a multipath after using dm-multipath
2023-04-12 9:16 ` Zhiyong Ye
2023-04-13 10:54 ` Giorgio Bersano
@ 2023-04-13 20:28 ` David Teigland
2023-04-14 3:55 ` Zhiyong Ye
1 sibling, 1 reply; 7+ messages in thread
From: David Teigland @ 2023-04-13 20:28 UTC (permalink / raw)
To: Zhiyong Ye; +Cc: LVM general discussion and development
On Wed, Apr 12, 2023 at 05:16:41PM +0800, Zhiyong Ye wrote:
> configure mpath on sda alone on the current stock of machines. And I tested
> this in my environment using lvchange --refresh, but it doesn't switch the
> active LV to use mpatha.
It seems to work for me with the latest version of lvm, which may be due
to improved multipath component detection and/or improved handling of
duplicate PVs. So the current upstream code might work for you also.
# pvs
PV VG Fmt Attr PSize PFree
/dev/sdf ff lvm2 a-- <931.01g <930.76g
# lvs -o+devices
LV VG Attr LSize Origin Devices
lvol1 ff -wi-ao---- 256.00m /dev/sdf(1)
# mount | grep ff
/dev/mapper/ff-lvol1 on /mnt type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)
# multipath -a /dev/sdf
wwid '3690b11c0000438ad0000057150910423' added
# multipath -l
mpatha (3690b11c0000438ad0000057150910423) dm-4 DELL,MD32xxi
size=931G features='2 pg_init_retries 50' hwhandler='1 rdac' wp=rw
`-+- policy='service-time 0' prio=0 status=active
`- 7:0:0:4 sdf 8:80 active undef running
# pvs
WARNING: Device mismatch detected for ff/lvol1 which is accessing /dev/sdf instead of /dev/mapper/mpatha.
PV VG Fmt Attr PSize PFree
/dev/mapper/mpatha ff lvm2 a-- <931.01g <930.76g
# lvs ff
WARNING: Device mismatch detected for ff/lvol1 which is accessing /dev/sdf instead of /dev/mapper/mpatha.
LV VG Attr LSize
lvol1 ff -wi-ao---- 256.00m
# dmsetup table ff-lvol1
0 524288 linear 8:80 10240
# lvchange --refresh ff/lvol1
# dmsetup table ff-lvol1
0 524288 linear 253:4 10240
# pvs
PV VG Fmt Attr PSize PFree
/dev/mapper/mpatha ff lvm2 a-- <931.01g <930.76g
# lvs -o+devices ff
LV VG Attr LSize Devices
lvol1 ff -wi-ao---- 256.00m /dev/mapper/mpatha(1)
Dave
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] How to convert a single path to a multipath after using dm-multipath
2023-04-13 10:54 ` Giorgio Bersano
@ 2023-04-14 3:48 ` Zhiyong Ye
0 siblings, 0 replies; 7+ messages in thread
From: Zhiyong Ye @ 2023-04-14 3:48 UTC (permalink / raw)
To: Giorgio Bersano; +Cc: LVM general discussion and development
Hi Giorgio,
Thank you for your reply and detailed answers.
When I filtered out the sda device on the lvm configuration file it
works fine.
Thank you again for your help.
Regards
Zhiyong
On 4/13/23 6:54 PM, Giorgio Bersano wrote:
> Hi Zhiyong,
> did you filter out the device in lvm.conf ?
>
> filter = [ ... , "r/sd.*/" , ... ]
>
> or "r/sda/" if you want to only exclude sda
>
> Regards,
> Giorgio.
>
>
> Il giorno gio 13 apr 2023 alle ore 08:55 Zhiyong Ye
> <yezhiyong@bytedance.com <mailto:yezhiyong@bytedance.com>> ha scritto:
>
>
> Hi Dave,
>
> Thank you for your reply.
>
> Because I had not considered multi-pathing before, there is no way to
> configure mpath on sda alone on the current stock of machines. And I
> tested this in my environment using lvchange --refresh, but it doesn't
> switch the active LV to use mpatha.
>
> # lvchange --refresh is-he57e6mr4wemb19kgf8i
> WARNING: Not using device /dev/mapper/mpatha for PV
> HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
> WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers device
> /dev/sda because device is used by LV.
>
> # pvs
> WARNING: Not using device /dev/mapper/mpatha for PV
> HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
> WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers device
> /dev/sda because device is used by LV.
> PV VG Fmt Attr PSize PFree
> /dev/sda is-he57e6mr4wemb19kgf8i lvm2 a-- 10.00t 9.98t
>
> This is because duplicate PVs are encountered during the disk discovery
> phase, but lvmcache tends to use sda because it is currently being used
> by LV and mpatha will be dropped.
>
> I debugged the _choose_duplicates function in lvmcache and printed the
> following log:
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25 compare duplicates:
> /dev/mapper/mpatha 254:3. /dev/sda 8:16. device_hint /dev/sda.
> vm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: size 21474836480.
> /dev/mapper/mpatha is 21474836480. /dev/sda is 21474836480.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha
> was prev <none>. /dev/sda was prev <none>.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25:
> /dev/mapper/mpatha is
> in subsystem. /dev/sda is not in subsystem.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25:
> /dev/mapper/mpatha is
> dm. /dev/sda is not dm.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25: /dev/mapper/mpatha
> has no mounted fs. /dev/sda has no mounted fs.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25:
> /dev/mapper/mpatha is
> not used for LV. /dev/sda is used for LV.
> lvm[3352450]: PV HgL3xRqTiom75QnGAOUn0U8uHkwHbH25 with duplicates will
> change from /dev/mapper/mpatha to /dev/sda.
> lvm[3352450]: Dropping unchosen duplicate /dev/mapper/mpatha
> lvm[3352450]: Adding chosen duplicate /dev/sda
>
> Is there any way to change the PV preference policy in
> _choose_duplicates?
>
>
>
>
> Regards
>
> Zhiyong
>
> On 4/11/23 9:31 PM, David Teigland wrote:
> > On Tue, Apr 11, 2023 at 01:29:42PM +0800, Zhiyong Ye wrote:
> >> and lv on it. I then turn on the multipath function and merge
> the two paths
> >> into a new device (/dev/mapper/matha), and I get the following
> error when I
> >> execute the lvm command.
> >>
> >> # pvs
> >> WARNING: Not using device /dev/mapper/matha for PV
> >> HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25.
> >> WARNING: PV HgL3xR-qTio-m75Q-nGAO-Un0U-8uHk-wHbH25 prefers
> device /dev/sda
> >> because device is used by LV.
> >> PV VG Fmt Attr PSize PFree
> >> /dev/sda is-he57e6mr4wemb19kgf8i lvm2 a-- 10.00t 9.98t
> >
> >> May you please advise how one can convert the pv used by vg from
> sda to
> >> matha without affecting the current lv usage.
> >
> > lvchange --refresh should refresh the active LV to use mpatha.
> To avoid
> > this, you might configure mpath on sda alone prior to adding the
> second
> > path.
> >
> > Dave
> >
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com <mailto:linux-lvm@redhat.com>
> https://listman.redhat.com/mailman/listinfo/linux-lvm
> <https://listman.redhat.com/mailman/listinfo/linux-lvm>
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> <http://tldp.org/HOWTO/LVM-HOWTO/>
>
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] How to convert a single path to a multipath after using dm-multipath
2023-04-13 20:28 ` David Teigland
@ 2023-04-14 3:55 ` Zhiyong Ye
0 siblings, 0 replies; 7+ messages in thread
From: Zhiyong Ye @ 2023-04-14 3:55 UTC (permalink / raw)
To: David Teigland; +Cc: LVM general discussion and development
Hi Dave,
Thank you for your patience and explanations.
When I filtered out the sda device on the lvm configuration file it
works fine. I will test it again with the latest version of lvm and
compare which patches have been added.
I learned a lot from our discussions and thank you again for your help.
Regards
Zhiyong
On 4/14/23 4:28 AM, David Teigland wrote:
> On Wed, Apr 12, 2023 at 05:16:41PM +0800, Zhiyong Ye wrote:
>> configure mpath on sda alone on the current stock of machines. And I tested
>> this in my environment using lvchange --refresh, but it doesn't switch the
>> active LV to use mpatha.
>
> It seems to work for me with the latest version of lvm, which may be due
> to improved multipath component detection and/or improved handling of
> duplicate PVs. So the current upstream code might work for you also.
>
> # pvs
> PV VG Fmt Attr PSize PFree
> /dev/sdf ff lvm2 a-- <931.01g <930.76g
>
> # lvs -o+devices
> LV VG Attr LSize Origin Devices
> lvol1 ff -wi-ao---- 256.00m /dev/sdf(1)
>
> # mount | grep ff
> /dev/mapper/ff-lvol1 on /mnt type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)
>
> # multipath -a /dev/sdf
> wwid '3690b11c0000438ad0000057150910423' added
>
> # multipath -l
> mpatha (3690b11c0000438ad0000057150910423) dm-4 DELL,MD32xxi
> size=931G features='2 pg_init_retries 50' hwhandler='1 rdac' wp=rw
> `-+- policy='service-time 0' prio=0 status=active
> `- 7:0:0:4 sdf 8:80 active undef running
>
> # pvs
> WARNING: Device mismatch detected for ff/lvol1 which is accessing /dev/sdf instead of /dev/mapper/mpatha.
> PV VG Fmt Attr PSize PFree
> /dev/mapper/mpatha ff lvm2 a-- <931.01g <930.76g
>
> # lvs ff
> WARNING: Device mismatch detected for ff/lvol1 which is accessing /dev/sdf instead of /dev/mapper/mpatha.
> LV VG Attr LSize
> lvol1 ff -wi-ao---- 256.00m
>
> # dmsetup table ff-lvol1
> 0 524288 linear 8:80 10240
>
> # lvchange --refresh ff/lvol1
>
> # dmsetup table ff-lvol1
> 0 524288 linear 253:4 10240
>
> # pvs
> PV VG Fmt Attr PSize PFree
> /dev/mapper/mpatha ff lvm2 a-- <931.01g <930.76g
>
> # lvs -o+devices ff
> LV VG Attr LSize Devices
> lvol1 ff -wi-ao---- 256.00m /dev/mapper/mpatha(1)
>
> Dave
>
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-04-14 6:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-11 5:29 [linux-lvm] How to convert a single path to a multipath after using dm-multipath Zhiyong Ye
2023-04-11 13:31 ` David Teigland
2023-04-12 9:16 ` Zhiyong Ye
2023-04-13 10:54 ` Giorgio Bersano
2023-04-14 3:48 ` Zhiyong Ye
2023-04-13 20:28 ` David Teigland
2023-04-14 3:55 ` Zhiyong Ye
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).