media with label already exists error

Jan 5, 2023
6
2
8
Had an issue with labeling an expired tape after removing an encryption key connected to it. The bug appears to begin once you remove an old encryption key and not invalidating the inventory for the tape.

After removing the encryption key, when you try to format the tape output is:
Code:
unable to read media label: unknown tape encryption key 'xx:xx:xx:xx:xx:xx:xx:xx'
format anyways
TASK OK

The problem is the format doesn't clear the label and attempting to label it now results in an error:
Code:
TASK ERROR: Media with label 'XXXXXXXX' already exists.

Further trying to backup to this tape results in this message:
Code:
found empty media without label (please label all tapes first)

Trying to catalog the tape results in:
Code:
TASK ERROR: media is empty (no media label found)

My work-around for this was to remove the media entry in inventory.json which allowed the tape to be labeled and the backup process to work.
I have opened bug report 6045 for this.

Thanks,
Ned
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!