# Overriding auto-placement policy

**URL:** <https://forums.linbit.com/t/overriding-auto-placement-policy/960>\
**Category:** LINSTOR\
**Tags:** drbd\
**Created:** [August 6, 2025, 7:38am UTC](https://forums.linbit.com/t/overriding-auto-placement-policy/960 "2025-08-06T07:38:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sviridoff](https://yyz1.discourse-cdn.com/flex003/user_avatar/forums.linbit.com/sviridoff/32/255_2.png) [@sviridoff](https://forums.linbit.com/u/sviridoff)\
**Post date:** [August 6, 2025, 7:38am UTC](https://forums.linbit.com/t/overriding-auto-placement-policy/960/1 "2025-08-06T07:38:34Z")

</div>

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:

```auto
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:

`linstor rg create cloudstack --place-count 2 --storage-pool vmdata`

Now it seems that linstor is applying the rule `--place-count 2` instead of 3 to this resource. I’ve tried running:

`linstor resource-definition auto-place linstor_db --place-count 3`

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?

---

<div class="post-metadata">

**Author:** ![candlerb](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@candlerb](https://forums.linbit.com/u/candlerb)\
**Post date:** [August 6, 2025, 1:33pm UTC](https://forums.linbit.com/t/overriding-auto-placement-policy/960/2 "2025-08-06T13:33:10Z")

</div>

What do `linstor rd list -r linstor_db`, `linstor rd lp linstor_db` and `linstor rg l` show?

> [@sviridoff](#):
>
> `linstor resource create linstor_db --auto-place 3`

You didn’t show your resource-group or resource-definition steps. It’s [recommended](https://linbit.com/drbd-user-guide/linstor-guide-1_0-en/#s-linstor_ha) that you give linstor its own resource group:

```auto
linstor resource-group create \
--storage-pool my-thin-pool \
--place-count 3 \
--diskless-on-remaining true \
linstor-db-grp

linstor resource-group drbd-options \
--auto-promote=no \
--quorum=majority \
--on-suspended-primary-outdated=force-secondary \
--on-no-quorum=io-error \
--on-no-data-accessible=io-error \
linstor-db-grp

linstor volume-group create linstor-db-grp

linstor resource-group spawn-resources linstor-db-grp linstor_db 200M

```

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.

---

<div class="post-metadata">

**Author:** ![sviridoff](https://yyz1.discourse-cdn.com/flex003/user_avatar/forums.linbit.com/sviridoff/32/255_2.png) [@sviridoff](https://forums.linbit.com/u/sviridoff)\
**Post date:** [August 6, 2025, 1:57pm UTC](https://forums.linbit.com/t/overriding-auto-placement-policy/960/3 "2025-08-06T13:57:52Z")

</div>

Hi @candlerb ! Thanks for your reply. When I create linstor\_ db, I didn’t create any rg. I done it? like this:  
linstor resource-definition create linstor\_db  
linstor rd drbd-options --auto-promote=no linstor\_db  
linstor rd drbd-options --quorum=majority linstor\_db  
linstor rd drbd-options --on-suspended-primary-outdated=force-secondary linstor\_db  
linstor rd drbd-options --on-no-quorum=io-error linstor\_db  
linstor rd drbd-options --on-no-data-accessible=io-error linstor\_db  
linstor rd drbd-options --rr-conflict=retry-connect linstor\_db  
linstor volume-definition create linstor\_db 200M  
linstor resource create linstor\_db --auto-place 3

And after I setting up drbd reactor? i have created rg for vm’s

linstor rg create cloudstack --place-count 2 --storage-pool vmdata

Sо, now I have:

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/linbit/original/1X/a0d23801baa8af63f7d0d8cd168f18bd49f8cf7d.png)

So looks like linstor\_bd in cloudstack rg now. Can you tell me? whats the best way to solve this now?

---

<div class="post-metadata">

**Author:** ![candlerb](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@candlerb](https://forums.linbit.com/u/candlerb)\
**Post date:** [August 6, 2025, 2:03pm UTC](https://forums.linbit.com/t/overriding-auto-placement-policy/960/4 "2025-08-06T14:03:25Z")

</div>

> [@sviridoff](#):
>
> linstor resource-definition create linstor\_db

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:

1. Create a new linstor-db-grp resource group as shown above (but with the right storage pool)
2. Modify the resource-group on the linstor\_db resource definition to point to this new resource group, using `linstor resource-definition modify`

I wrote a blog post about this years ago, but it’s still relevant: [Linstor: concepts and configuration | by Brian Candler | Medium](https://brian-candler.medium.com/linstor-concepts-and-configuration-e5b0c8e10d27) (See under heading “ **Moving a resource-definition to a new resource-group** “)

---

<div class="post-metadata">

**Author:** ![sviridoff](https://yyz1.discourse-cdn.com/flex003/user_avatar/forums.linbit.com/sviridoff/32/255_2.png) [@sviridoff](https://forums.linbit.com/u/sviridoff)\
**Post date:** [August 6, 2025, 2:32pm UTC](https://forums.linbit.com/t/overriding-auto-placement-policy/960/5 "2025-08-06T14:32:10Z")

</div>

> [@candlerb](#):
>
> 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.

Sorry, missed this…  
And you right it’s using DfltRscGrp.

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/linbit/original/1X/f8193ea494337e7644f075d5a2088455629bcbc1.png)

I saw output of this command so many times, but not noticed this.((

> [@candlerb](#):
>
> Easy:
> 
> 1. Create a new linstor-db-grp resource group as shown above (but with the right storage pool)
> 2. Modify the resource-group on the linstor\_db resource definition to point to this new resource group, using `linstor resource-definition modify`

One more question). Can be new rg on the same storage pool - vmdata with cloudstack rg or its not possible?

---

<div class="post-metadata">

**Author:** ![candlerb](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@candlerb](https://forums.linbit.com/u/candlerb)\
**Post date:** [August 6, 2025, 2:45pm UTC](https://forums.linbit.com/t/overriding-auto-placement-policy/960/6 "2025-08-06T14:45:21Z")

</div>

> [@sviridoff](#):
>
> Can be new rg on the same storage pool

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)

---

<div class="post-metadata">

**Author:** ![sviridoff](https://yyz1.discourse-cdn.com/flex003/user_avatar/forums.linbit.com/sviridoff/32/255_2.png) [@sviridoff](https://forums.linbit.com/u/sviridoff)\
**Post date:** [August 6, 2025, 4:22pm UTC](https://forums.linbit.com/t/overriding-auto-placement-policy/960/7 "2025-08-06T16:22:16Z")

</div>

@candlerb Thanks for you help!!! problem resolved.
