Features/YumFsSnapshotThinpSupport

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
(Feature accepted on Feb 06 FESCo meeting)
(Add LVM Thin provisioning support to the yum-fs-snapshot plugin)
 
Line 12: Line 12:
 
== Current status ==
 
== Current status ==
 
* Targeted release: [[Releases/19 | Fedora 19 ]]  
 
* Targeted release: [[Releases/19 | Fedora 19 ]]  
* Last updated: 2013-01-28
+
* Last updated: 2013-03-12
* Percentage of completion: 0%
+
* Percentage of completion: 100%
  
 
== Detailed Description ==
 
== Detailed Description ==
Line 22: Line 22:
  
 
== Scope ==
 
== Scope ==
The yum-utils package's fs-snapshot plugin will be modified to use the snapper tool to create the snapshots of the the thinp volumes.  The snapper tool would prefer to have both a pre and post-upgrade snapshot be created (useful to display the exact changes that occurred between the 2 snapshot points) -- so we'll have to coordinate with the yum developers to understand if there is an existing post transaction hook that can be used.
+
The yum-utils package's fs-snapshot plugin will be modified to create the snapshots of the the thinp volumes.  In addition to the pre yum transaction snapshot it will be configurable to create a post yum transaction snapshot.  The snapper tool would prefer to have both a pre and post-upgrade snapshot be created (useful to display the exact changes that occurred between the 2 snapshot points).  In the future, the snapper tool will allow for pre and post LVM snapshots to be imported into snapper.
  
 
== How To Test ==
 
== How To Test ==
Enable the thinp snapshots support in the fs-snapshot plugin's config file and then perform an update with yum.  This presumes that the system was installed to thinly provisioned volume(s) -- adding thinp volume support to anaconda's kickstart missed F-19 so we'll have to see about converting a normal linear LV to an external origin thinp after the initial installation.
+
Enable the LVM snapshots support in the fs-snapshot plugin's config file (/etc/yum/pluginconf.d/fs-snapshot.conf) and then perform an update with yum.  This presumes that the system was installed to thinly provisioned volume(s) -- adding thinp volume support to anaconda's kickstart missed F-19 so we'll have to see about converting a normal linear LV to an external origin thinp after the initial installation.  Short of having the root LV as a thinp volume it is easy enough to create a thin LV and just mount it anywhere (e.g. /mnt/throwaway).  Even if the yum transaction doesn't touch /mnt/throwaway (and it isn't listed in the config file's "exclude" mount points) the fs-snapshot plugin will create a snapshot for it (since it is listed in /etc/mtab).  To create a snapshot after the yum transaction add "create_snapshots_in_post = 1" to the main section of the config file.
  
 
== User Experience ==
 
== User Experience ==
Users will create a shared pool of storage that will host all thin provisioned volumes and their associated snapshots.  So in contrast to the old dm-snapshot implementation the user will not need to manage or monitor the free space of N snapshot volumes -- the storage for thin and snapshot volumes is allocated on-demand from the backing shared pool of storage.  Once the thinp snapshots support is enabled in the fs-snapshot plugin's config file the user will have snapshot created for them automatically.  They will then be able to use the snapper tool to manage the life-cycle of these snapshots.
+
Users will create a shared pool of storage that will host all thin provisioned volumes and their associated snapshots.  So in contrast to the old dm-snapshot implementation the user will not need to manage or monitor the free space of N snapshot volumes -- the storage for thin and snapshot volumes is allocated on-demand from the backing shared pool of storage.  Once the thinp snapshots support is enabled in the fs-snapshot plugin's config file the user will have snapshots created for them automatically.  In the future, they will then be able to use the snapper tool to manage the life-cycle of these snapshots.
  
 
== Dependencies ==
 
== Dependencies ==
 
* LVM2 support for converting a linear LV to an external origin for a thin-pool
 
* LVM2 support for converting a linear LV to an external origin for a thin-pool
* yum hook to create snapshot after the yum transaction completes
 
  
 
== Contingency Plan ==
 
== Contingency Plan ==
Line 38: Line 37:
  
 
== Documentation ==
 
== Documentation ==
TBD
+
The yum fs-snapshot plugin now has support for creating LVM snapshots of thinly provisioned logical volumes (LVs).  To create LVM snapshots of thinly provisioned LVs just set "enabled = 1" in the "[lvm]" section.  In addition to the pre yum transaction snapshots it is configurable to create post yum transaction snapshots.  To create a snapshot after the yum transaction add "create_snapshots_in_post = 1" to the "[main]" section of the config file.
  
 
== Release Notes ==
 
== Release Notes ==

Latest revision as of 18:48, 12 March 2013

Contents

[edit] Add LVM Thin provisioning support to the yum-fs-snapshot plugin

[edit] Summary

For the purposes of system rollback: Provide the ability to create a snapshot of all thinly provisioned LVM2 volumes associated with FS mount points that are relevant to a yum transaction.

[edit] Owner

[edit] Current status

  • Targeted release: Fedora 19
  • Last updated: 2013-03-12
  • Percentage of completion: 100%

[edit] Detailed Description

Yum's fs-snapshot plugin already has support for LVM2's old snapshots. LVM2's new thinp snapshots offer much more performance and ease administration. It is desirable to have the life-cycle of snapshots that are created by yum's fs-snapshot plugin be managed by the snapper utility. As such it could be that the yum fs-snapshot plugin is extend to provide a wrapper around snapper for the creation of thinp based snapshots.

[edit] Benefit to Fedora

The snapshots of thinly provisioned volumes could be used as rollback points after a system update is deemed undesirable.

[edit] Scope

The yum-utils package's fs-snapshot plugin will be modified to create the snapshots of the the thinp volumes. In addition to the pre yum transaction snapshot it will be configurable to create a post yum transaction snapshot. The snapper tool would prefer to have both a pre and post-upgrade snapshot be created (useful to display the exact changes that occurred between the 2 snapshot points). In the future, the snapper tool will allow for pre and post LVM snapshots to be imported into snapper.

[edit] How To Test

Enable the LVM snapshots support in the fs-snapshot plugin's config file (/etc/yum/pluginconf.d/fs-snapshot.conf) and then perform an update with yum. This presumes that the system was installed to thinly provisioned volume(s) -- adding thinp volume support to anaconda's kickstart missed F-19 so we'll have to see about converting a normal linear LV to an external origin thinp after the initial installation. Short of having the root LV as a thinp volume it is easy enough to create a thin LV and just mount it anywhere (e.g. /mnt/throwaway). Even if the yum transaction doesn't touch /mnt/throwaway (and it isn't listed in the config file's "exclude" mount points) the fs-snapshot plugin will create a snapshot for it (since it is listed in /etc/mtab). To create a snapshot after the yum transaction add "create_snapshots_in_post = 1" to the main section of the config file.

[edit] User Experience

Users will create a shared pool of storage that will host all thin provisioned volumes and their associated snapshots. So in contrast to the old dm-snapshot implementation the user will not need to manage or monitor the free space of N snapshot volumes -- the storage for thin and snapshot volumes is allocated on-demand from the backing shared pool of storage. Once the thinp snapshots support is enabled in the fs-snapshot plugin's config file the user will have snapshots created for them automatically. In the future, they will then be able to use the snapper tool to manage the life-cycle of these snapshots.

[edit] Dependencies

  • LVM2 support for converting a linear LV to an external origin for a thin-pool

[edit] Contingency Plan

None necessary, no other packages or capabilities will depend on this feature.

[edit] Documentation

The yum fs-snapshot plugin now has support for creating LVM snapshots of thinly provisioned logical volumes (LVs). To create LVM snapshots of thinly provisioned LVs just set "enabled = 1" in the "[lvm]" section. In addition to the pre yum transaction snapshots it is configurable to create post yum transaction snapshots. To create a snapshot after the yum transaction add "create_snapshots_in_post = 1" to the "[main]" section of the config file.

[edit] Release Notes

Added the ability to create snapshots of thinly provisioned LVM2 volumes to the fs-snapshot plugin provided by yum-utils.

[edit] Comments and Discussion