Hi! Some time ago i use lxd ver ~3 (LVM storage) and use ubuntu 18.04 and when i create containers, i do command “df -h” and i see mountpoints of all my containers
Now i use lxd 4.0.4 on ubuntu 20.04
Here the lxd init
Would you like to use LXD clustering? (yes/no) [default=no]: no
Do you want to configure a new storage pool? (yes/no) [default=yes]: yes
Name of the new storage pool [default=default]: default
Name of the storage backend to use (btrfs, dir, lvm, zfs, ceph) [default=zfs]: lvm
Create a new LVM pool? (yes/no) [default=yes]: yes
Would you like to use an existing empty block device (e.g. a disk or partition)? (yes/no) [default=no]: yes
Path to the existing block device: /dev/mapper/lxd_storage-lxd
Would you like to connect to a MAAS server? (yes/no) [default=no]: no
Would you like to create a new local network bridge? (yes/no) [default=yes]: no
Would you like to configure LXD to use an existing bridge or host interface? (yes/no) [default=no]: yes
Name of the existing bridge or host interface: br0
Would you like LXD to be available over the network? (yes/no) [default=no]: yes
Address to bind LXD to (not including port) [default=all]:
Port to bind LXD to [default=8443]:
Trust password for new clients:
Again:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes] yes
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: no
/dev/mapper/lxd_storage-lxd - this is LV volume.
lxd-storage - VG group
And after creating containers i don’t see mounpoints
Why? Can anybody explain?
That’s normal, with the snap version of LXD, mountpoints are kept away in a separate mount namespace. This makes it less likely to be messed with by external processes.
You can take a look at what’s mounted through /var/snap/lxd/common/mntns/var/snap/lxd/common/storage-pools/ if you really need it.
lxc config device override is to be used when the device you’re trying to modify is currently coming through a profile.
lxc config device set is to be used when the device is already part of the instance config.
So basically if you see the device in lxc config show, use lxc config set, if you don’t, use lxc config device override.
lxc config device override will copy the device entry from whatever profile it came from into your instance specific config and apply any changes you want. Any subsequent changes are then done through lxc config device set.
In the example above, Tom used -s lvm during lxc launch which then creates an instance specific disk tied to that lvm storage pool. The instance therefore has an instance specific disk device and so lxc config device set is used to alter it.