Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device init for virtual drives or no smart support #74

Closed
ulmitov opened this issue Aug 30, 2023 · 4 comments
Closed

Device init for virtual drives or no smart support #74

ulmitov opened this issue Aug 30, 2023 · 4 comments
Assignees

Comments

@ulmitov
Copy link

ulmitov commented Aug 30, 2023

Hi!
A minor improvement request for virtual drives or drves that have "SMART support is: Unavailable",
To skip sending of "smartctl -d scsi -l background /dev/sda" command

# smartctl -x /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.15.0-25-generic] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               AVAGO
Product:              MR9361-16i
Revision:             4.72
Compliance:           SPC-3
User Capacity:        959,119,884,288 bytes [959 GB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
Logical Unit id:      0x600062b2079c34000000f253f50d4c57
Serial number:        00574c0df553f2000000349c07b26200
Device type:          disk
Local Time is:        Wed Aug 30 12:39:17 2023 MSK
SMART support is:     Unavailable - device lacks SMART capability.
Read Cache is:        Enabled
Writeback Cache is:   Disabled

=== START OF READ SMART DATA SECTION ===
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Error Counter logging not supported

Device does not support Self Test logging
Device does not support Background scan results logging
@ralequi
Copy link
Collaborator

ralequi commented Aug 30, 2023

Hi!

The usually initial command is smartctl -d test /dev/sda
Could you copy that output to complete the test-case?

Thank you!

ralequi added a commit that referenced this issue Aug 30, 2023
@ulmitov
Copy link
Author

ulmitov commented Aug 30, 2023

In [1]: import pySMART as ps

# prints of all generic_calls:
In [2]: d=ps.DeviceList()
['/usr/local/sbin/smartctl', '--scan-open']
['/usr/local/sbin/smartctl', '-d', 'scsi', '--all', '/dev/sda']
['/usr/local/sbin/smartctl', '-d', 'scsi', '-l', 'background', '/dev/sda']
['/usr/local/sbin/smartctl', '-d', 'scsi', '--all', '/dev/sdb']
['/usr/local/sbin/smartctl', '-d', 'scsi', '-l', 'background', '/dev/sdb']
['/usr/local/sbin/smartctl', '-d', 'scsi', '--all', '/dev/sdc']
['/usr/local/sbin/smartctl', '-d', 'scsi', '-l', 'background', '/dev/sdc']
['/usr/local/sbin/smartctl', '-d', 'sat+megaraid,23', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,38', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,39', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,42', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,43', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,44', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,45', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,47', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,48', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'sat+megaraid,49', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'sat+megaraid,50', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'sat+megaraid,51', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,53', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,55', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,56', '--all', '/dev/bus/0']
['/usr/local/sbin/smartctl', '-d', 'megaraid,57', '--all', '/dev/bus/0']

In [3]: !smartctl -d test /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.15.0-25-generic] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/sda: Device of type 'scsi' [SCSI] detected
/dev/sda: Device of type 'scsi' [SCSI] opened

In [4]: !smartctl -x /dev/sda
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-5.15.0-25-generic] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               AVAGO
Product:              MR9361-16i
Revision:             4.72
Compliance:           SPC-3
User Capacity:        959,119,884,288 bytes [959 GB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
Logical Unit id:      0x600062b2079c34000000f253f50d4c57
Serial number:        00574c0df553f2000000349c07b26200
Device type:          disk
Local Time is:        Wed Aug 30 14:19:21 2023 MSK
SMART support is:     Unavailable - device lacks SMART capability.
Read Cache is:        Enabled
Writeback Cache is:   Disabled

=== START OF READ SMART DATA SECTION ===
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Error Counter logging not supported

Device does not support Self Test logging
Device does not support Background scan results logging

ralequi added a commit that referenced this issue Aug 30, 2023
@ralequi
Copy link
Collaborator

ralequi commented Aug 30, 2023

Thank you @ulmitov
I think with the previous commit this should be fixed.

@ralequi
Copy link
Collaborator

ralequi commented Apr 19, 2024

I suppose this is already fixed.

Feel free to re-open if not @ulmitov

@ralequi ralequi closed this as completed Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants