Is it possible to run lxd/lxc on a secondary, non operating system hdd?

If you want to run all of LXD to your second drive: boot into a rescue session, move /var/lib/lxd to /dev/sdb (or zfs partition), then create a symlink of /var/lib/lxd to your second drive.

Please don’t use symlinks if you want to do that. This is inherently unsafe and might mess with your setup. Use bind-mounts instead:

mount --bind /dev/sdb /var/lib/lxd
1 Like