[DRBD-user] Linstor hangs on deleting snapshots

Gábor Hernádi gabor.hernadi at linbit.com
Wed Apr 28 13:45:00 CEST 2021


Hello,

can you please give us more details? for example the version of the linstor
controller
  linstor controller version

also what exactly happened before you tried to delete ... what exactly? You
are talking about snapshots, but you are showing us a list of resources and
resource-definitions, not snapshots and snapshot-definitions.
Please describe what happened since you created the origin resource. Did
you create a snapshot? And afterwards restored it in a new *resource*
called "snap_vm-107-disk-1_vzdump"?
Did something else happen which seems unrelated (restart of controller,
other resources failing, or other resources were deleted or such...)

My goal would be here to reproduce this issue, afterwards I am quite sure
we can figure out what happens and come up with a proper fix.

For the database, feel free to send me a direct email (not via mailing
list) with the database file so I can fix it for you.
Or if you want to try it yourself - make a BACKUP first of the database,
just in case. Afterwards your goal should be to let Linstor delete the
resource as there are quite a few tables that need to be cleaned up. As the
exception states an entry in LDV (LAYER_DRBD_VOLUME) has still a foreign
key to LRI (LAYER_RESOURCE_IDS), I'd look for entries in LDV and see if
there are orphaned or duplicates (same "target resource" but multiple IDs
per KIND) . After double checking that, you can try to delete the orphaned
entries and see if Linstor manages to cleanly remove the rest of the
resource.

On Wed, Apr 28, 2021 at 12:01 PM Michał Szamocki <mszamocki at cirrus.pl>
wrote:

> Hello,
>
> my linstor cluster failed to delete snapshots and now I have:
> # linstor rd l | grep DELETING
> | snap_vm-107-disk-1_vzdump | 7021 | DfltRscGrp         | DELETING |
> | snap_vm-108-disk-1_vzdump | 7019 | DfltRscGrp         | DELETING |
>
> # linstor r l | grep DELETING
> | snap_vm-107-disk-1_vzdump | debra | 7021 |        | Ok    | DELETING |
> 2021-04-28 07:09:35 |
> | snap_vm-107-disk-1_vzdump | elsa  | 7021 |        | Ok    | DELETING |
> 2021-04-28 07:09:36 |
> | snap_vm-108-disk-1_vzdump | debra | 7019 |        | Ok    | DELETING |
> 2021-04-28 07:07:23 |
> | snap_vm-108-disk-1_vzdump | elsa  | 7019 |        | Ok    | DELETING |
> 2021-04-28 07:07:23 |
>
>
> Any operation fails error similar to this:
> Caused by:
> ==========
>
> Category:                           Exception
> Class name:                         JdbcSQLException
> Class canonical name:               org.h2.jdbc.JdbcSQLException
> Generated at:                       Method 'getJdbcSQLException', Source
> file 'DbException.java', Line #357
>
> Error message:                      Naruszenie ograniczenia Klucza
> Głównego lub Indeksu Unikalnego: "FK_LDV_LRI_INDEX_C ON
> LINSTOR.LAYER_RESOURCE_IDS(LAYER_RESOURCE_ID) VALUES (21, 116935)"
> Unique index or primary key violation: "FK_LDV_LRI_INDEX_C ON
> LINSTOR.LAYER_RESOURCE_IDS(LAYER_RESOURCE_ID) VALUES (21, 116935)"; SQL
> statement:
>  INSERT INTO LAYER_RESOURCE_IDS ( LAYER_RESOURCE_ID, NODE_NAME,
> RESOURCE_NAME, SNAPSHOT_NAME, LAYER_RESOURCE_PARENT_ID,
> LAYER_RESOURCE_KIND, LAYER_RESOURCE_SUFFIX, LAYER_RESOURCE_SUSPENDED )
> VALUES ( ?, ?, ?, ?, ?, ?, ?, ? ) [23505-197]
>
> lvs and drbdadm status don't show any information about those snapshot.
>
> How can I safetly remove information about those snapshots from
> linstor-controller database?
>
> BR,
> Michal Szamocki
> Cirrus
> _______________________________________________
> Star us on GITHUB: https://github.com/LINBIT
> drbd-user mailing list
> drbd-user at lists.linbit.com
> https://lists.linbit.com/mailman/listinfo/drbd-user
>


-- 
Best regards,
Gabor Hernadi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20210428/8624c4e8/attachment.htm>


More information about the drbd-user mailing list