From ebec84ff8765def023b74aeba722fc09d9a9f87d Mon Sep 17 00:00:00 2001 From: Daniel Kral Date: Tue, 15 Apr 2025 09:11:23 +0200 Subject: [PATCH] fix #6224: disks: get: set timeout for retrieval of SMART stat data In rare scenarios, `smartctl` takes up to 60 seconds to timeout for SCSI commands to be completed, as reported in our user forum [0] and bugzilla [1]. It seems that USB drives handled by the USB Attached SCSI (UAS) kernel module are more likely to be affected by this [2], but is more of a case-by-case situation. Therefore, set a more reasonable timeout of 10 seconds, so that callers don't have to wait too long or seem unresponsive (e.g. Node Disks view in the WebGUI). [0] https://forum.proxmox.com/threads/164799/ [1] https://bugzilla.proxmox.com/show_bug.cgi?id=6224 [2] https://www.smartmontools.org/wiki/SAT-with-UAS-Linux Signed-off-by: Daniel Kral Reviewed-by: Max Carrara Link: https://lore.proxmox.com/20250415071123.36921-3-d.kral@proxmox.com --- src/PVE/Diskmanage.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/Diskmanage.pm b/src/PVE/Diskmanage.pm index cbacf88..d9ce0d0 100644 --- a/src/PVE/Diskmanage.pm +++ b/src/PVE/Diskmanage.pm @@ -102,6 +102,7 @@ sub get_smart_data { run_command( $cmd, noerr => 1, + timeout => 10, outfunc => sub { my ($line) = @_;