#1080266 program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO

Package:
smartmontools
Source:
smartmontools
Description:
control and monitor storage systems using S.M.A.R.T.
Submitter:
Harald Dunkel
Date:
2026-09-16 10:45:01 UTC
Severity:
normal
#1080266#5
Date:
2024-09-01 10:25:15 UTC
From:
To:
Using the backport of 7.4 to Bookworm I see tons of messages

[Sun Sep  1 11:57:59 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Sep  1 11:57:59 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Sep  1 11:57:59 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Sep  1 11:57:59 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Sep  1 11:57:59 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Sep  1 11:57:59 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Sep  1 11:57:59 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Sep  1 11:57:59 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Sep  1 11:57:59 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Sep  1 11:57:59 2024] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO

According to https://www.smartmontools.org/ticket/1618 this problem
should have been fixed with smartmontools 7.4, so I wonder what is
the story here?

Please excuse filing a bug report about a backports package, but this
bug was the main reason to use 7.4-2~bpo12+1 in the first place, and
I cannot upgrade to Testing or Unstable.


Regards
Harri

#1080266#10
Date:
2025-05-05 08:43:20 UTC
From:
To:
Please provide info about this system (RAID controller?) and a sample
smartctl command line which triggers these warnings.

Unfortunately the kernel does not tell which ioctl is "a deprecated SCSI
ioctl".

smartmontools 7.4 and 7.5 no longer use the deprecated
SCSI_IOCTL_SEND_COMMAND, except if one of the following options for very
old controllers are used:
'-d 3ware,N'
'-d marvell' (deprecated and subject to remove)

In all other cases, SG_IO (version 3 or version 4) or a vendor specific
ioctl is used.

#1080266#15
Date:
2025-12-29 03:40:34 UTC
From:
To:
I have neither 3ware nor marvell controllers installed, and yet I get

:
[Sun Dec 28 22:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 22:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 22:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 22:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 23:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 23:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 23:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 23:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 23:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 23:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 23:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Sun Dec 28 23:58:14 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 00:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 00:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 00:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 00:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 00:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 00:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 00:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 00:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 01:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 01:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 01:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 01:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 01:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 01:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 01:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 01:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 02:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 02:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 02:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 02:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 02:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 02:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 02:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 02:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 03:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
[Mon Dec 29 03:58:13 2025] program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO
:

Regards
Harri

#1080266#20
Date:
2025-12-29 22:50:42 UTC
From:
To:
Please provide more details, in particular a minimal smartctl command
line ('smartctl -i' ?)  which triggers the problem. Provide the debug
output (option '-r ioctl') of this command.

If possible, create an upstream issue:
https://github.com/smartmontools/smartmontools/issues

#1080266#25
Date:
2026-09-16 10:33:15 UTC
From:
To:
Hello,

I am experiencing same warning message on a Debian 13 server upgraded
from Debian 12. Only difference is that on Debian 13, there is extra
message, this happens every hour, I haven't manage to manually trigger
this message. It seems that this appears to be "cosmetic" issue in my case?!

dmesg says:
[Wed Sep 16 10:50:47 2026] program smartctl is using a deprecated SCSI
ioctl, please convert it to SG_IO
[Wed Sep 16 10:50:47 2026] program smartctl is using a deprecated SCSI
ioctl, please convert it to SG_IO
[Wed Sep 16 10:50:48 2026] ata4.00: Enabling discard_zeroes_data
[Wed Sep 16 10:50:48 2026] program smartctl is using a deprecated SCSI
ioctl, please convert it to SG_IO
[Wed Sep 16 10:50:48 2026] program smartctl is using a deprecated SCSI
ioctl, please convert it to SG_IO
[Wed Sep 16 10:50:48 2026] ata3.00: Enabling discard_zeroes_data

Debian 12 did not have message about discarding zeroes - trim?

I have two servers with 2 same (almost) motherboards but different
os/smartmontools versions, it might help?!


Server 1 (with issues):
MBO: A1SRi-2358F
OS: Debian 13
Kernel: 6.12.107+deb13-amd64
smartctl: 7.4-3

root@redacted:~# lspci -nnk | grep -A 4 -Ei 'SATA|RAID|SAS|SCSI|storage'
00:17.0 SATA controller [0106]: Intel Corporation Atom processor C2000
AHCI SATA2 Controller [8086:1f22] (rev 03)
	Subsystem: Intel Corporation Device [8086:7270]
	Kernel driver in use: ahci
	Kernel modules: ahci
00:18.0 SATA controller [0106]: Intel Corporation Atom processor C2000
AHCI SATA3 Controller [8086:1f32] (rev 03)
	Subsystem: Intel Corporation Device [8086:7270]
	Kernel driver in use: ahci
	Kernel modules: ahci
00:1f.0 ISA bridge [0601]: Intel Corporation Atom processor C2000 PCU
[8086:1f38] (rev 03)
--
03:00.0 USB controller [0c03]: Renesas Electronics Corp. uPD720201 USB
3.0 Host Controller [1912:0014] (rev 03)
	Subsystem: Super Micro Computer Inc Device [15d9:0813]
	Kernel driver in use: xhci-pci-renesas
	Kernel modules: xhci_pci, xhci_pci_renesas


There are no 3ware or Marvell controllers involved.


root@redacted:~# smartctl -i -r ioctl /dev/sda
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.12.107+deb13-amd64] (local
build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/sda [SAT]: Device open changed type from 'scsi' to 'sat'

REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY DEVICE
  Input:   FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=....,
CMD=0xec IN
  [Duration: 0.000126s]
REPORT-IOCTL: Device=/dev/sda Command=IDENTIFY DEVICE returned 0
=== START OF INFORMATION SECTION ===
Model Family:     Intel S4510/S4610/S4500/S4600 Series SSDs
Device Model:     INTEL SSDSC2KB480G8K
Serial Number:    redacted
LU WWN Device Id: 5 5cd2e4 154ea07ed
Firmware Version: XCV1CS04
User Capacity:    480,103,981,056 bytes [480 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5528
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Wed Sep 16 11:39:12 2026 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

root@redacted:~# smartctl -i -r ioctl /dev/sdb
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.12.107+deb13-amd64] (local
build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/sdb [SAT]: Device open changed type from 'scsi' to 'sat'

REPORT-IOCTL: Device=/dev/sdb Command=IDENTIFY DEVICE
  Input:   FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=....,
CMD=0xec IN
  [Duration: 0.000113s]
REPORT-IOCTL: Device=/dev/sdb Command=IDENTIFY DEVICE returned 0
=== START OF INFORMATION SECTION ===
Model Family:     Intel S4510/S4610/S4500/S4600 Series SSDs
Device Model:     INTEL SSDSC2KB480G8K
Serial Number:    redacted
LU WWN Device Id: 5 5cd2e4 154e9f2d9
Firmware Version: XCV1CS04
User Capacity:    480,103,981,056 bytes [480 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database 7.3/5528
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Wed Sep 16 11:41:27 2026 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

root@redacted:~# lspci -nn | grep -Ei 'SATA|RAID|SAS|SCSI|storage'
00:17.0 SATA controller [0106]: Intel Corporation Atom processor C2000
AHCI SATA2 Controller [8086:1f22] (rev 03)
00:18.0 SATA controller [0106]: Intel Corporation Atom processor C2000
AHCI SATA3 Controller [8086:1f32] (rev 03)
03:00.0 USB controller [0c03]: Renesas Electronics Corp. uPD720201 USB
3.0 Host Controller [1912:0014] (rev 03)



Server 2 (no issues) - due to os/smartcl versions might be irrelevant:
MBO: A1SRi-2558F
OS: Debian 9
Kernel: 4.9.0-6-amd64
smartctl: 6.5+svn4324-1

root@redacted:/home/redacted# lspci -nnk | grep -A 4 -Ei
'SATA|RAID|SAS|SCSI|storage'
00:17.0 SATA controller [0106]: Intel Corporation Atom processor C2000
AHCI SATA2 Controller [8086:1f22] (rev 03)
	Subsystem: Intel Corporation Atom processor C2000 AHCI SATA2 Controller
[8086:7270]
	Kernel driver in use: ahci
	Kernel modules: ahci
00:18.0 SATA controller [0106]: Intel Corporation Atom processor C2000
AHCI SATA3 Controller [8086:1f32] (rev 03)
	Subsystem: Intel Corporation Atom processor C2000 AHCI SATA3 Controller
[8086:7270]
	Kernel driver in use: ahci
	Kernel modules: ahci
00:1f.0 ISA bridge [0601]: Intel Corporation Atom processor C2000 PCU
[8086:1f38] (rev 03)
	Subsystem: Intel Corporation Atom processor C2000 PCU [8086:7270]
--
03:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720201 USB
3.0 Host Controller [1912:0014] (rev 03)
	Subsystem: Super Micro Computer Inc uPD720201 USB 3.0 Host Controller
[15d9:0813]
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
04:00.0 RAID bus controller [0104]: LSI Logic / Symbios Logic MegaRAID
SAS-3 3108 [Invader] [1000:005d] (rev 02)
	Subsystem: LSI Logic / Symbios Logic MegaRAID SAS-3 3108 [Invader]
[1000:936c]
	Kernel driver in use: megaraid_sas
	Kernel modules: megaraid_sas


root@redacted:/home/redacted# lsblk -d -o NAME,MODEL,SIZE,TRAN,TYPE,ROTA
NAME MODEL              SIZE TRAN   TYPE ROTA
sda  MR9361-8i         10.9T        disk    1
sdb  SAMSUNG MZ7LH240 223.6G sata   disk    0
sdc  SAMSUNG MZ7LH240 223.6G sata   disk    0

root@redacted:/home/redacted# smartctl -i -r ioctl /dev/sdb
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

  [inquiry: 12 00 00 00 24 00 ]
   scsi_status=0x0, host_status=0x0, driver_status=0x0
   info=0x0  duration=0 milliseconds  resid=0
  [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 ]
   scsi_status=0x0, host_status=0x0, driver_status=0x0
   info=0x0  duration=0 milliseconds  resid=0
/dev/sdb [SAT]: Device open changed type from 'scsi' to 'sat'

REPORT-IOCTL: Device=/dev/sdb Command=IDENTIFY DEVICE
  Input:   FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=....,
CMD=0xec IN
  [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 ]
   scsi_status=0x0, host_status=0x0, driver_status=0x0
   info=0x0  duration=0 milliseconds  resid=0
REPORT-IOCTL: Device=/dev/sdb Command=IDENTIFY DEVICE returned 0
=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG MZ7LH240HAHQ-00005
Serial Number:    redacted
LU WWN Device Id: 5 002538 e0005e865
Firmware Version: HXT7304Q
User Capacity:    240,057,409,536 bytes [240 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   Unknown(0x0ffc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Wed Sep 16 12:20:09 2026 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

root@redacted:/home/redacted# smartctl -i -r ioctl /dev/sdc
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.9.0-6-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

  [inquiry: 12 00 00 00 24 00 ]
   scsi_status=0x0, host_status=0x0, driver_status=0x0
   info=0x0  duration=0 milliseconds  resid=0
  [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 ]
   scsi_status=0x0, host_status=0x0, driver_status=0x0
   info=0x0  duration=0 milliseconds  resid=0
/dev/sdc [SAT]: Device open changed type from 'scsi' to 'sat'

REPORT-IOCTL: Device=/dev/sdc Command=IDENTIFY DEVICE
  Input:   FR=...., SC=0x01, LL=...., LM=...., LH=...., DEV=....,
CMD=0xec IN
  [ata pass-through(16): 85 08 0e 00 00 00 01 00 00 00 00 00 00 00 ec 00 ]
   scsi_status=0x0, host_status=0x0, driver_status=0x0
   info=0x0  duration=0 milliseconds  resid=0
REPORT-IOCTL: Device=/dev/sdc Command=IDENTIFY DEVICE returned 0
=== START OF INFORMATION SECTION ===
Device Model:     SAMSUNG MZ7LH240HAHQ-00005
Serial Number:    redacted
LU WWN Device Id: 5 002538 e0005e817
Firmware Version: HXT7304Q
User Capacity:    240,057,409,536 bytes [240 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   Unknown(0x0ffc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Wed Sep 16 12:20:11 2026 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled


I am happy to provide more relevant information if required.



Best regards,
Marko