LXD folder content redirect

Hi !

I was wondering if anyone else has been thinking or doing it this way. Normally when installing LXD with SNAP it creates LXD folder under /var/lib/snapd/snap/lxd/ . Since I’m using external storage over FC Netapp LUNs I thought it might be good idea to create separate storage mount for LXD folder in order to avoid container data fills up my root OS partition. Is there any good way to configure LXD so it uses by default some other folder for Container root folder or I must create some symbolic link between /var/lib/snapd/snap/lxd/ and my remote path ?

Best,

It’s usually much preferred to keep snap data where it is, but then configure your LXD storage pools to be on whatever device or path your want.

You can do something like this:

  • lxc storage create default dir source=/path/to/wherever/your/storage/is