LXD storage questions (running on Oracle Cloud)

I used to run my home and remote servers running mostly on docker. Recently I decided to learn more about virtualization and containers.

I transitioned my home server to proxmox 7.2. My remote servers are running on Oracle Cloud free tier which I’m currently studying. I have 2 instances with 1 core, 1GB or RAM and x86_64 architecture. The third instance has 4 cores, 24GB of RAM and arm64 architecture. Each of these 3 servers has ubuntu 22.04 on boot volumes of 47GB each. I also have 59GB of block storage which I can attach to all of them, but have not yet configured. Oracle free tier also allows me to have 2 autonomous databases and a load balancer.

My current project is to have the two x86 instances running OpenLiteSpeed for Wordpress websites with HA using the shared block storage, the autonomous databases and the load balancer which they provide. The arm instance will run a few personal services and provide public access to my home server services.

For organization purposes, I decided to run everything on the remote instances on lxd, which I’m studying as well. I set up an lxd cluster with the 3 oracle instances, but I was left with a few questions, mostly related to how to organize storage.

On local loop storage:

On proxmox, it’s clear what each storage device will store since I set that up. I still couldn’t figure out what will be stored on the local loop device which is created with lxd init. Since each oracle cloud instance will be mostly just running lxd, I created these loop devices with 25GB each. But I saw no information online on how to plan for this.

Is there any recommended guideline on how to set the local storage size?

Can anyone recommend me how to set my local storage size?

On shared block storage

I have not even started to think on how to set this up and still don’t know how to do so. I started studying about ceph. I might be completely incorrect about this since I don’t know much yet, but I think ceph might be an unnecessary hassle since oracle already provides ways to attach the block storage to all my oracle instances. Anyway, I still have many questions on how to set this up and provide a shared storage for my lxd containers.

Can anyone provide me with an idea on how to organize this part for the wordpress HA instances?

Has anyone used oracle cloud and can give me tips on things to watch out for?

Can my local storage also be set up in the shared block storage? What would be the advantages and disadvantages of doing so?

EDIT: Just a small note, I usually prefer btrfs over zfs.

I read all storage documentation more carefully and I figured out most of the questions I had here. Had some trouble before since I was still on the proxmox mindset.

I might need ceph still. Not sure yet.

But it would be nice to have some resources on storage setups. What I mostly find on videos is a mention on “there are many ways to do this”. But not some recommended ways and some setups which are not recommended, for some reason.

lxd init simply provides an initial way to run lxc storage create <pool name> <pool type> command.

When it asks “Would you like to use an existing empty block device (e.g. a disk or partition)?” this is equivalent to specifying the source= option on the lxc storage create command.

See About storage pools and storage volumes - LXD documentation for info on what source options are available for each storage pool type.

When source isn’t specified, by default LXD will create a loop file to use for pool types other than dir. See About storage pools and storage volumes - LXD documentation

For a comparison of the different properties of each storage pool see Storage drivers - LXD documentation

2 Likes