Linux-LVM Archive mirror
 help / color / mirror / Atom feed
From: Zhiyong Ye <yezhiyong@bytedance.com>
To: David Teigland <teigland@redhat.com>
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] How to convert a single path to a multipath after using dm-multipath
Date: Fri, 14 Apr 2023 11:55:26 +0800	[thread overview]
Message-ID: <f98d6a2b-5ab8-0b32-8ff3-27bc3aedfb8f@bytedance.com> (raw)
In-Reply-To: <20230413202859.GC15123@redhat.com>

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/


      reply	other threads:[~2023-04-14  6:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f98d6a2b-5ab8-0b32-8ff3-27bc3aedfb8f@bytedance.com \
    --to=yezhiyong@bytedance.com \
    --cc=linux-lvm@redhat.com \
    --cc=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).