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 1505434 - raid1: snapshosts erronously allowed on legs
Summary: raid1: snapshosts erronously allowed on legs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-23 14:50 UTC by Heinz Mauelshagen
Modified: 2021-09-03 12:56 UTC (History)
11 users (show)

Fixed In Version: lvm2-2.02.176-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:22:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0853 0 None None None 2018-04-10 15:23:07 UTC

Description Heinz Mauelshagen 2017-10-23 14:50:16 UTC
Description of problem:
Snapshots can be created on raid1 leg devices (rimage SubLVs).

Version-Release number of selected component (if applicable):
lvm2-2.02.171-8.el7

How reproducible:
Always

Steps to Reproduce:
1. lvcreate -l1 -nr --type raid1 -m1 vg
2. lvcreate -s -l1 -ns0 /dev/mapper/r_rimage_0
3.

Actual results:
Snapshot's being created on first raid1 leg.

Expected results:
Snapshot creation on raid1 leg should be rejected.

Additional info:

Comment 2 Zdenek Kabelac 2017-10-23 16:28:26 UTC
Surprisingly this was not protected even in versions like 2.02.98.

Also '--type mirror' has the same problem.

Comment 3 Zdenek Kabelac 2017-10-25 20:13:32 UTC
Fixed validation with upstream patch:

https://www.redhat.com/archives/lvm-devel/2017-October/msg00066.html

Comment 4 Corey Marthaler 2017-10-26 17:11:40 UTC
I assume pmspare volumes will be disallowed as well with this fix?


[root@host-007 ~]# lvs -a -o +devices
  LV              VG      Attr       LSize   Pool Origin Data%  Meta% Devices
  [lvol0_pmspare] snapper ewi-------   4.00m                          /dev/sdd1(76)
  origin          snapper twi-a-tz-- 300.00m             0.00   0.88  origin_tdata(0)
  [origin_tdata]  snapper Twi-ao---- 300.00m                          /dev/sdd1(0)
  [origin_tmeta]  snapper ewi-ao----   4.00m                          /dev/sdd1(75)

# This could be disallowed as well
[root@host-007 ~]# lvcreate -s snapper/lvol0_pmspare -L 100M
  Using default stripesize 64.00 KiB.
  Reducing COW size 100.00 MiB down to maximum usable size 8.00 MiB.
  Logical volume "lvol1" created.

[root@host-007 ~]# lvcreate -s snapper/origin_tdata -L 100M
  Using default stripesize 64.00 KiB.
  Snapshots of thin pool data devices are not supported.

[root@host-007 ~]# lvcreate -s snapper/origin_tmeta -L 100M
  Using default stripesize 64.00 KiB.
  Reducing COW size 100.00 MiB down to maximum usable size 8.00 MiB.
  Snapshots of thin pool metadata devices are not supported.

[root@host-007 ~]# lvs -a -o +devices
  LV              VG      Attr       LSize   Pool Origin          Data%  Meta% Devices
  [lvol0_pmspare] snapper owi---s---   4.00m                                   /dev/sdd1(76)
  lvol1           snapper swi---s---   8.00m      [lvol0_pmspare]              /dev/sdd1(77)
  origin          snapper twi-a-tz-- 300.00m                      0.00   0.88  origin_tdata(0)
  [origin_tdata]  snapper Twi-ao---- 300.00m                                   /dev/sdd1(0)
  [origin_tmeta]  snapper ewi-ao----   4.00m                                   /dev/sdd1(75)

Comment 5 Zdenek Kabelac 2017-10-26 17:37:03 UTC
Nope - this needs another extra (similar) check. 

Thanks for pointing this out.

Comment 7 Zdenek Kabelac 2017-11-04 20:53:59 UTC
Further fixes in (2.02.176):

https://www.redhat.com/archives/lvm-devel/2017-October/msg00084.html

Comment 13 Corey Marthaler 2017-11-14 16:35:01 UTC
Fix verified in the latest rpms.

3.10.0-772.el7.x86_64

lvm2-2.02.176-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
lvm2-libs-2.02.176-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
lvm2-cluster-2.02.176-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
lvm2-lockd-2.02.176-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
lvm2-python-boom-0.8-3.el7    BUILT: Fri Nov 10 07:16:45 CST 2017
cmirror-2.02.176-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
device-mapper-1.02.145-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
device-mapper-libs-1.02.145-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
device-mapper-event-1.02.145-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
device-mapper-event-libs-1.02.145-3.el7    BUILT: Fri Nov 10 07:12:10 CST 2017
device-mapper-persistent-data-0.7.3-2.el7    BUILT: Tue Oct 10 04:00:07 CDT 2017




============================================================
Iteration 1 of 1 started at Tue Nov 14 10:31:28 CST 2017
============================================================
SCENARIO - [attempt_to_create_mirror_subvol_snaps]
Attempt to create mirror/raid LVs which contain meta volumes, and attempt to snapshot them
Making origin volume
lvcreate -L 300M snapper -n origin

Converting origin volume to type mirror
lvconvert --yes --type mirror -m 1 snapper/origin
Attempting to create snapshot volumes of mirror subvolumes:
lvcreate -s /dev/snapper/origin_mimage_0 -L 100M
  Snapshots of hidden volumes are not supported.
lvcreate -s /dev/snapper/origin_mlog -L 100M
  Snapshots of hidden volumes are not supported.
Removing origin snapper/origin

Making origin volume
lvcreate -L 300M snapper -n origin

Converting origin volume to type raid1
lvconvert --yes --type raid1 -m 1 snapper/origin
Attempting to create snapshot volumes of raid1 subvolumes:
lvcreate -s /dev/snapper/origin_rimage_0 -L 100M
  Snapshots of hidden volumes are not supported.
lvcreate -s /dev/snapper/origin_rmeta -L 100M
  Snapshot origin LV origin_rmeta not found in Volume group snapper.
Removing origin snapper/origin



SCENARIO - [attempt_to_create_pool_subvol_snaps]
Attempt to create thin/cache pool LVs which contain meta volumes, and attempt to snapshot them
Making origin volume
lvcreate -L 300M snapper -n origin

Converting origin volume to type cache-pool
lvconvert --yes --type cache-pool snapper/origin
  WARNING: Converting snapper/origin to cache pool's data volume with metadata wiping.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Attempting to create snapshot volumes of cache-pool subvolumes:
lvcreate -s /dev/snapper/origin_cdata -L 100M
  Snapshots of hidden volumes are not supported.
lvcreate -s /dev/snapper/origin_cmeta -L 100M
  Snapshots of hidden volumes are not supported.
lvcreate -s /dev/snapper/lvol0_pmspare -L 100M
  Snapshots of hidden volumes are not supported.
Removing origin snapper/origin

Making origin volume
lvcreate -L 300M snapper -n origin

Converting origin volume to type thin-pool
lvconvert --yes --type thin-pool snapper/origin
  WARNING: Converting snapper/origin to thin pool's data volume with metadata wiping.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Attempting to create snapshot volumes of thin-pool subvolumes:
lvcreate -s /dev/snapper/origin_tdata -L 100M
  Snapshots of hidden volumes are not supported.
lvcreate -s /dev/snapper/origin_tmeta -L 100M
  Snapshots of hidden volumes are not supported.
lvcreate -s /dev/snapper/lvol0_pmspare -L 100M
  Snapshots of hidden volumes are not supported.
Removing origin snapper/origin



Deleting VG snapper
Deleting PVs /dev/sdb1 /dev/sdg1

Comment 16 errata-xmlrpc 2018-04-10 15:22:16 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://access.redhat.com/errata/RHEA-2018:0853


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