Ixc image publishing on root partition instead LVM pool

,

Hi! I have LVM thin pool on my server(srv1) which use for lxc containers.

When i create a backup containers i use

lxc snapshot name_container
lxc publish name_container/name_snapshot
lxc image export name_image to the backup disks (large storage)

a few days ago my server is broken, but i have a backups
i restore my backups on another server(srv2) with DIR storage instead lvm and all OK.

yesterday i repair my first server(srv1) and setup lvm and lxd
I create lxc lvm pool, pushing containers from srv2 to srv1 and started it - all ok

when i start backup script, my root partition (/) on srv1 growing when containers publishing
i have on root partirion only 50gb free space and and backup script failed, because image of container bigger than free space on root /

BUT, when srv1 has been not broken (week ago) i see my root partition is clear when i backup containers every night. I don’t know where is stores images, but i exactly know my root partition is not growing at all

Why publishing image go to the /var/lib/lxd/images instead /var/lib/lxd/storage_pools/images?

Can i configure publishing images to the LVM storage pool instead default location?

How to change local LXD image store - to storage pool image store

I asked because it’s works on my srv1 (week ago)

reason of broking my srv1 is metedata on lvm pool 100% maybe images are published in metedata all time? and it’s overspaced? I don’t know

1 Like

There are configuration options now to choose where image and backup tarballs are stored.
Look for storage.backups_volume and storage.images_volume in https://linuxcontainers.org/lxd/docs/master/server

Those two types of artifact are global and so aren’t normally tied to a storage pool, but due to many systems being setup in the way you described, it’s now possible to use a custom storage volume from any available storage pool to hold those rather than keep them on the root device.

1 Like

Okay, thank you for the answer.

I create a symlink to the another place (in which more space)

ln -s /var/lib/lxd/images /another place

In lxd docs i see the command “lxc export” ( tar ball without publish step)
I have lxd 3.0.3 in which do not have this command. In which version lxd this command will do work?

Not sure exactly when we introduced that, but yeah, it’s not in the 3.0.x series, if you switch to the current feature release (3.18), you’ll have it.