[blivet] support for lvm and btrfs snapshots

David Lehman dlehman at redhat.com
Thu Jun 5 16:47:20 UTC 2014


These add support for recognizing and creating snapshots. There is no new
action class for a snapshot merge/rollback. Both of the lvm snapshot classes
(old-style and thin) have a merge method that can be called directly as needed.
Reformatting a snapshot is not allowed.

Also included is an improvement to the mechanism for identifying devices that
can be directly used for filesystems or swap space. In the good old days it was
as simple as "if it's a leaf device it can be accessed directly". Btrfs and
snapshots have complicated this. The new "direct" property of StorageDevice
indicates whether a device instance can be written to directly.

David Lehman (17):
  Make sure disk filters are applied even if populate fails.
  Reset the devicetree before tearing everything down in _cleanUp.
  Remove duplicate portion of lvm config string.
  Mark BTRFSDevice as not resizable.
  Add docstrings for BTRFSVolumeDevice and BTRFSSubVolumeDevice.
  Add backend functions for creating and managing snapshots.
  Add optional kwarg to force removal of a logical volume.
  Add ignore_skip keyword arg to lvactivate.
  Add Device classes for snapshots.
  Use LVMSnapshotDevice when populating the devicetree.
  Drop special accounting for snapshot space usage in VG.
  Detect existing btrfs snapshots.
  Some devices have immutable formatting.
  Special treatment for getting parted device for old-style lvm
    snapshots.
  Add tests for snapshots.
  Add support for read-only btrfs snapshots.
  Add a property indicating whether a device is directly accessible.

 blivet/__init__.py           |   5 +-
 blivet/deviceaction.py       |   9 +
 blivet/devicelibs/btrfs.py   |  29 ++-
 blivet/devicelibs/lvm.py     |  57 +++++-
 blivet/devices.py            | 429 ++++++++++++++++++++++++++++++++++++++++---
 blivet/devicetree.py         |  57 ++++--
 tests/devices_test.py        | 132 +++++++++++++
 tests/devicetree_test.py     |  41 +++++
 tests/imagebackedtestcase.py |   1 +
 9 files changed, 694 insertions(+), 66 deletions(-)

-- 
1.9.0



More information about the anaconda-patches mailing list