Bug 1208088

Summary: thinp tools do not handle over large metadata devices
Product: Red Hat Enterprise Linux 7 Reporter: Joe Thornber <thornber>
Component: device-mapper-persistent-dataAssignee: Joe Thornber <thornber>
Status: CLOSED ERRATA QA Contact: Bruno Goncalves <bgoncalv>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: agk, bgoncalv, cmarthal, heinzm, jbrassow, lvm-team, msnitzer, prajnoha, thornber
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Intra-release bug. No documentation needed.
Story Points: ---
Clone Of:
: 1221372 (view as bug list) Environment:
Last Closed: 2015-11-19 09:39:09 UTC 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:
Bug Depends On:    
Bug Blocks: 1221372    

Description Joe Thornber 2015-04-01 11:09:10 UTC
Segfault if the destination device for thin_restore is very large.

#0  pack (disk=..., value=...) at ./persistent-data/space-maps/disk_structures.h:57
#1  (anonymous namespace)::metadata_index_store::commit_ies (this=0x73b0a0) at persistent-da\
ta/space-maps/disk.cc:636
#2  0x0000000000481599 in persistent_data::create_metadata_sm (tm=..., nr_blocks=52428800) a\
t persistent-data/space-maps/disk.cc:708
#3  0x00000000004a524c in thin_provisioning::metadata::metadata (this=0x717ef0, dev_path=...\
, ot=<optimized out>, data_block_size=128, nr_data_blocks=0) at thin-provisioning/metadata.c\
c:95
#4  0x00000000004c81fc in restore (quiet=false, dev=..., backup_file=...) at thin-provisioni\
ng/thin_restore.cc:48
#5  thin_restore_main (argc=5, argv=0x7fffffffe738) at thin-provisioning/thin_restore.cc:133
#6  0x0000000000406dcf in run (argv=0x7fffffffe738, argc=5, this=<optimized out>) at ./base/\
application.h:26
#7  base::application::run (this=0x7fffffffe630, argc=5, argv=0x7fffffffe738) at base/applic\
ation.cc:32
#8  0x0000000000406177 in main (argc=5, argv=0x7fffffffe738) at main.cc:39

Comment 6 Corey Marthaler 2015-08-12 21:50:59 UTC
This appears to work now with the latest rpms, marking verified.


3.10.0-302.el7.x86_64
lvm2-2.02.127-1.el7    BUILT: Mon Aug 10 03:22:35 CDT 2015
lvm2-libs-2.02.127-1.el7    BUILT: Mon Aug 10 03:22:35 CDT 2015
lvm2-cluster-2.02.127-1.el7    BUILT: Mon Aug 10 03:22:35 CDT 2015
device-mapper-1.02.104-1.el7    BUILT: Mon Aug 10 03:22:35 CDT 2015
device-mapper-libs-1.02.104-1.el7    BUILT: Mon Aug 10 03:22:35 CDT 2015
device-mapper-event-1.02.104-1.el7    BUILT: Mon Aug 10 03:22:35 CDT 2015
device-mapper-event-libs-1.02.104-1.el7    BUILT: Mon Aug 10 03:22:35 CDT 2015
device-mapper-persistent-data-0.5.4-1.el7    BUILT: Fri Jul 17 08:56:22 CDT 2015
cmirror-2.02.127-1.el7    BUILT: Mon Aug 10 03:22:35 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.127-1.el7    BUILT: Mon Aug 10 03:22:35 CDT 2015



[root@host-111 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize   Pool Origin Devices
  POOL            snapper_thinp twi---tz--   1.00g             POOL_tdata(0)
  [POOL_tdata]    snapper_thinp Twi-------   1.00g             /dev/sdd1(1)
  [POOL_tmeta]    snapper_thinp ewi-------   4.00m             /dev/sdd1(266)
  [lvol0_pmspare] snapper_thinp ewi-------   4.00m             /dev/sdd1(0)
  meta_swap       snapper_thinp -wi-a-----   4.00m             /dev/sdf1(0)
  newtmeta        snapper_thinp -wi-a----- 100.00g             /dev/sdb1(0)
  newtmeta        snapper_thinp -wi-a----- 100.00g             /dev/sdc1(0)
  newtmeta        snapper_thinp -wi-a----- 100.00g             /dev/sde1(0)
  newtmeta        snapper_thinp -wi-a----- 100.00g             /dev/sdf1(1)
  newtmeta        snapper_thinp -wi-a----- 100.00g             /dev/sdd1(257)
  origin          snapper_thinp Vwi---tz--   1.00g POOL
  other1          snapper_thinp Vwi---tz--   1.00g POOL
  other2          snapper_thinp Vwi---tz--   1.00g POOL
  other3          snapper_thinp Vwi---tz--   1.00g POOL
  other4          snapper_thinp Vwi---tz--   1.00g POOL
  other5          snapper_thinp Vwi---tz--   1.00g POOL
  snap            snapper_thinp Vwi---tz--   1.00g POOL origin

# Restoring to a 100g device...

[root@host-111 ~]# thin_restore -i /tmp/snapper_thinp_dump -o /dev/snapper_thinp/newtmeta
truncating metadata device to 4161600 4k blocks
Restoring: [=================================================] / 100%

Comment 8 errata-xmlrpc 2015-11-19 09:39:09 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-2170.html