Skip to content

Commit 5bdf270

Browse files
authored
[fstrim] limit smartctl execution time to 30 seconds (sonic-net#1850)
What I did At early boot up time, smartctl is observed could stuck forever, which causes fstrim service to be stuck in pre-start state forever. This is a transient issue. The periodic retry will go through when pmon docker is healthy. How to verify it This issue is not highly repeatable. Tested on the device hit the issue. Signed-off-by: Ying Xie [email protected]
1 parent b2da129 commit 5bdf270

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/log_ssd_health

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/bash
22

3-
smartctl -a /dev/sda > /tmp/smartctl
3+
timeout 30 smartctl -a /dev/sda > /tmp/smartctl
44
if [ -f /tmp/smartctl ];then
55
logger -f /tmp/smartctl
66
fi

0 commit comments

Comments
 (0)