Skip to content

External drive connected via USB does not work #83

@Galdanwing

Description

@Galdanwing

Describe the bug
I tried to connect an external ssd via USB, but it does not get detected. calling smartctl from the cmdline does detect it.

Raw outputs

Python 3.12.2 (main, Feb  7 2024, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.20.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from pySMART import Device, SMARTCTL

In [2]: SMARTCTL.sudo = True

In [3]: device = Device("/dev/sda")

In [4]: device.all_attributes()
This device does not support SMART attributes.
  • smartctl --scan-open
sudo smartctl --scan-open
/dev/sda -d sntasmedia # /dev/sda [USB NVMe ASMedia], NVMe device
/dev/nvme0 -d nvme # /dev/nvme0, NVMe device
  • smartctl --all <problematic device> # Example: smartctl --all /dev/nvme0
sudo smartctl /dev/sda -a 
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.7.5-200.fc39.x86_64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       Samsung Portable SSD T7 Shield
Serial Number:                      S76ZNJ0X101040A
Firmware Version:                   FXI72P2Q
PCI Vendor/Subsystem ID:            0x144d
IEEE OUI Identifier:                0x002538
Total NVM Capacity:                 4,000,787,030,016 [4.00 TB]
Unallocated NVM Capacity:           0
Controller ID:                      5
NVMe Version:                       1.4
Number of Namespaces:               1
Namespace 1 Size/Capacity:          4,000,787,030,016 [4.00 TB]
Namespace 1 Utilization:            785,408,978,944 [785 GB]
Namespace 1 Formatted LBA Size:     512
Local Time is:                      Wed Feb 28 14:00:44 2024 CET
Firmware Updates (0x16):            3 Slots, no Reset required
Optional Admin Commands (0x0007):   Security Format Frmw_DL
Optional NVM Commands (0x001d):     Comp DS_Mngmt Wr_Zero Sav/Sel_Feat
Log Page Attributes (0x0f):         S/H_per_NS Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg
Maximum Data Transfer Size:         512 Pages
Warning  Comp. Temp. Threshold:     75 Celsius
Critical Comp. Temp. Threshold:     80 Celsius
Namespace 1 Features (0x10):        NP_Fields

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     4.83W       -        -    0  0  0  0        0       0
 1 +     3.54W       -        -    1  1  1  1        0       0
 2 +     3.04W       -        -    2  2  2  2        0     500
 3 -   0.0500W       -        -    3  3  3  3      210    1200

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         0

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        28 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    0%
Data Units Read:                    51,346,626 [26.2 TB]
Data Units Written:                 2,313,409 [1.18 TB]
Host Read Commands:                 242,864,448
Host Write Commands:                9,230,694
Controller Busy Time:               550
Power Cycles:                       31
Power On Hours:                     172
Unsafe Shutdowns:                   27
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               28 Celsius
Temperature Sensor 2:               28 Celsius

Warning: NVMe Get Log truncated to 0x200 bytes, 0x200 bytes zero filled
Error Information (NVMe Log 0x01, 16 of 64 entries)
No Errors Logged

Self-tests not supported

Environmental setup:

  • Complete smartctl version: smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.7.5-200.fc39.x86_64] (local build)
  • Py-SMART version: pySMART 1.3.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions