[PATCH blivet] disable LVM metadata backup during image installs (#1066004)

Will Woods wwoods at redhat.com
Fri Sep 19 22:18:35 UTC 2014

Hey all,

This patchset should make blivet (and therefore anaconda) suppress the
creation of LVM metadata backup/archive files during image installs.

The first patch refactors devicelibs.lvm so that every call to the LVM
binary goes through _getConfigArgs().

The second patch adds an 'autobackup' attribute, which disables metadata
backup by having _getConfigArgs() add 'backup {backup=0 archive=0}' to the
LVM config (via --config) if 'autobackup' is False. (It also adds a test for
this to the existing LVM unit tests.)

The last patch makes Platform.update_from_flags() set autobackup=False if
flags.image_install is set. We *could* set autobackup=False from inside
anaconda, but update_from_flags() gets called from storageInitialize(),
which is called by any anaconda process that uses blivet, so I'm pretty sure
that will correctly disable autobackups during anaconda image installs.

The total diffstat is as follows:

 blivet/devicelibs/lvm.py          | 98 +++++++++++++++++----------------------
 blivet/platform.py                |  3 ++
 tests/devicelibs_test/lvm_test.py | 21 +++++++++
 3 files changed, 66 insertions(+), 56 deletions(-)

'make test' shows no new failures after adding this code.

Thanks for your time and consideration,


More information about the anaconda-patches mailing list