[linux-lvm] question about vg underlying pv devs order
heming.zhao at suse.com
heming.zhao at suse.com
Wed May 27 04:51:48 UTC 2020
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.
More information about the linux-lvm
mailing list