public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] tape: increase timeout for moving medium in changer
@ 2025-07-25 11:36 Dominik Csapak
  2025-07-25 11:36 ` [pbs-devel] [PATCH proxmox-backup stable-3] " Dominik Csapak
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-07-25 11:36 UTC (permalink / raw)
  To: pbs-devel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pbs-devel] [PATCH proxmox-backup stable-3] tape: increase timeout for moving medium in changer
  2025-07-25 11:36 [pbs-devel] [PATCH proxmox-backup] tape: increase timeout for moving medium in changer Dominik Csapak
@ 2025-07-25 11:36 ` Dominik Csapak
  2025-07-25 11:55 ` [pbs-devel] [PATCH proxmox-backup] " Dominik Csapak
  2025-07-28 12:59 ` [pbs-devel] applied: " Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-07-25 11:36 UTC (permalink / raw)
  To: pbs-devel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [pbs-devel] [PATCH proxmox-backup] tape: increase timeout for moving medium in changer
  2025-07-25 11:36 [pbs-devel] [PATCH proxmox-backup] tape: increase timeout for moving medium in changer Dominik Csapak
  2025-07-25 11:36 ` [pbs-devel] [PATCH proxmox-backup stable-3] " Dominik Csapak
@ 2025-07-25 11:55 ` Dominik Csapak
  2025-07-28 12:59 ` [pbs-devel] applied: " Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2025-07-25 11:55 UTC (permalink / raw)
  To: pbs-devel

meh sorry, i wrote '30 minutes' in the commit message when it should be '45'

i can send a v2 if necessary (or it could be fixed up on commit ?)

On 7/25/25 13:37, Dominik Csapak wrote:
> 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!(



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pbs-devel] applied: [PATCH proxmox-backup] tape: increase timeout for moving medium in changer
  2025-07-25 11:36 [pbs-devel] [PATCH proxmox-backup] tape: increase timeout for moving medium in changer Dominik Csapak
  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 ` Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2025-07-28 12:59 UTC (permalink / raw)
  To: pbs-devel, Dominik Csapak

On Fri, 25 Jul 2025 13:36:56 +0200, Dominik Csapak wrote:
> 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
> 
> [...]

Applied, with the commit message 30m vs 45m typo fixed, thanks!

[1/1] tape: increase timeout for moving medium in changer
      commit: ac5bcc36a1422c0e6675b0a7f29937d8df0b1169


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-28 12:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-25 11:36 [pbs-devel] [PATCH proxmox-backup] tape: increase timeout for moving medium in changer Dominik Csapak
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal