Detailed step by step instructions to reproduce the problem
I wanted to disable SMART for some harddisks, but was not possible. After Click on the “on/Off”-button a problem window opened. This happens on all HDDs I disable it. I have round about 22 HDDs installed.
File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 41, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/disk.py”, line 495, in post
return self._toggle_smart(did, request)
File “/opt/rockstor/eggs/Django-1.8.16-py2.7.egg/django/utils/decorators.py”, line 145, in inner
return func(*args, **kwargs)
File “/opt/rockstor/src/rockstor/storageadmin/views/disk.py”, line 1003, in _toggle_smart
smart.toggle_smart(disk.name, disk.smart_options, enable)
File “/opt/rockstor/src/rockstor/system/smart.py”, line 339, in toggle_smart
custom_options))
File “/opt/rockstor/src/rockstor/system/osi.py”, line 115, in run_command
raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = /usr/sbin/smartctl --smart=off /dev/disk/by-id/scsi-2b48a4def00d00000. rc = 4. stdout = [‘smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.10.6-1.el7.elrepo.x86_64] (local build)’, ‘Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org’, ‘’, ‘=== START OF ENABLE/DISABLE COMMANDS SECTION ===’, ‘unable to disable Exception control and warning [unsupported scsi opcode]’, “A mandatory SMART command failed: exiting. To continue, add one or more ‘-T permissive’ options.”, ‘’]. stderr = [‘’]
Thanks for the report. From the looks of it your drives/interface combination only has partial S.M.A.R.T support with the default settings as the error message received from smartmontools:
is suggesting the command Rockstor uses to disable smart, when you activate the switch:
is failing, where as the one we use to query smart availability and enabled status works without error:
So your options to work around this partial support for smart commands as delivered by smartmontools (in it’s default mode) is to either add the suggested “-T permissive” option:
or otherwise attempt to improve the S.M.A.R.T compatibility by employing other options that may be relevant, ie if these drives are hosted by a raid controller then you may get better smart compatibility via options specific to the particular controller make/model. See our:
It may help to know what options are available by giving more info on how these drives are attached, ie if through a raid controller what make / model / driver is in use. The vendor column indicates an Adaptec controller but more info may help here. See the smartmontools link within that last doc reference for available options; though we only support a subset which are documented in our custom smart options Web-UI section.
So it looks like you may just need a custom option or two as smartmontools can read the availability (the switch appears) and the enabled status (the switch is on) but is not able to disable that state: the error you are receiving re “A mandatory SMART command failed”.
Hope that helps.
As a side note and something that may help, you appear to have applied no updates as your kernel is still showing as 4.10. It is advisable to at least update to latest testing although the stable channel is a year on from this again. Although in your case it may well not help but is still advisable, the newer kernel in either channel may for instance have improved drivers for your hardware. All non Rockstor package updates, such as smartmontools, can also be applied independently via the flashing icon to the left of the “Linux” kernel version text in the Web-UI header.