Hard Drives connected to an LSI HBA shutdown unsafely by default

tannisroot

Dabbler
Joined
Oct 14, 2023
Messages
45
Hi, I'm running Cobia 23.10.1.3 and I have my Toshiba MG09 18TB drives connected to an LSI 9217-8i (IT mode). I was checking smart data for my new drives and I've noticed that the counter for Start_Stop_Count was matching (same number but -1) Power-Off_Retract_Count, and when I listened to the drives when the server was shutting down, they did sound like they were turning off as if in a power loss, without prior proper parking. Needless to say such behavior is detrimental to the longevity of the drives.
I did some digging and it turned out that the default value for manage_start_stop property in LSI cards is for whatever reason 0, which is what causes such behavior.
Since Cobia is on a newer kernel and in newer kernels this parameter was split up into manage_system_start_stop and manage_runtime_start_stop, I added 2 entries into init scripts that enable these parameters:
for i in /sys/class/scsi_disk/*/manage_system_start_stop; do echo 1 > $i; done
for i in /sys/class/scsi_disk/*/manage_runtime_start_stop; do echo 1 > $i; done
(i enabled both just in case, honestly even after reading the commit that changed this it is unclear to me why this was even split up)
which fixed the issue since I hear the drives parking on shutdown and Power-Off_Retract_Count value no longer goes up.
However, one thing I don't understand is why this is not handled in Truenas by default. Is SCALE maybe supposed to enable these parameters, but the feature is broken due to the kernel change? If not, should I maybe make a suggestion on the bug tracker to if not enable the start_stop parameters in all cases (although I'm not sure why one wouldn't want to do this), then at least expose this as a tickbox in the GUI in the drive's power management options, keep it on by default but make it possible to disable it if a user needs this?
 
  • Like
Reactions: kzl
Top