Bug 814737
Summary: | Extend lvcreate to take thin snapshots of existing non-thinly-provisioned LVs | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Alasdair Kergon <agk> |
Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> |
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.4 | CC: | agk, cmarthal, dwysocha, esandeen, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, thornber, tlavigne, zkabelac |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | 6.4 | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | lvm2-2.02.100-1.el6 | Doc Type: | Enhancement |
Doc Text: |
Feature:
Lvm2 has been extended with support for creation of thin snapshot of some existing non-thinly-provisioned LV.
Reason:
Thin-pool can be now used for snapshots of non-thin volumes with all the performance gains from thin pool target compared with traditional snapshot target.
Result (if any):
Original read-only inactive non-thinly-provisioned volume is converted into external origin for thin snapshot volume and stays unmodified and could be even used for multiple snapshots. Thin volume could be than used for any further modification of device instead.
Note: current lvm2 version doesn't support merge feature, so unlike with older lvm2 snapshots, updated device cannot be merged back into its origin device.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2013-11-21 23:16:14 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
Alasdair Kergon
2012-04-20 15:00:54 UTC
See also part of this thread: https://www.redhat.com/archives/dm-devel/2012-June/msg00107.html This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux. This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4. Adding QA ack for 6.4. Devel will need to provide unit testing results however before this bug can be ultimately verified by QA. This feature is not yet ready, postponing for next release. Feature is implemented, however there are some 'noticable' limitation. 2 ways to achieve the goal: examples: lvcreate -L10 -n lv1 vg 1st. way: make 'lv1' inactive: lvchange -an vg/lv1 make 'lv1' read-only: lvchange -pr vg/lv1 now lvcreate may take a snapshot into some existing pool lvcreate -s vg/lv1 --thinpool vg/existingpool 2nd. way: Live conversion of 'lv1' into a thin volume and using 'origlv' name for the origin which will be read-only volume: lvconvert --thin vg/lv1 --thinpool vg/existingpool --originname origlv Both ways are possible - user has to select which version better fits. [root@virt-008 ~]# lvcreate -T --size 1G non_cluster/pool_lv Logical volume "lvol0" created Logical volume "pool_lv" created [root@virt-008 ~]# lvcreate -s non_cluster/lv1 --thinpool non_cluster/pool_lv Cannot use writable LV as the external origin. [root@virt-008 ~]# lvchange -pr non_cluster/lv1 Logical volume "lv1" changed. [root@virt-008 ~]# lvcreate -s non_cluster/lv1 --thinpool non_cluster/pool_lv Logical volume "lvol1" created [root@virt-008 ~]# lvcreate -L10 -n lv1 non_cluster Rounding up size to full physical extent 12.00 MiB Logical volume "lv1" created [root@virt-008 ~]# lvcreate -T --size 1G non_cluster/pool_lv Logical volume "lvol0" created Logical volume "pool_lv" created [root@virt-008 ~]# lvconvert --thin non_cluster/lv1 --thinpool non_cluster/pool_lv --originname source_origin Logical volume "source_origin" created Converted non_cluster/source_origin to thin external origin. Removal of origin draws the removal of thin LV as well with it. It is not really clear which LV is dependent in the message though (lvs -a helps) [root@virt-008 ~]# lvremove non_cluster/source_origin Removing external origin "source_origin" will remove 1 dependent volume(s). Proceed? [y/n]: y Do you really want to remove active clustered logical volume lv1? [y/n]: y Logical volume "lv1" successfully removed Logical volume "source_origin" successfully removed Tested on (VERIFIED): lvm2-2.02.100-6.el6.x86_64 lvm2-cluster-2.02.100-6.el6.x86_64 device-mapper-1.02.79-6.el6.x86_64 kernel-2.6.32-424.el6.x86_64 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. http://rhn.redhat.com/errata/RHBA-2013-1704.html |