smartctl on FreeBSD: Please specify device type with the -d option.

 

FreeBSD:

 

euler@rpi4b:~ % sudo camcontrol devlist
Password:
<YSSDJQB- 2TB 1.02>                at scbus0 target 0 lun 0 (da0,pass0)
euler@rpi4b:~ % ls /dev/da0
da0%   da0p1%
euler@rpi4b:~ % ls /dev/da0
/dev/da0

 

euler@rpi4b:~ % sudo smartctl -a  /dev/da0
smartctl 7.4 2023-08-01 r5530 [FreeBSD 14.1-RELEASE arm64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/da0: Unknown USB bridge [0x0bda:0x9201 (0xf200)]
Please specify device type with the -d option.

Use smartctl -h to get a usage summary

 

Your output tells you exactly what’s happening:

smartctl cannot communicate directly with the disk through that USB bridge (0x0bda:0x9201, a Realtek chip). Many USB-to-SATA bridges block or mangle the ATA pass-through commands required for S.M.A.R.T. reporting.

That’s why you get:

Unknown USB bridge [0x0bda:0x9201 (0xf200)]
Please specify device type with the -d option.

What to try:

  1. Force device type
    Run something like:

    sudo smartctl -a -d sat /dev/da0
    

    -d sat forces smartctl to treat it as a SATA device behind a USB bridge.
    Sometimes -d scsi works if it’s being presented as a SCSI device.

  2. Probe automatically

    sudo smartctl -a -d test /dev/da0
    

    That will make smartctl try different pass-through methods and tell you which works.

  3. If your bridge is crippled
    Many Realtek and JMicron bridges (especially cheap ones) simply do not pass S.M.A.R.T. commands. In that case, no amount of smartctl tricks will work. Your only option is to put the drive on a proper SATA port, or use a USB enclosure/dock that supports ATA pass-through (ASMedia and some newer JMicron chips usually do).


⚠️ Bottom line: On FreeBSD ARM64 with that Realtek 0x0bda:0x9201 bridge, there’s a good chance you’ll never get S.M.A.R.T. data out of it. Test with -d sat, but if that fails, you need better hardware.

Do you want me to give you a one-liner to test all the possible -d options automatically and report back which (if any) succeed?

 

euler@rpi4b:~ % sudo smartctl -a -d sat /dev/da0
smartctl 7.4 2023-08-01 r5530 [FreeBSD 14.1-RELEASE arm64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     YSSDJQB-2TB
Serial Number:    2M22L4711400095
Firmware Version: V0718B0
User Capacity:    2,048,408,248,320 bytes [2.04 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available
Device is:        Not in smartctl database 7.3/5528
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Sat Sep 27 12:21:22 2025
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (  120) seconds.
Offline data collection
capabilities:                    (0x11) SMART execute Offline immediate.
                                        No Auto Offline data collection support.
                                        Suspend Offline collection upon new
                                        command.
                                        No Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        No Selective Self-test supported.
SMART capabilities:            (0x0002) Does not save SMART data before
                                        entering power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        (  10) minutes.
SCT capabilities:              (0x0001) SCT Status supported.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x0032   100   100   050    Old_age   Always       -       0
  5 Reallocated_Sector_Ct   0x0032   100   100   050    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   050    Old_age   Always       -       9048
 12 Power_Cycle_Count       0x0032   100   100   050    Old_age   Always       -       268
160 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       0
161 Unknown_Attribute       0x0033   100   100   050    Pre-fail  Always       -       100
163 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       23
164 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       32788
165 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       50
166 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       8
167 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       44
168 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       5050
169 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       100
175 Program_Fail_Count_Chip 0x0032   100   100   050    Old_age   Always       -       0
176 Erase_Fail_Count_Chip   0x0032   100   100   050    Old_age   Always       -       0
177 Wear_Leveling_Count     0x0032   100   100   050    Old_age   Always       -       0
178 Used_Rsvd_Blk_Cnt_Chip  0x0032   100   100   050    Old_age   Always       -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   050    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   050    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   050    Old_age   Always       -       93
194 Temperature_Celsius     0x0022   100   100   050    Old_age   Always       -       0
195 Hardware_ECC_Recovered  0x0032   100   100   050    Old_age   Always       -       0
196 Reallocated_Event_Count 0x0032   100   100   050    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   050    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0032   100   100   050    Old_age   Always       -       0
232 Available_Reservd_Space 0x0032   100   100   050    Old_age   Always       -       100
241 Total_LBAs_Written      0x0030   100   100   050    Old_age   Offline      -       446259
242 Total_LBAs_Read         0x0030   100   100   050    Old_age   Offline      -       363130
245 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       495220

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

Selective Self-tests/Logging not supported

The above only provides legacy SMART information - try 'smartctl -x' for more

euler@rpi4b:~ %

euler@rpi4b:~ % date
Sat Sep 27 12:24:32 UTC 2025

 

posted @ 2025-09-27 20:25  profesor  阅读(14)  评论(0)    收藏  举报