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_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
|
||||
# This needs to be set in the user_secrets.yml file.
|
||||
#lxd_trust_password:
|
||||
|
||||
# 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:
|
||||
# This variable should be used with lxd when using a
|
||||
# storage backend that utilizes storage pool if you
|
||||
|
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% if (lxd_storage_backend == "zfs" or lxd_storage_backend == "dir") %}
|
||||
|
||||
# This is a script to configure lxd system settings.
|
||||
# "/usr/bin/lxd init"
|
||||
|
||||
@ -16,3 +18,14 @@
|
||||
--storage-create-device={{ lxd_storage_create_device }} \
|
||||
{% endif %}
|
||||
--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