storaged-project / udisks

The UDisks project provides a daemon, tools and libraries to access and manipulate disks, storage devices and technologies.
http://storaged.org/doc/udisks2-api/latest/
Other
334 stars 142 forks source link

udisks 2.9.1 - Error updating SMART data: sk_disk_smart_read_data: Operation not supported (udisks-error-quark, 0) #812

Open slrslr opened 3 years ago

slrslr commented 3 years ago

On latest Manjaro (Arch based) Linux with kernel 5.8.16-2-MANJARO i have external USB connected HDD with zfs filesystem.

The dmesg is poluted by messages like:

udisksd[1280]: Error performing housekeeping for drive /org/freedesktop/UDisks2/drives/ST....anonymized...: Error updating SMART data: sk_disk_smart_read_data: Operation not supported (udisks-error-quark, 0)

it mentions that zfs drive id. How can this be fixed please?

tbzatek commented 3 years ago

Can you provide udisksctl dump please? Is SMART enabled on the drive? (i.e. does smartctl -a /dev/xxx work?) Is it an internal drive or connected through some bridge (USB)?

Essentially such messages can be ignored, however if there's a problem retrieving SMART data, the SMART functionality should be turned off on the drive. This capability may be misdetected as well.

beta-tester commented 8 months ago

i observer the same error message in my syslog file. i am running RaspOS 11 (Bullseye) on a Raspberry Pi 4 and USB-C portable_SSD_1TB_InnovationIT

$ tail /var/log/syslog
udisksd[...]: Error performing housekeeping for drive /org/freedesktop/UDisks2/drives/...: Error updating SMART data: sk_disk_smart_read_data: Operation not supported (udisks-error-quark, 0)
$ sudo smartctl -a /dev/sda
smartctl 7.2 2020-12-30 r5155 [aarch64-linux-6.1.21-v8+] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     portable_SSD_1TB_InnovationIT
Serial Number:    ...
Firmware Version: T0722A0
User Capacity:    1.024.209.543.168 bytes [1,02 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      M.2
TRIM Command:     Available, deterministic, zeroed
Device is:        Not in smartctl database [for details use: -P showall]
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:    Fri Nov  3 13:42:41 2023 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

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

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.

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       -       16462
 12 Power_Cycle_Count       0x0032   100   100   050    Old_age   Always       -       547
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       -       21
164 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       27196
165 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       267
166 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       23
167 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       56
168 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       7000
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       -       365
194 Temperature_Celsius     0x0022   100   100   050    Old_age   Always       -       54
195 Hardware_ECC_Recovered  0x0032   100   100   050    Old_age   Always       -       383001
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
199 UDMA_CRC_Error_Count    0x0032   100   100   050    Old_age   Always       -       21
232 Available_Reservd_Space 0x0032   100   100   050    Old_age   Always       -       100
241 Total_LBAs_Written      0x0030   100   100   050    Old_age   Offline      -       487694
242 Total_LBAs_Read         0x0030   100   100   050    Old_age   Offline      -       103708
245 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       336193

SMART Error Log Version: 1
Warning: ATA error count 0 inconsistent with error log pointer 2

ATA Error Count: 0
    CR = Command Register [HEX]
    FR = Features Register [HEX]
    SC = Sector Count Register [HEX]
    SN = Sector Number Register [HEX]
    CL = Cylinder Low Register [HEX]
    CH = Cylinder High Register [HEX]
    DH = Device/Head Register [HEX]
    DC = Device Command Register [HEX]
    ER = Error register [HEX]
    ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 0 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  00 00 00 00 00 00 00

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  e5 00 00 00 00 00 00 00      00:00:00.000  CHECK POWER MODE
  b0 da 00 00 4f c2 00 00      00:00:00.000  SMART RETURN STATUS
  b0 d0 01 00 4f c2 00 00      00:00:00.000  SMART READ DATA
  b0 d5 01 06 4f c2 00 00      00:00:00.000  SMART READ LOG
  b0 d5 01 01 4f c2 00 00      00:00:00.000  SMART READ LOG

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%       332         -

Selective Self-tests/Logging not supported
$ sudo udisksctl dump
/org/freedesktop/UDisks2/Manager:
  org.freedesktop.UDisks2.Manager:
    DefaultEncryptionType:      luks1
    SupportedEncryptionTypes:   luks1
                                luks2
    SupportedFilesystems:       ext2
                                ext3
                                ext4
                                vfat
                                ntfs
                                exfat
                                xfs
                                reiserfs
                                nilfs2
                                btrfs
                                minix
                                udf
                                f2fs
                                swap
    Version:                    2.9.2

/org/freedesktop/UDisks2/block_devices/loop0:
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/loop0
    DeviceNumber:               1792
    Drive:                      '/'
    HintAuto:                   false
    HintIconName:
    HintIgnore:                 false
    HintName:
    HintPartitionable:          true
    HintSymbolicIconName:
    HintSystem:                 true
    Id:
    IdLabel:
    IdType:
    IdUUID:
    IdUsage:
    IdVersion:
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/loop0
    ReadOnly:                   true
    Size:                       0
    Symlinks:
    UserspaceMountOptions:
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        /srv/nfs/debian-x64
    Size:               0
  org.freedesktop.UDisks2.Loop:
    Autoclear:          true
    BackingFile:        /srv/iso/debian-x64.iso
    SetupByUID:         0

...

/org/freedesktop/UDisks2/block_devices/ram0:
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/ram0
    DeviceNumber:               256
    Drive:                      '/'
    HintAuto:                   false
    HintIconName:
    HintIgnore:                 true
    HintName:
    HintPartitionable:          true
    HintSymbolicIconName:
    HintSystem:                 true
    Id:
    IdLabel:
    IdType:
    IdUUID:
    IdUsage:
    IdVersion:
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/ram0
    ReadOnly:                   false
    Size:                       4194304
    Symlinks:
    UserspaceMountOptions:

...

/org/freedesktop/UDisks2/block_devices/sda:
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/sda
    DeviceNumber:               2048
    Drive:                      '/org/freedesktop/UDisks2/drives/portable_SSD_1TB_InnovationIT_...'
    HintAuto:                   true
    HintIconName:
    HintIgnore:                 false
    HintName:
    HintPartitionable:          true
    HintSymbolicIconName:
    HintSystem:                 false
    Id:                         by-id-ata-portable_SSD_1TB_InnovationIT_...
    IdLabel:
    IdType:
    IdUUID:
    IdUsage:
    IdVersion:
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/sda
    ReadOnly:                   false
    Size:                       1024209543168
    Symlinks:                   /dev/disk/by-id/ata-portable_SSD_1TB_InnovationIT_...
                                /dev/disk/by-id/usb-portable__SSD_1TB_Inn_...-0:0
                                /dev/disk/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:2:1.0-scsi-0:0:0:0
    UserspaceMountOptions:
  org.freedesktop.UDisks2.PartitionTable:
    Partitions:         /org/freedesktop/UDisks2/block_devices/sda3
                        /org/freedesktop/UDisks2/block_devices/sda2
                        /org/freedesktop/UDisks2/block_devices/sda1
    Type:               dos

/org/freedesktop/UDisks2/block_devices/sda1:
  org.freedesktop.UDisks2.Block:
    Configuration:              [('fstab', {'fsname': <b'PARTUUID=de000002-01'>, 'dir': <b'/boot'>, 'type': <b'vfat'>, 'opts': <b'defaults,flush'>, 'freq': <0>, 'passno': <2>})]
    CryptoBackingDevice:        '/'
    Device:                     /dev/sda1
    DeviceNumber:               2049
    Drive:                      '/org/freedesktop/UDisks2/drives/portable_SSD_1TB_InnovationIT_...'
    HintAuto:                   true
    HintIconName:
    HintIgnore:                 false
    HintName:
    HintPartitionable:          true
    HintSymbolicIconName:
    HintSystem:                 false
    Id:                         by-id-ata-portable_SSD_1TB_InnovationIT_...-part1
    IdLabel:                    boot
    IdType:                     vfat
    IdUUID:                     DE00-0002
    IdUsage:                    filesystem
    IdVersion:                  FAT32
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/sda1
    ReadOnly:                   false
    Size:                       268435456
    Symlinks:                   /dev/disk/by-id/ata-portable_SSD_1TB_InnovationIT_...-part1
                                /dev/disk/by-id/usb-portable__SSD_1TB_Inn_...-0:0-part1
                                /dev/disk/by-label/boot
                                /dev/disk/by-partuuid/de000002-01
                                /dev/disk/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:2:1.0-scsi-0:0:0:0-part1
                                /dev/disk/by-uuid/DE00-0002
    UserspaceMountOptions:
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        /boot
    Size:               0
  org.freedesktop.UDisks2.Partition:
    Flags:              0
    IsContained:        false
    IsContainer:        false
    Name:
    Number:             1
    Offset:             4194304
    Size:               268435456
    Table:              '/org/freedesktop/UDisks2/block_devices/sda'
    Type:               0x0c
    UUID:               de000002-01

/org/freedesktop/UDisks2/block_devices/sda2:
  org.freedesktop.UDisks2.Block:
    Configuration:              [('fstab', {'fsname': <b'PARTUUID=de000002-02'>, 'dir': <b'/'>, 'type': <b'ext4'>, 'opts': <b'defaults,noatime'>, 'freq': <0>, 'passno': <1>})]
    CryptoBackingDevice:        '/'
    Device:                     /dev/sda2
    DeviceNumber:               2050
    Drive:                      '/org/freedesktop/UDisks2/drives/portable_SSD_1TB_InnovationIT_...'
    HintAuto:                   true
    HintIconName:
    HintIgnore:                 false
    HintName:
    HintPartitionable:          true
    HintSymbolicIconName:
    HintSystem:                 false
    Id:                         by-id-ata-portable_SSD_1TB_InnovationIT_...-part2
    IdLabel:                    rootfs
    IdType:                     ext4
    IdUUID:                     de000002-0000-0000-0000-000000000002
    IdUsage:                    filesystem
    IdVersion:                  1.0
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/sda2
    ReadOnly:                   false
    Size:                       137438953472
    Symlinks:                   /dev/disk/by-id/ata-portable_SSD_1TB_InnovationIT_...-part2
                                /dev/disk/by-id/usb-portable__SSD_1TB_Inn_...-0:0-part2
                                /dev/disk/by-label/rootfs
                                /dev/disk/by-partuuid/de000002-02
                                /dev/disk/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:2:1.0-scsi-0:0:0:0-part2
                                /dev/disk/by-uuid/de000002-0000-0000-0000-000000000002
    UserspaceMountOptions:
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        /
    Size:               137438953472
  org.freedesktop.UDisks2.Partition:
    Flags:              0
    IsContained:        false
    IsContainer:        false
    Name:
    Number:             2
    Offset:             272629760
    Size:               137438953472
    Table:              '/org/freedesktop/UDisks2/block_devices/sda'
    Type:               0x83
    UUID:               de000002-02

/org/freedesktop/UDisks2/block_devices/sda3:
  org.freedesktop.UDisks2.Block:
    Configuration:              [('fstab', {'fsname': <b'PARTUUID=de000002-03'>, 'dir': <b'/media/pi/data'>, 'type': <b'ext4'>, 'opts': <b'defaults,noatime'>, 'freq': <0>, 'passno': <2>})]
    CryptoBackingDevice:        '/'
    Device:                     /dev/sda3
    DeviceNumber:               2051
    Drive:                      '/org/freedesktop/UDisks2/drives/portable_SSD_1TB_InnovationIT_...'
    HintAuto:                   true
    HintIconName:
    HintIgnore:                 false
    HintName:
    HintPartitionable:          true
    HintSymbolicIconName:
    HintSystem:                 false
    Id:                         by-id-ata-portable_SSD_1TB_InnovationIT_...-part3
    IdLabel:                    data
    IdType:                     ext4
    IdUUID:                     de000002-0000-0000-0000-000000000003
    IdUsage:                    filesystem
    IdVersion:                  1.0
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/sda3
    ReadOnly:                   false
    Size:                       886497607680
    Symlinks:                   /dev/disk/by-id/ata-portable_SSD_1TB_InnovationIT_...-part3
                                /dev/disk/by-id/usb-portable__SSD_1TB_Inn_...-0:0-part3
                                /dev/disk/by-label/data
                                /dev/disk/by-partuuid/de000002-03
                                /dev/disk/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:2:1.0-scsi-0:0:0:0-part3
                                /dev/disk/by-uuid/de000002-0000-0000-0000-000000000003
    UserspaceMountOptions:
  org.freedesktop.UDisks2.Filesystem:
    MountPoints:        /media/pi/data
    Size:               886497607680
  org.freedesktop.UDisks2.Partition:
    Flags:              0
    IsContained:        false
    IsContainer:        false
    Name:
    Number:             3
    Offset:             137711583232
    Size:               886497607680
    Table:              '/org/freedesktop/UDisks2/block_devices/sda'
    Type:               0x83
    UUID:               de000002-03

/org/freedesktop/UDisks2/drives/portable_SSD_1TB_InnovationIT_...:
  org.freedesktop.UDisks2.Drive:
    CanPowerOff:                true
    Configuration:              {}
    ConnectionBus:              usb
    Ejectable:                  false
    Id:                         portable_SSD_1TB_InnovationIT-...
    Media:
    MediaAvailable:             true
    MediaChangeDetected:        true
    MediaCompatibility:
    MediaRemovable:             false
    Model:                      portable_SSD_1TB_InnovationIT
    Optical:                    false
    OpticalBlank:               false
    OpticalNumAudioTracks:      0
    OpticalNumDataTracks:       0
    OpticalNumSessions:         0
    OpticalNumTracks:           0
    Removable:                  true
    Revision:                   T0722A0
    RotationRate:               0
    Seat:                       seat0
    Serial:                     ...
    SiblingId:                  /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-2/2-2:1.0
    Size:                       1024209543168
    SortKey:                    00coldplug/12removable/sd____a
    TimeDetected:               1697734517122957
    TimeMediaDetected:          1697734517122957
    Vendor:
    WWN:
  org.freedesktop.UDisks2.Drive.Ata:
    AamEnabled:                                 false
    AamSupported:                               false
    AamVendorRecommendedValue:                  0
    ApmEnabled:                                 true
    ApmSupported:                               true
    PmEnabled:                                  true
    PmSupported:                                true
    ReadLookaheadEnabled:                       true
    ReadLookaheadSupported:                     true
    SecurityEnhancedEraseUnitMinutes:           2
    SecurityEraseUnitMinutes:                   2
    SecurityFrozen:                             false
    SmartEnabled:                               true
    SmartFailing:                               false
    SmartNumAttributesFailedInThePast:          0
    SmartNumAttributesFailing:                  0
    SmartNumBadSectors:                         0
    SmartPowerOnSeconds:                        59263200
    SmartSelftestPercentRemaining:              0
    SmartSelftestStatus:                        success
    SmartSupported:                             true
    SmartTemperature:                           327.15000000000003
    SmartUpdated:                               1699015560
    WriteCacheEnabled:                          true
    WriteCacheSupported:                        true
tbzatek commented 8 months ago

Sounds like #965 - blkid is marking the device as ATA while it's clearly not.

tbzatek commented 8 months ago

A quirk to ignore such devices: #1214

Can you test that please?