Enable and start lvm2-lvmetad for lvm configuration

This commit is contained in:
James Page 2015-09-23 08:56:09 +01:00
parent 0989faef43
commit e89cad554c
1 changed files with 6 additions and 0 deletions

View File

@ -170,6 +170,12 @@ def configure_lxd_block():
list_lvm_volume_group(dev) == 'lxd_vg'):
log('Device already configured for LVM/LXD, skipping')
return
# Enable and startup lvm2-lvmetad to avoid extra output
# in lvm2 commands, which confused lxd.
cmd = ['systemctl', 'enable', 'lvm2-lvmetad']
check_call(cmd)
cmd = ['systemctl', 'start', 'lvm2-lvmetad']
check_call(cmd)
create_lvm_physical_volume(dev)
create_lvm_volume_group('lxd_vg', dev)
cmd = ['lxc', 'config', 'set', 'storage.lvm_vg_name', 'lxd_vg']