- 1 Add LVM Thin provisioning support to the yum-fs-snapshot plugin
Add LVM Thin provisioning support to the yum-fs-snapshot plugin
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.
- Targeted release: Fedora 19
- Last updated: 2013-03-12
- Percentage of completion: 100%
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.
Benefit to Fedora
The snapshots of thinly provisioned volumes could be used as rollback points after a system update is deemed undesirable.
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
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.
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.
- LVM2 support for converting a linear LV to an external origin for a thin-pool
None necessary, no other packages or capabilities will depend on this feature.
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.
Added the ability to create snapshots of thinly provisioned LVM2 volumes to the fs-snapshot plugin provided by yum-utils.