mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-06-16 00:15:38 +00:00
tape: inventory: skip unassigned tapes
tapes that are labeled into a pool but are not in a media-set yet, belong to the special 'all zero' media-set. these will never have a catalog on them, so skip them fixes the issue, that an inventory with 'catalog restore' aborted on such a tape Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
52517f7b9e
commit
139acf37a2
@ -952,17 +952,17 @@ pub fn update_inventory(
|
|||||||
media_id.label.uuid
|
media_id.label.uuid
|
||||||
);
|
);
|
||||||
|
|
||||||
if let Some(MediaSetLabel {
|
if let Some(ref set) = media_id.media_set_label {
|
||||||
ref pool, ref uuid, ..
|
if set.unassigned() {
|
||||||
}) = media_id.media_set_label
|
continue;
|
||||||
{
|
}
|
||||||
let _pool_lock = lock_media_pool(TAPE_STATUS_DIR, pool)?;
|
let _pool_lock = lock_media_pool(TAPE_STATUS_DIR, &set.pool)?;
|
||||||
let _lock = lock_media_set(TAPE_STATUS_DIR, uuid, None)?;
|
let _lock = lock_media_set(TAPE_STATUS_DIR, &set.uuid, None)?;
|
||||||
MediaCatalog::destroy_unrelated_catalog(TAPE_STATUS_DIR, &media_id)?;
|
MediaCatalog::destroy_unrelated_catalog(TAPE_STATUS_DIR, &media_id)?;
|
||||||
inventory.store(media_id.clone(), false)?;
|
inventory.store(media_id.clone(), false)?;
|
||||||
|
|
||||||
if catalog {
|
if catalog {
|
||||||
let media_set = inventory.compute_media_set_members(uuid)?;
|
let media_set = inventory.compute_media_set_members(&set.uuid)?;
|
||||||
if let Err(err) = fast_catalog_restore(
|
if let Err(err) = fast_catalog_restore(
|
||||||
&worker,
|
&worker,
|
||||||
&mut drive,
|
&mut drive,
|
||||||
|
Loading…
Reference in New Issue
Block a user