Skip to content

Fix deletion of dual copy tape files

Problem

As discussed in https://gitlab.cern.ch/cta/operations/-/issues/1584, when we have a broken file with a 2nd working copy on a different tapepool, it should be simple to recover the broken 1st copy:

  • We should only need to remove the 1st copy, and "repack" the 2nd tape in order to propagate the correct file into another tape, thus restoring the dual copy availability.

Unfortunately, this procedure does not work correctly.

Discussed approach

Operators are allowed to delete a tapefile only if all these conditions are fullfiled (https://gitlab.cern.ch/cta/operations/-/issues/1584#note_8927737):

  • tapefile has a second copy
  • tape is in REPACKING_DISABLED or BROKEN state
  • Full metadata is logged as a WARNING message

For future discussion

Recovering missing dual-copy files should not require the tape to be in REPACKING state. This is not a repacking operation, in the sense that we are not moving copies out of that tape.