Bug 2125023 - improve handling of duplicate vgids
Summary: improve handling of duplicate vgids
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: LVM Team
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On: 2040456
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-07 18:41 UTC by Corey Marthaler
Modified: 2023-08-10 15:40 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2040456
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-133479 0 None None None 2022-09-07 18:43:26 UTC

Comment 3 Corey Marthaler 2022-09-07 18:46:11 UTC
I can't remember if this was to be fixed in rhel8 as well?

kernel-4.18.0-417.el8    BUILT: Wed Aug 10 15:40:43 CDT 2022
lvm2-2.03.14-6.el8    BUILT: Fri Jul 29 05:40:53 CDT 2022
lvm2-libs-2.03.14-6.el8    BUILT: Fri Jul 29 05:40:53 CDT 2022




SCENARIO - duplicate_vg_uuids_with_devicesfile_disabled:  Test how LVM reacts to PVs having the same pv and vg uuids while devicesfile is disabled (bug 2040456) 
adding entry to the devices file for /dev/sdb1
creating PV on hayes-01 using device /dev/sdb1
pvcreate --yes -ff   /dev/sdb1
  Physical volume "/dev/sdb1" successfully created.
creating VG on hayes-01 using PV(s) /dev/sdb1
vgcreate    df /dev/sdb1
  Volume group "df" successfully created

Disabling devicesfile on hayes-01
Setting use_devicesfile to disable
  PV /dev/sdb1   VG df              lvm2 [<1.82 TiB / <1.82 TiB free]
  Total: 1 [<1.82 TiB] / in use: 1 [<1.82 TiB] / in no VG: 0 [0   ]

Copying header from /dev/sdb1 to /dev/sdc1 on hayes-01
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0284696 s, 36.8 MB/s
Re-scanning lvm PVs (pvscan --cache)
  pvscan[441785] PV /dev/sdb1 online.

Disabling device sdb on hayes-01
'echo offline > /sys/block/sdb/device/state'
  VG #PV #LV #SN Attr   VSize  VFree 
  df   1   0   0 wz--n- <1.82t <1.82t
Renaming df to df_2
vgrename --yes df df_2
  Volume group "df" successfully renamed to "df_2"

Generating a new PV uuid for /dev/sdc1
pvchange -u /dev/sdc1

Enabling device sdb on hayes-01
'echo running > /sys/block/sdb/device/state'
WARNING: ignoring metadata seqno 1 on /dev/sdb1 for seqno 3 on /dev/sdc1 for VG df_2.
  WARNING: Inconsistent metadata found for VG df.
  See vgck --updatemetadata to correct inconsistency.
  Internal error: vginfo_lookup vgid KGHXvEiGocST9XkZcb747ypiK691UQ1Y has two names df df_2
  Internal error: lvmcache_update_vg df_2 no vginfo
  Internal error: vginfo_lookup vgid KGHXvEiGocST9XkZcb747ypiK691UQ1Y has two names df df_2
  Internal error: lvmcache_get_outdated_mdas no vginfo
  Internal error: vginfo_lookup vgid KGHXvEiGocST9XkZcb747ypiK691UQ1Y has two names df df_2
  Internal error: lvmcache_get_outdated_mdas no vginfo
pvs should warn about the need to fix the dup VGID

[root@hayes-01 ~]# pvscan
  WARNING: ignoring metadata seqno 1 on /dev/sdb1 for seqno 3 on /dev/sdc1 for VG df_2.
  WARNING: Inconsistent metadata found for VG df.
  See vgck --updatemetadata to correct inconsistency.
  Internal error: vginfo_lookup vgid KGHXvEiGocST9XkZcb747ypiK691UQ1Y has two names df df_2
  Internal error: lvmcache_update_vg df_2 no vginfo
  Internal error: vginfo_lookup vgid KGHXvEiGocST9XkZcb747ypiK691UQ1Y has two names df df_2
  Internal error: lvmcache_get_outdated_mdas no vginfo
  Internal error: vginfo_lookup vgid KGHXvEiGocST9XkZcb747ypiK691UQ1Y has two names df df_2
  Internal error: lvmcache_get_outdated_mdas no vginfo
  PV /dev/sdc1   VG df_2            lvm2 [<1.82 TiB / <1.82 TiB free]
  Total: 1 [<1.82 TiB] / in use: 1 [<1.82 TiB] / in no VG: 0 [0   ]


Note You need to log in before you can comment on or make changes to this bug.