tape: improve backup task logging
This commit is contained in:
parent
41685061f7
commit
3fbf2311e4
|
@ -363,6 +363,8 @@ pub fn request_and_load_media(
|
||||||
|
|
||||||
if drive_config.changer.is_some() {
|
if drive_config.changer.is_some() {
|
||||||
|
|
||||||
|
task_log!(worker, "loading media '{}' into drive '{}'", label_text, drive);
|
||||||
|
|
||||||
let mut changer = MtxMediaChanger::with_drive_config(&drive_config)?;
|
let mut changer = MtxMediaChanger::with_drive_config(&drive_config)?;
|
||||||
changer.load_media(&label_text)?;
|
changer.load_media(&label_text)?;
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ use anyhow::{bail, Error};
|
||||||
use proxmox::tools::Uuid;
|
use proxmox::tools::Uuid;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
task_log,
|
||||||
backup::{
|
backup::{
|
||||||
DataStore,
|
DataStore,
|
||||||
},
|
},
|
||||||
|
@ -203,11 +204,14 @@ impl PoolWriter {
|
||||||
return Ok(media_uuid);
|
return Ok(media_uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task_log!(worker, "allocated new writable media '{}'", media.label_text());
|
||||||
|
|
||||||
// remove read-only catalog (we store a writable version in status)
|
// remove read-only catalog (we store a writable version in status)
|
||||||
self.media_set_catalog.remove_catalog(&media_uuid);
|
self.media_set_catalog.remove_catalog(&media_uuid);
|
||||||
|
|
||||||
if let Some(PoolWriterState {mut drive, catalog, .. }) = self.status.take() {
|
if let Some(PoolWriterState {mut drive, catalog, .. }) = self.status.take() {
|
||||||
self.media_set_catalog.append_catalog(catalog)?;
|
self.media_set_catalog.append_catalog(catalog)?;
|
||||||
|
task_log!(worker, "eject current media");
|
||||||
drive.eject_media()?;
|
drive.eject_media()?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue