Merge "Enable using btrfs as a backend"
This commit is contained in:
commit
92c0bfb0c0
@ -535,12 +535,16 @@ nova_compute_powervm_pip_packages:
|
|||||||
|
|
||||||
lxd_bind_address: 0.0.0.0
|
lxd_bind_address: 0.0.0.0
|
||||||
lxd_bind_port: 8443
|
lxd_bind_port: 8443
|
||||||
|
|
||||||
|
# Supported backends are 'zfs', 'dir' and 'btrfs' for now.
|
||||||
|
# To use btrfs, a btrfs filesystem must be mounted in /var/lib/lxd
|
||||||
|
# during compute node configuration.
|
||||||
lxd_storage_backend: dir
|
lxd_storage_backend: dir
|
||||||
# This needs to be set in the user_secrets.yml file.
|
# This needs to be set in the user_secrets.yml file.
|
||||||
#lxd_trust_password:
|
#lxd_trust_password:
|
||||||
|
|
||||||
# This variable should be used with lxd when using a
|
# This variable should be used with lxd when using a
|
||||||
# storage backend that utilizes storage pools
|
# storage backend that utilizes storage pools (zfs)
|
||||||
#lxd_storage_pool:
|
#lxd_storage_pool:
|
||||||
# This variable should be used with lxd when using a
|
# This variable should be used with lxd when using a
|
||||||
# storage backend that utilizes storage pool if you
|
# storage backend that utilizes storage pool if you
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
|
{% if (lxd_storage_backend == "zfs" or lxd_storage_backend == "dir") %}
|
||||||
|
|
||||||
# This is a script to configure lxd system settings.
|
# This is a script to configure lxd system settings.
|
||||||
# "/usr/bin/lxd init"
|
# "/usr/bin/lxd init"
|
||||||
|
|
||||||
@ -16,3 +18,14 @@
|
|||||||
--storage-create-device={{ lxd_storage_create_device }} \
|
--storage-create-device={{ lxd_storage_create_device }} \
|
||||||
{% endif %}
|
{% endif %}
|
||||||
--trust-password={{ lxd_trust_password }}
|
--trust-password={{ lxd_trust_password }}
|
||||||
|
|
||||||
|
{% elif (lxd_storage_backend == "btrfs") %}
|
||||||
|
|
||||||
|
# Check if filesystem if mounted as btrfs.
|
||||||
|
# If not nothing happens and storage will still be set to dir by default
|
||||||
|
|
||||||
|
if [ $(findmnt /var/lib/lxd -o FSTYPE -n) == "btrfs" ]; then
|
||||||
|
systemctl restart lxd
|
||||||
|
fi
|
||||||
|
|
||||||
|
{% endif %}
|
Loading…
x
Reference in New Issue
Block a user