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.
Bug 1246231 - LVM needs volume ownership enforcement
Summary: LVM needs volume ownership enforcement
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
Steven J. Levine
URL:
Whiteboard:
Depends On: 170705
Blocks: 233117 655920 729764 756082
TreeView+ depends on / blocked
 
Reported: 2015-07-23 18:33 UTC by Corey Marthaler
Modified: 2023-03-08 07:27 UTC (History)
18 users (show)

Fixed In Version: lvm2-2.02.124-1.el7
Doc Type: Enhancement
Doc Text:
LVM systemID LVM volume groups can now be assigned an owner. The volume group owner is the system ID of a host. Only the host with the given system ID can use the VG. This can benefit volume groups that exist on shared devices, visible to multiple hosts, which are otherwise not protected from concurrent use from multiple hosts. LVM volume groups on shared devices with an assigned system ID are owned by one host and protected from other hosts.
Clone Of: 170705
Environment:
Last Closed: 2015-11-19 12:47:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2147 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2015-11-19 11:11:07 UTC

Comment 1 Corey Marthaler 2015-07-23 18:34:39 UTC
We don't have a rhel7.2 feature bug for systemid yet. Let's use this one.

Comment 3 Peter Rajnoha 2015-09-04 13:29:51 UTC
Related info about LVM systemid feature from man page:

https://git.fedorahosted.org/cgit/lvm2.git/tree/man/lvmsystemid.7.in

Comment 5 Corey Marthaler 2015-09-23 15:51:15 UTC
Marking the systemid feature verified in the latest rpms.

3.10.0-306.el7.x86_64
lvm2-2.02.130-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
lvm2-libs-2.02.130-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
lvm2-cluster-2.02.130-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
device-mapper-1.02.107-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
device-mapper-libs-1.02.107-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
device-mapper-event-1.02.107-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
device-mapper-event-libs-1.02.107-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
device-mapper-persistent-data-0.5.5-1.el7    BUILT: Thu Aug 13 09:58:10 CDT 2015
cmirror-2.02.130-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
sanlock-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
sanlock-lib-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
lvm2-lockd-2.02.130-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015


[root@mckinley-01 ~]# grep system_id_source /etc/lvm/lvm.conf
        # Configuration option global/system_id_source.
        system_id_source = "uname"
        # This is used when system_id_source is set to 'file'.

# Each node w/ shared storage created their own VG
[root@mckinley-01 ~]# pvcreate /dev/mapper/mpatha1
  Physical volume "/dev/mapper/mpatha1" successfully created
[root@mckinley-01 ~]# vgcreate vg1 /dev/mapper/mpatha1
  Volume group "vg1" successfully created with system ID mckinley-01.lab.msp.redhat.com

# pvscan shows all the shared VGs
[root@mckinley-01 ~]# pvscan
  PV /dev/mapper/mpathb1 VG vg3  lvm2 [249.99 GiB / 249.99 GiB free]
  PV /dev/mapper/mpathe1 VG vg4  lvm2 [249.99 GiB / 249.99 GiB free]
  PV /dev/mapper/mpathd1 VG vg2  lvm2 [249.99 GiB / 249.99 GiB free]
  PV /dev/mapper/mpatha1 VG vg1  lvm2 [249.99 GiB / 249.99 GiB free]

# vgscan and vgs shows only the owned VG
[root@mckinley-01 ~]# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vg1" using metadata type lvm2
  Found volume group "rhel_mckinley-01" using metadata type lvm2
[root@mckinley-01 ~]# vgs
  VG               #PV #LV #SN Attr   VSize   VFree  
  vg1                1   0   0 wz--n- 249.99g 249.99g

# Each node sees only it's own vg
[root@mckinley-01 ~]# vgs -o+systemid
  VG #PV #LV #SN Attr   VSize   VFree   System ID                     
  vg1  1   0   0 wz--n- 249.99g 249.99g mckinley-01.lab.msp.redhat.com
[root@mckinley-02 ~]# vgs -o+systemid
  VG #PV #LV #SN Attr   VSize   VFree   System ID                     
  vg2  1   0   0 wz--n- 249.99g 249.99g mckinley-02.lab.msp.redhat.com
[root@mckinley-03 ~]# vgs -o+systemid
  VG #PV #LV #SN Attr   VSize   VFree   System ID                     
  vg3  1   0   0 wz--n- 249.99g 249.99g mckinley-03.lab.msp.redhat.com
[root@mckinley-04 ~]# vgs -o+systemid
  VG #PV #LV #SN Attr   VSize   VFree   System ID                     
  vg4  1   0   0 wz--n- 249.99g 249.99g mckinley-04.lab.msp.redhat.com

# with the --foreign flag, the other owned VGs can be seen
[root@mckinley-01 ~]# vgs --foreign -o+systemid
  VG  PV #LV #SN Attr   VSize   VFree   System ID                     
  vg1  1   1   0 wz--n- 249.99g 249.89g mckinley-01.lab.msp.redhat.com
  vg2  1   0   0 wz--n- 249.99g 249.99g mckinley-02.lab.msp.redhat.com
  vg3  1   0   0 wz--n- 249.99g 249.99g mckinley-03.lab.msp.redhat.com
  vg4  1   0   0 wz--n- 249.99g 249.99g mckinley-04.lab.msp.redhat.com

# foreign vgs are protected against being used or activated
[root@mckinley-01 ~]# lvcreate -n lv2 -L 100M vg2
  Cannot access VG vg2 with system ID mckinley-02.lab.msp.redhat.com with local system ID mckinley-01.lab.msp.redhat.com.
[root@mckinley-01 ~]# vgchange -ay vg2
  Cannot access VG vg2 with system ID mckinley-02.lab.msp.redhat.com with local system ID mckinley-01.lab.msp.redhat.com.
[root@mckinley-01 ~]# vgchange -an vg2
  Cannot access VG vg2 with system ID mckinley-02.lab.msp.redhat.com with local system ID mckinley-01.lab.msp.redhat.com.

# vgs can be exported and then imported to other nodes
[root@mckinley-01 ~]# vgimport vg2
  Cannot access VG vg2 with system ID mckinley-02.lab.msp.redhat.com with local system ID mckinley-01.lab.msp.redhat.com.
[root@mckinley-02 ~]# vgexport vg2
  Volume group "vg2" successfully exported
[root@mckinley-01 ~]# vgimport vg2
  Volume group "vg2" successfully imported
[root@mckinley-02 ~]# pvscan --cache
[root@mckinley-02 ~]#  vgs --foreign -o+systemid
  VG  PV #LV #SN Attr   VSize   VFree   System ID                     
  vg1  1   1   0 wz--n- 249.99g 249.89g mckinley-01.lab.msp.redhat.com
  vg2  1   0   0 wz--n- 249.99g 249.99g mckinley-01.lab.msp.redhat.com
  vg3  1   0   0 wz--n- 249.99g 249.99g mckinley-03.lab.msp.redhat.com
  vg4  1   0   0 wz--n- 249.99g 249.99g mckinley-04.lab.msp.redhat.com
[root@mckinley-01 ~]# pvscan --cache
[root@mckinley-01 ~]# vgs --foreign -o+systemid
  VG  PV #LV #SN Attr   VSize   VFree   System ID                     
  vg1  1   1   0 wz--n- 249.99g 249.89g mckinley-01.lab.msp.redhat.com
  vg2  1   0   0 wz--n- 249.99g 249.99g mckinley-01.lab.msp.redhat.com
  vg3  1   0   0 wz--n- 249.99g 249.99g mckinley-03.lab.msp.redhat.com
  vg4  1   0   0 wz--n- 249.99g 249.99g mckinley-04.lab.msp.redhat.com
[root@mckinley-01 ~]# lvcreate -n lv5 -L 100M vg2
  Logical volume "lv5" created.
[root@mckinley-01 ~]# vgs -o+systemid 
  VG  PV #LV #SN Attr   VSize   VFree   System ID                     
  vg1  1   1   0 wz--n- 249.99g 249.89g mckinley-01.lab.msp.redhat.com
  vg2  1   1   0 wz--n- 249.99g 249.89g mckinley-01.lab.msp.redhat.com
[root@mckinley-02 ~]# lvcreate -n lv6 -L 100M vg2
  Cannot access VG vg2 with system ID mckinley-01.lab.msp.redhat.com with local system ID mckinley-02.lab.msp.redhat.com.

Comment 7 errata-xmlrpc 2015-11-19 12:47:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2147.html


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