Skip to content

Commit

Permalink
[fstrim] limit smartctl execution time to 30 seconds (#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 authored Sep 30, 2021
1 parent b2da129 commit 5bdf270
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 5bdf270

Please sign in to comment.