From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] tape: increase timeout for moving medium in changer
Date: Fri, 25 Jul 2025 13:36:56 +0200 [thread overview]
Message-ID: <20250725113657.3815270-1-d.csapak@proxmox.com> (raw)
from the current 5 minutes to 30 minutes. According to documentation
from vendors (e.g. HP see [0]) moving a medium between slots or to/from
a drive can take up a much longer time than 5 minutes. (up to 38 minutes
in a HP library) so increase the timeout we use here to something that
exceeds these recommendations.
0: https://support.hpe.com/hpesc/public/docDisplay?docId=sd00001714en_us&page=GUID-D7147C7F-2016-0901-065E-00000000072C.html
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
pbs-tape/src/sg_pt_changer.rs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pbs-tape/src/sg_pt_changer.rs b/pbs-tape/src/sg_pt_changer.rs
index 7122fcdb4..dd297a822 100644
--- a/pbs-tape/src/sg_pt_changer.rs
+++ b/pbs-tape/src/sg_pt_changer.rs
@@ -18,6 +18,7 @@ use crate::{
};
const SCSI_CHANGER_DEFAULT_TIMEOUT: usize = 60 * 5; // 5 minutes
+const SCSI_CHANGER_MOVE_MEDIUM_TIMEOUT: usize = 60 * 45; // 45 minutes
const SCSI_VOLUME_TAG_LEN: usize = 36;
/// Initialize element status (Inventory)
@@ -181,7 +182,7 @@ pub fn load_slot(file: &mut File, from_slot: u64, drivenum: u64) -> Result<(), E
);
let mut sg_raw = SgRaw::new(file, 64)?;
- sg_raw.set_timeout(SCSI_CHANGER_DEFAULT_TIMEOUT);
+ sg_raw.set_timeout(SCSI_CHANGER_MOVE_MEDIUM_TIMEOUT);
sg_raw
.do_command(&cmd)
@@ -205,7 +206,7 @@ pub fn unload(file: &mut File, to_slot: u64, drivenum: u64) -> Result<(), Error>
);
let mut sg_raw = SgRaw::new(file, 64)?;
- sg_raw.set_timeout(SCSI_CHANGER_DEFAULT_TIMEOUT);
+ sg_raw.set_timeout(SCSI_CHANGER_MOVE_MEDIUM_TIMEOUT);
sg_raw
.do_command(&cmd)
@@ -233,7 +234,7 @@ pub fn transfer_medium<F: AsRawFd>(
);
let mut sg_raw = SgRaw::new(file, 64)?;
- sg_raw.set_timeout(SCSI_CHANGER_DEFAULT_TIMEOUT);
+ sg_raw.set_timeout(SCSI_CHANGER_MOVE_MEDIUM_TIMEOUT);
sg_raw.do_command(&cmd).map_err(|err| {
format_err!(
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next reply other threads:[~2025-07-25 11:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 11:36 Dominik Csapak [this message]
2025-07-25 11:36 ` [pbs-devel] [PATCH proxmox-backup stable-3] " Dominik Csapak
2025-07-25 11:55 ` [pbs-devel] [PATCH proxmox-backup] " Dominik Csapak
2025-07-28 12:59 ` [pbs-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250725113657.3815270-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox