Running LXC 2.12 on Ubuntu 16.04 and noticed a few of our container servers are using file-based storage. The /var/lib/lxd directory is mounted on a BTRFS filesystem, but the default LXD storage pool is using a disk image file in /var/lib/lxd/storage-pools/default
The output from “df” show
Filesystem 1K-blocks Used Available Use% Mounted on
udev 2519228 0 2519228 0% /dev
tmpfs 507848 62744 445104 13% /run
/dev/sda1 11402520 3614292 7185964 34% /
tmpfs 2539232 0 2539232 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 2539232 0 2539232 0% /sys/fs/cgroup
/dev/sdb 104857600 18499736 84335912 18% /var/lib/lxd
cgmfs 100 0 100 0% /run/cgmanager/fs
tmpfs 100 0 100 0% /var/lib/lxd/shmounts
tmpfs 100 0 100 0% /var/lib/lxd/devlxd
/dev/loop0 15728640 12429324 2892692 82% /var/lib/lxd/storage-pools/default
tmpfs 507848 0 507848 0% /run/user/0
I need to re-create the default storage pool back on /var/lib/lxd and am looking for a way to make this happen with as little downtime as possible. From what I have read, I can probably create a new storage pool called default-1 as a “dir” type pool with a directory of /var/lib/lxd/storage-pools/default-1 then move containers from default to default-1.
Does this sound reasonable? If so, how can I rename “default-1” storage pool to “default” to match the other servers? Would I simply create delete the “default” storage pool after moving all containers over to default-1, then move them from default-1 to default?