linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "heming.zhao@suse.com" <heming.zhao@suse.com>
To: linux-lvm@redhat.com
Subject: [linux-lvm] question about vg underlying pv devs order
Date: Wed, 27 May 2020 12:51:48 +0800	[thread overview]
Message-ID: <3754b958-93fb-221c-41f6-7529b4a848c3@suse.com> (raw)

Hello list,

one our customer reported a issue. After executing lvextend, the vg underlying pv devs changed.

I do a summary from my watching.

first, pv devies in /etc/lvm/backup/systemvg & /etc/lvm/archive/systemvg-xxx are correct.

but using pvdissect (url: https://wiki.syslinux.org/wiki/index.php?title=Development/LVM_support/pvdissect), the script dumped show pv related device had been changed after executing lvextend command.

the part output of pvdissect like:
```
0x00006000 (metadata.value):
systemvg {
     id = "id-xxx"
     seqno = 11
     format = "lvm2"
     status = ["RESIZEABLE", "READ", "WRITE"]
     flags = []
     extent_size = 8192
     max_lv = 0
     max_pv = 0
     metadata_copies = 0

     physical_volumes {

         pv0 {
             id = "pv0-uuid-xxxx"  <=== it didn't change
             device = "/dev/sdb"   <=== it changed to /dev/sda

             status = ["ALLOCATABLE"]
             flags = []
             dev_size = 4806528
             pe_start = 2048
             pe_count = 586
         }

         pv1 {
             id = "pv1-uuid-xxxx"   <=== it didn't change
             device = "/dev/sdc"    <=== it changed to /dev/sdb

             status = ["ALLOCATABLE"]
             flags = []
             dev_size = 4806528
             pe_start = 2048
             pe_count = 586
         }

         pv2 {
             id = "pv2-uuid-xxxx"    <=== it didn't change
             device = "/dev/sdd"     <=== it changed to /dev/sdc

             status = ["ALLOCATABLE"]
             flags = []
             dev_size = 4806528
             pe_start = 2048
             pe_count = 586
         }

     ... ... # other parts are correct
```

(the systemvg consists of many LVs, ie: usrlv, varlv, optlv, homelv.)
  

my question:
the devs order changed, but after system reboot, everything work fine. why?

I not very familiar with lvm code.
 From my watching, it looks lvm uses pv uuid not device to work, is it right?

Thanks.

                 reply	other threads:[~2020-05-27  5:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3754b958-93fb-221c-41f6-7529b4a848c3@suse.com \
    --to=heming.zhao@suse.com \
    --cc=linux-lvm@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 NNTP newsgroup(s).