Wrongly ignores drives without reported ID_ATA_FEATURE_SETs

Bug #2042529 reported by Severin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hdparm (Ubuntu)
New
Undecided
Unassigned

Bug Description

I hope I am at the right place for this problem :)

I am using 3 hard drives in a ZFS pool on an Ubuntu Server 22.04.3 LTS.
All of these hard drives support spindown and APM via hdparm and even the manual "hdparm -B XX -S XX" command works just fine.
However, when using /etc/hdparm.conf none of these drives are configured on startup.

I traced the error back to the "hdparm_try_apm" function in "/usr/lib/hdparm/hdparm-functions", which checks via "udevadm" for the "ID_ATA_FEATURE_SET_APM" feature set. Unfortunately, none of my drives report this feature set via udevadm.
In fact, they don't report any feature sets via udevadm.

If I simply override this check, the script executes all the commands properly, however, then it also tries to set the default APM value (254) for my, actually unsupported, SSD.

Same problem, other guy: https://askubuntu.com/questions/1488005/spin-down-disks-using-configuration-persistent-across-reboots

----------------------------

Aside from the serial numbers, here is the complete output of one of my drives, the other two have a similar output:

$ udevadm info -n "$drive" -q property
```
DEVPATH=/devices/pci0000:00/0000:00:01.3/0000:03:00.1/ata6/host5/target5:0:0/5:0:0:0/block/sdd/sdd1
DEVNAME=/dev/sdd1
DEVTYPE=partition
DISKSEQ=13
PARTN=1
PARTNAME=zfs-d818f05a3b329e7d
MAJOR=8
MINOR=49
SUBSYSTEM=block
USEC_INITIALIZED=3900179
ID_SCSI=1
SCSI_TPGS=0
SCSI_TYPE=disk
SCSI_VENDOR=ATA
SCSI_VENDOR_ENC=ATA\x20\x20\x20\x20\x20
SCSI_MODEL=Hitachi_<removed>
SCSI_MODEL_ENC=Hitachi\x20<removed>
SCSI_REVISION=A31B
SCSI_IDENT_SERIAL=<removed>
SCSI_IDENT_LUN_VENDOR=<removed>
SCSI_IDENT_LUN_T10=ATA_Hitachi_<removed>
SCSI_IDENT_LUN_ATA=Hitachi_<removed>
SCSI_IDENT_LUN_NAA_REG=5000cca349c832b4
ID_VENDOR=ATA
ID_VENDOR_ENC=ATA\x20\x20\x20\x20\x20
ID_MODEL=Hitachi_<removed>
ID_MODEL_ENC=Hitachi\x20<removed>
ID_REVISION=A31B
ID_TYPE=disk
ID_WWN_WITH_EXTENSION=0x5000cca349c832b4
ID_WWN=0x5000cca349c832b4
ID_BUS=ata
ID_ATA=1
ID_SERIAL=Hitachi_<removed>
ID_SERIAL_SHORT=<removed>
ID_SCSI_SERIAL=<removed>
DM_MULTIPATH_DEVICE_PATH=0
ID_SCSI_INQUIRY=1
ID_PATH=pci-0000:03:00.1-ata-6.0
ID_PATH_TAG=pci-0000_03_00_1-ata-6_0
ID_PATH_ATA_COMPAT=pci-0000:03:00.1-ata-6
ID_PART_TABLE_UUID=5bed0277-1f7f-064e-8619-a93fbc743844
ID_PART_TABLE_TYPE=gpt
ID_FS_VERSION=5000
ID_FS_LABEL=big-data
ID_FS_LABEL_ENC=big-data
ID_FS_UUID=5338324796920760467
ID_FS_UUID_ENC=5338324796920760467
ID_FS_UUID_SUB=10597612881644279928
ID_FS_UUID_SUB_ENC=10597612881644279928
ID_FS_TYPE=zfs_member
ID_FS_USAGE=filesystem
ID_PART_ENTRY_SCHEME=gpt
ID_PART_ENTRY_NAME=zfs-d818f05a3b329e7d
ID_PART_ENTRY_UUID=00df9064-b30f-2543-a88d-c589d96a443e
ID_PART_ENTRY_TYPE=6a898cc3-1dd2-11b2-99a6-080020736631
ID_PART_ENTRY_NUMBER=1
ID_PART_ENTRY_OFFSET=2048
ID_PART_ENTRY_SIZE=1953505280
ID_PART_ENTRY_DISK=8:48
UDISKS_IGNORE=1
DEVLINKS=<removed>
TAGS=:systemd:
CURRENT_TAGS=:systemd:
```

$ lsb_release -rd
Description: Ubuntu 22.04.3 LTS
Release: 22.04

$ apt-cache policy hdparm
hdparm:
  Installiert: 9.60+ds-1build3
  Installationskandidat: 9.60+ds-1build3
  Versionstabelle:
 *** 9.60+ds-1build3 500
        500 http://at.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.