Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
(In reply to Corey Marthaler from comment #0)
> Description of problem:
> This is a reg check for bug 800012. It appears that everything but the attr
> was updated. Should be 'a-u' not 'a--'.
>
No, we change this in the end (but released version in RHEL6 had that change included too). The 'u' was the 4th bit, not 3rd bit.
At first, we had 4 bits in pv_attr where the 4th one was the 'u' for 'used'. And it was pure binary - either used or not.
Then we optimized this and said it's not necessary to report 'a' in the 1st bit for "allocatable". If the PV is allocatable, it's clearly in some VG and hence used.
So we're reusing the 1st bit instead of adding a new 4th bit in pv_attr like it was at the beginning (see that the number of bits in pv_attr field is 3 now, not 4). The rule is:
- if the 1st bit in pv_attr is 'a' allocatable, we surely have VG metadata because allocatability is property of VG metadata actually - we don't need to display the 'u' anywhere because if we have VG metadata, the PV is used (simply, 'a' implies 'u')
- if the 1st bit in pv_attr is 'u' used, we're either missing VG metadata that would tell us about allocatability OR we have metadata, but the PV is not allocatable , but still in a VG (we can change allocatability by pvchange -x y/n).
So from your example:
[root@host-083 ~]# pvs -o pv_name,pv_attr,pv_ext_vsn,pv_in_use,pv_used /dev/sdg1
PV Attr PExtVsn PInUse Used
/dev/sdg1 a-- 2 used 1.01g
--> the PV sdg1 is 'a' allocatable, hence it's used.
The man pvs also has this mentioned (in a way):
The pv_attr bits are: (a)llocatable, e(x)ported, (m)issing, (u)sed (but not allocatable), (d)uplicate.
--> "used but not allocatable" (it's not allocatable if we changed that to not allocatable directly with pvchange -x n call or if we're missing VG metadata that would tell us anything about allocatability - hence we assume it's not allocatable).