Hi everyone! Need some help! Could anyone advise me on how to fix auto-placement? I have a HA controller set up using DRBD reactor. Following the instructions, I set up the resource-definition and then created the resource using the command:
linstor resource create linstor_db --auto-place 3
I placed this resource on the storage pool ‘vmdata’. Later, I created a resource-group on the same storage pool using the command:
but this only helps temporarily. Linstor later removes the third replica again.
Seems I’m doing something wrong. Could someone advise me on what I need to do to get linstor_db to use the correct value of --place-count 3 again?
The “place-count” is therefore picked up from the linstor_db resource group; this is the target number of replicas to maintain. Note that “spawn-resources” means you don’t need to do “linstor resource create” at all; if you choose not to do this, then you’ll need separately to create a resource-definition, a volume-definition, and then the resources.
In your case, I can’t see what resource-group you used to create the linstor_db resource-definition. By specifying --auto-place 3 at resource creation time you simply told it to create three new resources at that instant in time, but the target number of resources is still inherited from the resource group, and that’s what it will try to align with in the future.
Then I believe this resource definition will be linked to DfltRscGrp, which has a PlaceCount of 2.
So looks like linstor_bd in cloudstack rg now
No. As I asked before, please show linstor rd list -r linstor_db - this will show you what resource-group this resource-definition belongs to. My guess is it’s using DfltRscGrp.
whats the best way to solve this now?
Easy:
Create a new linstor-db-grp resource group as shown above (but with the right storage pool)
Modify the resource-group on the linstor_db resource definition to point to this new resource group, using linstor resource-definition modify
Yes: each resource group can list one or more storage pools to allocate from, and there is no requirement for a storage pool to be used by only one resource group.
I think of a resource group as a “class of service” for resource definitions (which type of storage to use, and how many replicas)