Bug 852899 - thinp snapshots are only supported one level deep
thinp snapshots are only supported one level deep
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.3
x86_64 Other
low Severity low
: rc
: ---
Assigned To: Zdenek Kabelac
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-29 18:23 EDT by Corey Marthaler
Modified: 2012-10-11 04:19 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-11 04:19:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2012-08-29 18:23:54 EDT
Description of problem:
This is more of a clarification issue then a bug. You can take snapshots of thinp volumes, and snapshots of of thinp volume snapshots, but not any further then that. Are we ever going to support going further then that?

The second level error states "Snapshots of snapshots are not supported yet." However, that's not technically true if you can snap a thinp snap.


SCENARIO - [snap_of_snaps]
Create a snapshot and then attempt multiple levels of snaps of snaps

Making origin volume
Creating thinpool and corresponding thin origin volume
lvcreate --thinpool POOL -L 300M snapper_thinp
lvcreate --virtualsize 1G --thinpool snapper_thinp/POOL -n origin
Making snapshot of origin volume
lvcreate -s /dev/snapper_thinp/origin -n stack1
Attempting snapshot of snapshot volume
lvcreate -s /dev/snapper_thinp/stack1 -c 32 -n stack2 -L 100M
lvcreate -s /dev/snapper_thinp/stack2 -c 32 -n stack3 -L 100M
  Snapshots of snapshots are not supported yet.
stacked snap attempt failed

[root@taft-01 ~]# lvs -a -o +devices
  LV           VG            Attr     LSize   Pool Origin Data%  Devices
  POOL         snapper_thinp twi-a-tz 300.00m               0.00 POOL_tdata(0)
  [POOL_tdata] snapper_thinp Twi-aot- 300.00m                    /dev/sdh1(0)
  [POOL_tmeta] snapper_thinp ewi-aot-   4.00m                    /dev/sdg1(0)
  origin       snapper_thinp Vwi-a-tz   1.00g POOL          0.00
  stack1       snapper_thinp owi-a-tz   1.00g POOL origin   0.00
  stack2       snapper_thinp swi-a-s- 100.00m      stack1   0.00 /dev/sdh1(75)


Version-Release number of selected component (if applicable):
2.6.32-279.el6.x86_64

lvm2-2.02.95-10.el6    BUILT: Fri May 18 03:26:00 CDT 2012
lvm2-libs-2.02.95-10.el6    BUILT: Fri May 18 03:26:00 CDT 2012
lvm2-cluster-2.02.95-10.el6    BUILT: Fri May 18 03:26:00 CDT 2012
udev-147-2.41.el6    BUILT: Thu Mar  1 13:01:08 CST 2012
device-mapper-1.02.74-10.el6    BUILT: Fri May 18 03:26:00 CDT 2012
device-mapper-libs-1.02.74-10.el6    BUILT: Fri May 18 03:26:00 CDT 2012
device-mapper-event-1.02.74-10.el6    BUILT: Fri May 18 03:26:00 CDT 2012
device-mapper-event-libs-1.02.74-10.el6    BUILT: Fri May 18 03:26:00 CDT 2012
cmirror-2.02.95-10.el6    BUILT: Fri May 18 03:26:00 CDT 2012
Comment 1 Mike Snitzer 2012-08-29 23:07:32 EDT
The dm-thinp kernel code doesn't have any constraint on the depth of the snapshots of snapshots.  So this is clearly an LVM constraint that needs fixing.
Comment 2 Alasdair Kergon 2012-08-31 03:34:12 EDT
Yes, thanks for pointing this out!  It does need some changes to handle it, but it shouldn't be too tricky.
Comment 3 Marian Csontos 2012-09-04 05:57:05 EDT
To make thinbs clear: the snapshots of snapshots created here are _not_ thin-snapshots as the -L is used.

IMO in this situation the thin LV should behave more like regular LV and classical snapshot should be allowed.
Comment 4 Alasdair Kergon 2012-09-04 08:19:02 EDT
Yes, old-style snapshots could perhaps be made to work...
Comment 5 Corey Marthaler 2012-09-04 12:35:06 EDT
Good point Marian. Once I removed the '-L option' it allowed me to create many levels of snaps of snaps. I fear that this may be confusing to users if all that separates thin-snaps from regular snaps is something as simple as the "-L size" option and not some more detailed option like "--type" or something similar.


  POOL         snapper_thinp twi-a-tz 300.00m                0.00 POOL_tdata(0)   
  [POOL_tdata] snapper_thinp Twi-aot- 300.00m                     /dev/sdh1(0)    
  [POOL_tmeta] snapper_thinp ewi-aot-   4.00m                     /dev/sdg1(0)    
  origin       snapper_thinp Vwi-a-tz   1.00g POOL           0.00
  stack1       snapper_thinp Vwi-a-tz   1.00g POOL origin    0.00
  stack10      snapper_thinp Vwi-a-tz   1.00g POOL stack9    0.00
  stack11      snapper_thinp Vwi-a-tz   1.00g POOL stack10   0.00
  stack12      snapper_thinp Vwi-a-tz   1.00g POOL stack11   0.00
  stack2       snapper_thinp Vwi-a-tz   1.00g POOL stack1    0.00
  stack3       snapper_thinp Vwi-a-tz   1.00g POOL stack2    0.00
  stack4       snapper_thinp Vwi-a-tz   1.00g POOL stack3    0.00
  stack5       snapper_thinp Vwi-a-tz   1.00g POOL stack4    0.00
  stack6       snapper_thinp Vwi-a-tz   1.00g POOL stack5    0.00
  stack7       snapper_thinp Vwi-a-tz   1.00g POOL stack6    0.00
  stack8       snapper_thinp Vwi-a-tz   1.00g POOL stack7    0.00
  stack9       snapper_thinp Vwi-a-tz   1.00g POOL stack8    0.00
Comment 6 Marian Csontos 2012-09-04 16:38:50 EDT
(In reply to comment #5)
> Good point Marian. Once I removed the '-L option' it allowed me to create
> many levels of snaps of snaps. I fear that this may be confusing to users if
> all that separates thin-snaps from regular snaps is something as simple as
> the "-L size" option and not some more detailed option like "--type" or
> something similar.

And not only to users - you were confused as well and so was I.

Also if the limits on thin snapshot sizes (whatever that means) were implemented in the future, -L would be already taken.
Comment 7 Zdenek Kabelac 2012-10-11 04:19:05 EDT
So I'm closing this one as  not a big - since  for old snaps we are not supporting chaining - for thin snaps it should work.

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