Seagate / openSeaChest

Cross platform utilities useful for performing various operations on SATA, SAS, NVMe, and USB storage devices.
Other
436 stars 60 forks source link

Settings do not take effect #130

Closed Fossil01 closed 6 months ago

Fossil01 commented 6 months ago

I tried to disable Background Medium Scanning on my Exos X16 16TB drives. It says it's disabled it but when I check again afterwards it's still enabled.

How do I turn this off?

# ./openSeaChest_SMART -d /dev/sg0 --smartAutoOffline disable
==========================================================================================
 openSeaChest_SMART - openSeaChest drive utilities - NVMe Enabled
 Copyright (c) 2014-2023 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
 openSeaChest_SMART Version: 2.3.2-6_2_0 X86_64
 Build Date: Dec  1 2023
 Today: Tue Jan  2 11:39:32 2024    User: root
==========================================================================================

/dev/sg1 - ST16000NM001G-2KK103 - <Serial_Number> - SN03 - ATA
Successfully Disabled SMART auto-off-line on this device

But after running it, it's still enabled:

# ./openSeaChest_SMART -d /dev/sg0 --smartInfo
===SMART Info===
SMART Version: 10
Off-line Data Collection Status:
    82h - Off-line data collection activity was completed without error (Auto-Off-Line Enabled)
vonericsen commented 6 months ago

Hi @Fossil01,

I can repeat the issue on a drive I have, but I do not know why it does not show as disabled in the smart info output. It may be that the off-line data collection status preserves that it last ran while auto-offline was enabled even if the feature is currently disabled.

The reason it's saying it was successfully disabled is due to the drive accepting the command to disable this feature without reporting an error, so it appears that it should be disabled due to the drive not reporting an error.

I added debug code to manually execute the off-line data collection routine to see if manually running it causes the status to change, but that did not change the status reported by the drive I have either.

I have reached out to our firmware team to help get some answers on expected behavior with this feature.

For some historical context, the SMART auto-off-line data collection routine was in the original SFF (Small form factor) committee SMART specifications, but did not make it into the T13 ATA specifications at any point. I'm not sure if this affects how the drive handles these commands at all, but it might be supported due to some backwards compatibility requirement from the original SMART specification days.

Fossil01 commented 6 months ago

Hi @vonericsen ,

Thanks a lot. I tried opening a support ticket about this and weird drive noises (I suspect thats BMS though) but I couldn't do that on Seagate's website, it doesn't exist. Glad to know someone is looking into it.

Thanks

vonericsen commented 6 months ago

Hi @Fossil01,

What I have found out is that the auto-off-line SMART feature has been obsolete in Seagate firmware for a long time now. The bits that indicate it is "supported" are still present as are the commands to "enable" and "disable" it, however they are treated as a no-op meaning they have no effect on the drive. It seems that there is some backwards compatibility requirement to save the bits and pass the commands even if they are a no-op, so disabling this will have no effect. It was likely a requirement to show that auto-off-line is still enabled at all times since this is something that cannot be disabled on a modern HDD.

Background tasks cannot be disabled any way that I am aware of for modern products. They are used to maintain reliability and integrity of the drive and data stored on it.

Fossil01 commented 6 months ago

Okay thanks for clarifying. I have re-enabled Idle_B on my drives now (head parking), set at 120s, and that seems to prevent background tasks as the constant ticking every 5-6 seconds went away.

vonericsen commented 6 months ago

I can confirm that background tasks are paused while in lower power states. So idle_b, idle_c, standby_y, and standby_z will not run background tasks since the heads will not be over the medium in these states. The active state is when the drive is processing a host command (read, write, etc) and background tasks won't run at this time either. idle_a is the only time I am aware of that a background task will execute since the heads are still above the medium.

I have also been told by our firmware team that some background tasks will be rescheduled to run at a later time if they are paused, so they may restart again when the drive hits idle_a. It may keep doing this until it gets completed, but it can depend what the trigger for the background task was. Some are time based, some are opportunistic, and some are due to detecting some condition inside the drive and what the firmware thinks is most important to take care of at that time.

I hope this additional information helps a little bit.