Skip to content

Commit

Permalink
[fstrim] limit smartctl execution time to 30 seconds (sonic-net#1850)
Browse files Browse the repository at this point in the history
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 ying.xie@microsoft.com
  • Loading branch information
yxieca committed Oct 2, 2021
1 parent 371970e commit 647f01f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/log_ssd_health
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash

smartctl -a /dev/sda > /tmp/smartctl
timeout 30 smartctl -a /dev/sda > /tmp/smartctl
if [ -f /tmp/smartctl ];then
logger -f /tmp/smartctl
fi
Expand Down

0 comments on commit 647f01f

Please sign in to comment.