Bug 1902351

Summary: PV size inconsistency
Product: [Community] LVM and device-mapper Reporter: Tom Yan <tom.ty89>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: Command-line tools QA Contact: cluster-qe <cluster-qe>
Status: NEW --- Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, thornber, zkabelac
Version: 2.02.185Flags: pm-rhel: lvm-technical-solution?
pm-rhel: lvm-test-coverage?
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
pvdisplay
none
vgcfg none

Description Tom Yan 2020-11-28 00:57:34 UTC
Description of problem:
dev_size in the VG configuration file ("Text Format Volume Group") and the "Not Usable" in `pvdisplay` can change after pvresize.

For example, two PVs were created with `--dataalignment 8M` (and then a VG was created with `-s 8M` on them). The partitions are of 7176M each (7G + 8M). Before pvresize, dev_size is equal to 717GM with "Not Usable" being 0. After  pvresize (--setphysicalvolumesize 7176M), dev_size is equal to 7GiB with "Not Usable" being 8MiB.

Note that pe_start and pe_count remains the same, so this doesn't seem to be a serious problem. Just that it may cause confusion.

See the attached files for more details. The states of the PVs are "Before" and "After" respectively.

Version-Release number of selected component (if applicable):
2,02.187


How reproducible:
Always


Steps to Reproduce:
1.Create PV(s) with `--dataalignment`
2.Create a VG on the PVs
3.pvresize the PV(s)

Actual results:
dev_size and "Not Usable" not being consistent before and after pvresize (when the size is actually the same)


Expected results:
dev_size and "Not Usable" being consistent before and after pvresize (when the size is actually the same)


Additional info:

Comment 1 Tom Yan 2020-11-28 00:58:23 UTC
Created attachment 1734268 [details]
pvdisplay

Comment 2 Tom Yan 2020-11-28 00:58:40 UTC
Created attachment 1734269 [details]
vgcfg

Comment 3 Tom Yan 2020-11-28 01:05:34 UTC
Btw it seems like a step missing to the PVs or so in vgcreate (and maybe also vgextend/vgreduce), unless the "Before" is considered "correct" (I don't know the "definition" of dev_size but "Not Usable 0" seems wrong to me).