Bug 995102 - Snapper doesn't work with lvm2.02.99 or later
Snapper doesn't work with lvm2.02.99 or later
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: snapper (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Ondrej Kozina
yanfu,wang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-08 10:40 EDT by Ondrej Kozina
Modified: 2014-06-18 00:57 EDT (History)
3 users (show)

See Also:
Fixed In Version: snapper-0.1.7-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 08:28:31 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 Ondrej Kozina 2013-08-08 10:40:33 EDT
Description of problem:

Lvm2.02.99 changed the way it used to treat thin provisioned snapshots. Since 2.02.99, thinp snapshots are not activated after lvcreate by default. Snapper has to activate thin provisioned snapshot before trying to mount it.


[root@rawhide ~]# snapper -c test create-config -f "lvm(ext4)" /testsuite
[root@rawhide ~]# snapper -c test create --type single -p
1
[root@rawhide ~]# snapper -c test mount 1;
Failure (error.mount_snapshot).

snapper is also unable to load inactive snapshots...
[root@rawhide ~]# pkill snapperd; snapper -c dada delete 1
Illegal Snapshot.

Version-Release number of selected component (if applicable):
snapper-0.1.5-1.el7.*
Comment 2 Ondrej Kozina 2013-10-07 03:50:11 EDT
Fix is already in upstream. Waiting (asked) for new release
Comment 5 yanfu,wang 2014-01-21 22:13:01 EST
Verified on snapper-0.1.7-2.el7, the initial issue gone now:
# snapper -c test create-config -f "lvm(ext4)" /thin
# snapper -c test create --type single -p
1
# snapper -c test mount 1;
# echo $?
0
# snapper -c test list
Type   | # | Pre # | Date                            | User | Cleanup | Description | Userdata
-------+---+-------+---------------------------------+------+---------+-------------+---------
single | 0 |       |                                 | root |         | current     |         
single | 1 |       | Tue 21 Jan 2014 09:40:13 PM EST | root |         |             |        

# snapper -c test delete 1
# echo $?
0
# snapper -c test list
Type   | # | Pre # | Date | User | Cleanup | Description | Userdata
-------+---+-------+------+------+---------+-------------+---------
single | 0 |       |      | root |         | current     |
Comment 6 yanfu,wang 2014-02-08 04:53:40 EST
I have to assigned it back since I found the issue still happened on lvm(xfs):
/dev/mapper/vg-thinlv3 on /thin3 type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
# snapper -c test get-config
Key                    | Value   
-----------------------+---------
ALLOW_GROUPS           |         
ALLOW_USERS            |         
BACKGROUND_COMPARISON  | yes     
EMPTY_PRE_POST_CLEANUP | yes     
EMPTY_PRE_POST_MIN_AGE | 1800    
FSTYPE                 | lvm(xfs)
NUMBER_CLEANUP         | yes     
NUMBER_LIMIT           | 50      
NUMBER_MIN_AGE         | 1800    
SUBVOLUME              | /thin3  
TIMELINE_CLEANUP       | yes     
TIMELINE_CREATE        | yes     
TIMELINE_LIMIT_DAILY   | 10      
TIMELINE_LIMIT_HOURLY  | 10      
TIMELINE_LIMIT_MONTHLY | 10      
TIMELINE_LIMIT_YEARLY  | 10      
TIMELINE_MIN_AGE       | 1800    
# snapper -c test list
Type   | # | Pre # | Date                            | User | Cleanup | Description | Userdata
-------+---+-------+---------------------------------+------+---------+-------------+---------
single | 0 |       |                                 | root |         | current     |         
single | 1 |       | Sat 08 Feb 2014 04:41:09 AM EST | root |         |             |         

# snapper -c test mount 1
Failure (error.mount_snapshot).

# rpm -qa|grep snapper
snapper-0.1.7-4.el7.x86_64
snapper-libs-0.1.7-4.el7.x86_64
Comment 7 Alasdair Kergon 2014-02-08 08:35:37 EST
Might this be a different problem: Is the test attempting to mount a "clone" of the XFS filesytem with the same UUID while the original is still mounted?
Comment 8 yanfu,wang 2014-02-09 21:39:39 EST
(In reply to Alasdair Kergon from comment #7)
> Might this be a different problem: Is the test attempting to mount a "clone"
> of the XFS filesytem with the same UUID while the original is still mounted?
Below is my set up to test extX and xfs on top of thinlv. It's not "clone", right?
# modprobe scsi_debug dev_size_mb=256 lbpu=1 lbpws10=1 
# pvcreate /dev/sdb
# vgcreate vg /dev/sdb
# lvcreate -L 200M -T vg/thinpool
# lvcreate -V 1G -T vg/thinpool -n thinlv1
# lvcreate -V 1G -T vg/thinpool -n thinlv2
# lvcreate -V 1G -T vg/thinpool -n thinlv3
# mkfs.ext3 /dev/vg/thinlv1
# mkfs.ext4 /dev/vg/thinlv2
# mkfs.xfs /dev/vg/thinlv3
# mkdir /thin{1,2,3}
# mount /dev/vg/thinlv1 /thin1
# mount /dev/vg/thinlv2 /thin2
# mount /dev/vg/thinlv3 /thin3
# mount
...
/dev/mapper/vg-thinlv1 on /thin1 type ext3 (rw,relatime,seclabel,stripe=16,data=ordered)
/dev/mapper/vg-thinlv2 on /thin2 type ext4 (rw,relatime,seclabel,stripe=16,data=ordered)
/dev/mapper/vg-thinlv3 on /thin3 type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
Comment 9 Ondrej Kozina 2014-02-10 04:18:09 EST
This is nice manifestation of fs freeze bug using xfs filesysytem and thin provisioned readonly snapshots. I experienced it last week as well. I'll open individual bugzilla for the issue.

Yanfu, for the time being I suppose you should stick with ext4 before it's resolved and run tests related to xfs later. It's not a bug in snapper but rather in other layer.
Comment 12 Ludek Smid 2014-06-13 08:28:31 EDT
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.

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