Bug 921235

Summary: thin_check, thin_dump and thin_restore must be copied into the initramfs if root LV is using thin provisioning
Product: Red Hat Enterprise Linux 7 Reporter: Mike Snitzer <msnitzer>
Component: dracutAssignee: dracut-maint
Status: CLOSED CURRENTRELEASE QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: agk, dlehman, dracut-maint-list, harald, jstodola, lvm-team, msnitzer
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dracut-027-81.git20130531.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 13:01:32 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:

Description Mike Snitzer 2013-03-13 18:37:39 UTC
Description of problem:
lvm2 uses /sbin/thin_check when activating a thinly provisioned volume; if the program isn't available the thinp LV will not be activated.

In the future lvm2 will also automate some repair of a thinly provisioned LV that fails thin_check.  The /sbin/thin_dump and /sbin/thin_restore utilities are needed for repair.

So all 3 binaries (provided by the 'device-mapper-persistent-data' package) should be copied into the initramfs if the root LV is thinly provisioned.

One easy way to tell if an LV is thinly provisioned is if it uses the "thin" segment type, e.g.:

# /sbin/lvs --noheadings -o segtype /dev/rhel/thin
  thin

Comment 1 Harald Hoyer 2013-05-30 10:05:24 UTC
commit 57937cf480c8e612edae5b00d978dce84fd83be9

Comment 2 Harald Hoyer 2013-05-31 08:23:11 UTC
dracut-027-81.git20130531.fc19

Comment 3 Jan Stodola 2014-01-30 12:00:40 UTC
[root@localhost ~]# rpm -q dracut
dracut-033-85.el7.x86_64
[root@localhost ~]# /sbin/lvs --noheadings -o segtype /dev/mapper/rhel-root
  thin
[root@localhost ~]# mount | grep ' / '
/dev/mapper/rhel-root on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
[root@localhost ~]# /sbin/lvs --noheadings -o segtype /dev/mapper/rhel-root
  thin
[root@localhost ~]# lsinitrd /boot/initramfs-3.10.0-78.el7.x86_64.img | grep thin
-r-xr-xr-x   1 root     root        15552 Jan 22 08:34 usr/lib64/device-mapper/libdevmapper-event-lvm2thin.so
lrwxrwxrwx   1 root     root           44 Jan 30 06:49 usr/lib64/libdevmapper-event-lvm2thin.so -> device-mapper/libdevmapper-event-lvm2thin.so
-rw-r--r--   1 root     root         1737 Dec 28 02:16 usr/lib/kbd/consolefonts/gr928-8x16-thin.psfu.gz
-rw-r--r--   1 root     root        85601 Jan 21 18:25 usr/lib/modules/3.10.0-78.el7.x86_64/kernel/drivers/md/dm-thin-pool.ko
-rwxr-xr-x   1 root     root       375264 Dec 27 14:40 usr/sbin/thin_check
-rwxr-xr-x   1 root     root      2153832 Dec 27 14:40 usr/sbin/thin_dump
-rwxr-xr-x   1 root     root      2153864 Dec 27 14:40 usr/sbin/thin_repair
-rwxr-xr-x   1 root     root      2149688 Dec 27 14:40 usr/sbin/thin_restore
[root@localhost ~]#

Moving to VERIFIED.

Comment 4 Ludek Smid 2014-06-13 13:01:32 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.